KB5122769: Security update for SQL Server 2025, CU branch, September 2026. Four critical remote-code flaws fixed; MSDASQL queries may fail
Fixes 56 vulnerabilities, including four critical SQL Server remote-code execution flaws. Linked-server queries using MSDASQL with a provider string can fail, and queries during database recovery can trigger an access violation.
Does it affect you? Applies to: SQL Server 2025 on Windows and Linux, all editions. The package listed is for x64.
Review notes Additional details from the official release notes (1) Read note
-
In short
Queries against
sys.dm_exec_requestscan cause an access violation while a database is recovering. The issue can occur during RESTORE, startup recovery, or before an availability group replica finishes coming online.
The official sources are linked at the end of the page.
For servers on the CU branch: they install cumulative updates, which also bring fixes beyond security. Servers on the GDR branch (security fixes only) get a separate update. Which branch am I on?
What changes
Fixes 38 changes
SQL Agent
-
SQL Server Agent's security validation is strengthened when it loads task-agent components.1
Addresses a security validation issue when SQL Server Agent loads task-agent components. Windows.
-
SQL Server Agent handles specific input more reliably and securely.2
Addresses reliability and security issues when SQL Server Agent processes specific input. Linux and Windows.
-
SQL Server Agent's security and reliability improve under specific operating conditions.4
Addresses an issue affecting SQL Server Agent under specific operating conditions. Linux and Windows.
-
SQL Server Agent handles specific input more reliably and securely.10
Addresses reliability and security issues when SQL Server Agent processes specific input. Linux and Windows.
WMI Management Provider (SqlMgmProvider)
For: SQL Server on Linux and Windows
-
The SQL WMI Provider handles malformed input correctly while preserving its behavior for valid input.3
Addresses incorrect processing of malformed input by the SQL WMI Provider. Linux and Windows.
Security Infrastructure
For: SQL Server on Linux and Windows
-
A security vulnerability in Microsoft Entra authentication login handling is addressed.5
Addresses a vulnerability in Microsoft Entra authentication login handling. Linux and Windows.
-
An error condition now produces a correctly formatted error message.25
Addresses an incorrectly formatted error message. Linux and Windows.
-
Audit records consistently include sensitivity information when applicable.29
Ensures the
data_sensitivity_informationfield is populated in applicable audit records generated bySCHEMA_OBJECT_ACCESS_GROUP. Linux and Windows.
Backup Restore
-
Malformed or undersized backup metadata is rejected safely.6
Addresses validation of backup metadata processed by the SQL Server Volume Shadow Copy Service (VSS) Writer. Windows.
-
A vulnerability in SQL Server managed backup to Microsoft Azure stored procedures is addressed.11
Affects
managed_backup.sp_get_encryption_optionandmanaged_backup.sp_do_backup. Customers using managed backup should apply this update through the standard SQL Server servicing process. Linux and Windows.
Query Execution
For: SQL Server on Linux and Windows
-
Specially crafted shift values or binary inputs no longer cause the LEFT_SHIFT and RIGHT_SHIFT functions to overflow or access memory out of bounds.7
Addresses arithmetic overflow and out-of-bounds memory access in
LEFT_SHIFTandRIGHT_SHIFT, which can terminate the SQL Server process. Linux and Windows. -
Input validation is strengthened to address an issue that could let an authenticated user disclose a limited amount of memory.26
Addresses improper input validation. Linux and Windows.
-
Input validation is strengthened to address an issue that could let an authenticated user disclose in-memory information.31
Addresses improper input validation. Linux and Windows.
-
Input validation is strengthened for a case where an authenticated user could supply a pointer that SQL Server reads but does not execute.32
The issue can generate a dump file or cause out-of-memory conditions. Linux and Windows.
Programmability
-
SQL Server processes and outputs certain internal event data in a way that helps protect information.8
Addresses a security issue involving processing and output of certain internal event data. Linux and Windows.
-
The SqlDataRecord.SetBytes API no longer allows an out-of-bounds heap write for sql_variant values.33
Addresses improper field offset validation. The issue can cause denial of service or elevation of privilege when CLR is enabled, including in Azure SQL Managed Instances. Windows.
SQL Server Engine
For: SQL Server on Linux and Windows
-
An authenticated Tabular Data Stream remote procedure call no longer causes a buffer overflow that can stop the SQL Server process.9
Addresses a buffer overflow during an authenticated TDS RPC. Linux and Windows.
Extended Events
For: SQL Server on Linux and Windows
-
Extended Events validation is strengthened to address a security issue that could cause memory corruption.12
Addresses insufficient validation in Extended Events. Linux and Windows.
-
Reading a specially crafted Extended Events file no longer allows the listed vulnerabilities to disclose information or cause a denial of service.13
Resolves several vulnerabilities triggered when the database engine reads a specially crafted
.xelfile. Linux and Windows.
PolyBase
For: SQL Server on Linux and Windows
-
PolyBase services no longer open raw TCP listeners for DW Engine and DMS control and data channels when started with modified command-line parameters.14
Addresses a remote code execution vulnerability involving an administrator modifying PolyBase service parameters to activate a deprecated feature. The feature was intended for a single SQLPAL instance in Kubernetes with only the SQL Server port exposed outside the pod. Linux and Windows.
XML
For: SQL Server on Linux and Windows
-
An XML data type handling bug in DTD attribute lists is addressed.15
Addresses a Document Type Definition (DTD) attribute list handling bug. Linux and Windows.
-
A specially crafted XML format file processed through OPENROWSET(BULK...) or BULK INSERT no longer causes an integer overflow that can stop or terminate SQL Server.27
Addresses integer overflow in the SQL Server XML reader. Linux and Windows.
-
A query with an extremely large OPTION (USE PLAN) XML declaration no longer causes an access violation that can terminate SQL Server.28
Addresses an access violation when SQL Server processes the query. Linux and Windows.
Replication
-
Replication stored procedures correctly process supplied and stored identifiers.16
Addresses identifier handling and input validation in replication stored procedures. Linux and Windows.
-
Replication stored procedures correctly process identifiers with longer or special characters.17
Addresses incorrect handling of identifiers containing longer or special characters. Linux and Windows.
-
Replication stored procedures correctly process identifiers containing special characters.18
Addresses incorrect handling of identifiers containing special characters. Linux and Windows.
-
A merge replication metadata stored procedure validates supplied values more reliably.19
Addresses input validation for a merge replication metadata stored procedure. Linux and Windows.
-
A replication stored procedure handles a caller-supplied path value more safely.20
Addresses handling of a caller-supplied path value. Linux and Windows.
-
Replication stored procedure parameters are validated more reliably.21
Addresses input validation for parameters used by replication stored procedures. Linux and Windows.
-
A class ID lookup call no longer reads arbitrary memory.30
Addresses an issue in the class ID lookup call. Windows.
-
Protection of internal replication data improves during processing.34
Addresses an issue affecting internal replication data protection. Linux and Windows.
-
Merge Replication handles text data more reliably during processing.35
Addresses an issue affecting text data handling. Linux and Windows.
-
Validation and handling during replication operations improve security and reliability.36
Addresses an issue in replication operation validation and handling. Linux and Windows.
-
Change Event Streaming can deserialize event payloads that contain certain characters.37
Addresses event deserialization failures in Change Event Streaming (CES). Linux and Windows.
-
SQL dump files are less likely to be created while Change Event Streaming serializes large object data.38
Addresses SQL dump files that might be created during serialization of large object (LOB) data in Change Event Streaming. Linux and Windows.
In-Memory OLTP
For: SQL Server on Linux and Windows
-
A SUBSTRING operation on malformed DBCS varchar input no longer reads beyond its allocated buffer in a natively compiled In-Memory OLTP procedure.22
Addresses an unsigned integer underflow in string-length calculation. Linux and Windows.
-
Converting or truncating certain NVARCHAR values no longer causes an access violation in a natively compiled In-Memory OLTP procedure.23
Affects values containing an Ideographic Variation Sequence under a Variation Selector Sensitive (
_VSS) collation; the issue can make the server stop responding. Linux and Windows. -
A natively compiled procedure no longer overwrites heap memory when streaming truncated nvarchar(max) data under a Variation Selector Sensitive collation.24
The issue can make the server stop responding when the procedure uses small TDS packet sizes. Linux and Windows.
Improvements 9 changes
PolyBase
For: SQL Server on Linux and Windows
-
Validation of responses from S3-compatible external storage endpoints improves.39
Improves validation of endpoint responses during external data access. Linux and Windows.
Replication
-
Security checks for replication stored procedures are strengthened so operations use the expected safeguards.40
Improves internal validation and security checks for replication stored procedures. Linux and Windows.
-
Object Store Format deserialization is strengthened against malformed or malicious stream data.41
Windows.
-
Validation is added for embedded attestation fields.42
Adds bounds validation for embedded attestation fields. Windows.
-
Object Store Format deserialization is strengthened against malformed or malicious stream data.43
Windows.
-
Buffer-length validation checks within enclave code are strengthened.44
Windows.
-
Queued Updating Subscriptions in Transactional Replication receive security and reliability improvements.46
Windows.
-
Queued Updating Subscriptions in Transactional Replication receive security and reliability improvements.47
Windows.
Query Store
For: SQL Server on Windows
-
Showplan handles input more securely and reliably.45
Windows.
Known issues
-
Linked server queries that use MSDASQL fail with error 7416
Linked-server queries that use the MSDASQL (OLE DB Provider for ODBC Drivers) provider and specify a provider string (@provstr) fail with error 7416, stating that access to the remote server is denied because no login-mapping exists.48
Workaround status No workaround yetMicrosoft has not published a manual workaround for this issue yet. Monitor release health until a resolving update is available.
-
Access violation when you query sys.dm_exec_requests during database recovery
Queries against sys.dm_exec_requests might cause an access violation and generate a dump file while a database is recovering, including during RESTORE, startup recovery, or before an availability group replica finishes coming online.49
How to apply the workaround WorkaroundEnable trace flag 4696, avoid querying sys.dm_exec_requests for recovering databases, or uninstall the update. With the trace flag enabled, monitoring queries against sys.dm_exec_requests or sys.sysprocesses on secondary replicas might return error 976 or 978.49
Step-by-step workaround instructionsShow steps Hide steps2 stepsStep-by-step procedure- Enable trace flag 4696, or avoid querying
sys.dm_exec_requestsfor databases that are recovering. - Uninstall the update if neither mitigation is suitable.
- Enable trace flag 4696, or avoid querying
Technical details
Data sheet · Security · Downloads · Components Click to collapse or expand
Data sheet
- Released
- 2026-09-08
- Classification
- Security Updates
- Type
- Cumulative update
- Servicing branch
- CU
- Restart
- Required
- Replaces
- KB5104822, KB5096981, KB5101346, KB5093421
- Replaced by
- KB5126967
| Version | Build | Channel |
|---|---|---|
| 2025 | 17.0.4085.5 | General availability |
Security
| Vulnerability | Severity | CVSS |
|---|---|---|
|
Microsoft SQL Server Remote Code Execution Vulnerability
|
Critical | 9.8 |
|
Microsoft SQL Server Remote Code Execution Vulnerability
|
Critical | 9.8 |
|
Microsoft SQL Server Remote Code Execution Vulnerability
|
Critical | 9.0 |
|
Microsoft SQL Server Remote Code Execution Vulnerability
|
Critical | 9.0 |
The table lists the 4 exploited, publicly disclosed or critical vulnerabilities. See all 56 vulnerabilities →
Downloads (Microsoft Update Catalog)
Updated components
161 files changed since the previous update for the same versions.
| Top changed components | Files |
|---|---|
| SQL Server Engine | 127 |
| SQL Server PolyBase | 3 |
Verified in package: changed files confirm SQL Server Engine.
Sources
Cited passages from Microsoft's official notes (49)
-
1.
This fix addresses a security validation issue in SQL Server Agent if SQL Server Agent loads task-agent components. This fix strengthens security validation.
support.microsoft.com -
2.
This fix addresses reliability and security issues in SQL Server Agent if it processes specific input.
support.microsoft.com -
3.
This fix addresses an issue in which the SQL WMI Provider processes malformed input incorrectly while preserving existing behavior for valid input.
support.microsoft.com -
4.
This fix addresses an issue that affects the security and reliability of SQL Server Agent under specific operating conditions.
support.microsoft.com -
5.
This fix addresses a security vulnerability in Microsoft Entra authentication login handling in SQL Server.
support.microsoft.com -
6.
This fix addresses the internal validation of backup metadata that's processed by the SQL Server Volume Shadow Copy Service (VSS) Writer to improve the handling of malformed or undersized metadata and ensure that it's rejected safely.
support.microsoft.com -
7.
This fix addresses arithmetic overflow and out-of-bounds memory access issues in the SQL Server LEFT_SHIFT and RIGHT_SHIFT functions if these functions process specially crafted shift values or binary inputs.
support.microsoft.com -
8.
This fix addresses a security issue in SQL Server by updating how SQL Server processes and outputs certain internal event data to help protect information.
support.microsoft.com -
9.
This fix addresses a buffer overflow that occurs during an authenticated Tabular Data Stream (TDS) remote procedure call (RPC) and causes the SQL Server process to terminate unexpectedly.
support.microsoft.com -
10.
This fix addresses an issue that affects the reliability and security of SQL Server Agent if it processes specific input.
support.microsoft.com -
11.
This fix addresses a vulnerability that affects the SQL Server managed backup to the Microsoft Azure stored procedures, managed_backup.sp_get_encryption_option and managed_backup.sp_do_backup.
support.microsoft.com -
12.
This fix addresses a security issue in SQL Server in which insufficient validation in Extended Events can cause memory corruption.
support.microsoft.com -
13.
This fix resolves several security vulnerabilities that allow information disclosure or a denial of service if the database engine reads a specially crafted Extended Events (.xel) file.
support.microsoft.com -
14.
This fix addresses a remote code execution vulnerability in which a user who has administrative permissions modifies PolyBase service command-line parameters to activate a deprecated feature
support.microsoft.com -
15.
This fix addresses an XML data type handling bug in Document Type Definition (DTD) attribute lists.
support.microsoft.com -
16.
This fix addresses identifier handling and input validation in replication stored procedures to ensure that supplied and stored values are processed correctly.
support.microsoft.com -
17.
This fix addresses replication stored procedures that incorrectly process identifiers that contains longer or special characters.
support.microsoft.com -
18.
This fix addresses replication stored procedures that incorrectly process identifiers that contain special characters.
support.microsoft.com -
19.
This fix addresses input validation for a merge replication metadata stored procedure to ensure that supplied values are processed reliably.
support.microsoft.com -
20.
This fix addresses a replication stored procedure that handles a caller-supplied path value.
support.microsoft.com -
21.
This fix addresses input validation for parameters that are used by replication stored procedures to ensure that supplied values are processed reliably.
support.microsoft.com -
22.
This fix addresses an issue where the SUBSTRING function reads beyond the allocated buffer if a natively compiled In-Memory Online Transaction Processing (OLTP) procedure processes malformed double-byte character set (DBCS) varchar input.
support.microsoft.com -
23.
This fix addresses an issue in which converting or truncating an NVARCHAR value that contains an Ideographic Variation Sequence (IVS) under a Variation Selector Sensitive (_VSS) collation causes an access violation.
support.microsoft.com -
24.
This fix addresses an issue in which a natively compiled stored procedure causes a heap buffer overwrite while streaming nvarchar(max) data with SET TEXTSIZE truncation under a Variation Selector Sensitive (_VSS) collation.
support.microsoft.com -
25.
This fix addresses an error condition that causes an incorrectly formatted error message.
support.microsoft.com -
26.
This fix addresses an improper input validation issue in SQL Server that allows an authenticated user to disclose a limited amount of memory.
support.microsoft.com -
27.
This fix addresses an integer overflow in the SQL Server XML reader that occurs if SQL Server processes a specially crafted XML format file through OPENROWSET(BULK...) or BULK INSERT.
support.microsoft.com -
28.
This fix addresses an access violation that occurs if SQL Server processes a query with an extremely large OPTION (USE PLAN) XML declaration.
support.microsoft.com -
29.
Fixes an issue in which the data_sensitivity_information field is not consistently populated in audit records that are generated by SCHEMA_OBJECT_ACCESS_GROUP.
support.microsoft.com -
30.
This fix addresses an issue in which the class ID lookup call reads arbitrary memory.
support.microsoft.com -
31.
This fix addresses an improper input validation issue in SQL Server that allows an authenticated user to disclose in-memory information.
support.microsoft.com -
32.
This fix addresses an improper input validation issue in SQL Server in which an authenticated user can provide a pointer that SQL Server dereferences and reads but does not execute.
support.microsoft.com -
33.
This fix addresses improper field offset validation in the SqlDataRecord.SetBytes API for sql_variant values.
support.microsoft.com -
34.
This fix addresses an issue that affects the protection of internal replication data during processing operations.
support.microsoft.com -
35.
This fix addresses an issue in Merge Replication that affects the handling of text data during processing operations.
support.microsoft.com -
36.
This fix addresses an issue in replication operations that affects validation and handling to enhance security and reliability.
support.microsoft.com -
37.
This fix addresses an issue in Change Event Streaming (CES) that prevents event deserialization if event data payloads contain certain characters.
support.microsoft.com -
38.
This fix addresses SQL dump files that might be created during data serialization when Change Event Streaming is used to stream large object (LOB) data.
support.microsoft.com -
39.
This fix improves the validation of responses from S3-compatible external storage endpoints during external data access.
support.microsoft.com -
40.
This fix improves internal validation and security checks for SQL Server replication stored procedures to ensure that replication operations are processed by using the expected security safeguards.
support.microsoft.com -
41.
This fix strengthens Object Store Format (OSF) deserialization against malformed or malicious stream data.
support.microsoft.com -
42.
This fix adds bounds validation for embedded attestation fields.
support.microsoft.com -
43.
This fix strengthens Object Store Format (OSF) deserialization against malformed or malicious stream data.
support.microsoft.com -
44.
This fix strengthens buffer length validation checks within enclave code.
support.microsoft.com -
45.
This fix improves the handling of input to Showplan to enhance security and reliability.
support.microsoft.com -
46.
This update includes security and reliability improvements for the Queued Updating Subscriptions in Transactional Replication.
support.microsoft.com -
47.
This update includes security and reliability improvements for the Queued Updating Subscriptions in Transactional Replication.
support.microsoft.com -
48.
Linked server queries that use the
support.microsoft.comMSDASQL(OLE DB Provider for ODBC Drivers) provider and specify a provider string (@provstr) fail and return the following error message: -
49.
Enable trace flag 4696 to opt out of the code change that causes this issue.
support.microsoft.com
Checked automatically: 8 of 8 checks passed, 49 quoted passages · compared with Microsoft's page on Nov 8, 2026
- Quotes found in the official pages: passed
- Numbers found in the sources: passed
- Vulnerabilities from the dossier only: passed
- Links to allowed domains only: passed
- Every official change covered: passed
- Readable plain text: passed
- Changes confirmed by the file list: passed
- Sources agree: passed
A second AI read the text against the sources: correctness 4/5, clarity 4/5, completeness 5/5. How we work
Published by The Update Bureau. Written with AI from Microsoft's own documents, checked by rules and a second AI. How we work · Report a mistake