KB5093420: Cumulative update for SQL Server 2022, CU branch, July 2026. SQL injection fix, while recovery queries can still trigger crashes
Includes 12 fixes, including a SQL injection fix. A known issue can still cause an access violation when sys.dm_exec_requests runs during database recovery.
Does it affect you? Applies to: Instances running SQL Server 2022. The cumulative update applies to all supported languages and updates only the SQL Server features installed on the instance; the page provides installation guidance for Windows and Linux.
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 7 changes
Management Services
-
An authorized attacker can no longer use a SQL injection vulnerability in
sys.sp_MSforeachdbto elevate privileges over a network.1Fixes a SQL injection vulnerability in thesys.sp_MSforeachdbstored procedure.
Maintenance Plan
-
An index rebuild maintenance plan no longer stops responding because of a long-running query.2
Fixes the maintenance plan becoming unresponsive because of a long-running query.
High Availability and Disaster Recovery
For: Windows availability group administrators
-
Monitoring queries on a secondary availability group replica no longer intermittently fail with error 976 or 978.3
Fixes intermittent failures in queries using
sys.dm_exec_requestsorsys.sysprocesseson a secondary replica.
Query Execution
-
Very large values no longer cause the new cardinality estimator's interpolation calculation to make an
ALTER INDEXoperation choose a serial plan.4Fixes interpolation in the new cardinality estimator for very large values.
Programmability
-
An access violation is fixed for a particular
ALTER PARTITION FUNCTION ... SPLIT RANGEoperation involving an identity column and a schema-bound view.5Fixes an access violation when the partition function is used by a table whose identity column is referenced by a clustered index on a schema-bound view. -
SQL Server no longer encounters a nonyielding scheduler condition when writing certain errors to the error log.6
Fixes a nonyielding scheduler condition during error-log writes.
Methods to access stored data
-
A nonyielding scheduler condition is fixed when
sys.dm_db_index_operational_statsprocesses a large number of cached heaps or B-trees.7Fixes a scheduler condition when the function iterates through many cached heaps or B-trees.
Improvements 3 changes
High Availability and Disaster Recovery
For: Windows Server Failover Cluster administrators
-
The Windows Server Failover Cluster log includes more detailed error information when the availability group resource DLL cannot retrieve diagnostic column information.8
Adds detail to the cluster log when the availability group resource DLL can't retrieve diagnostic column information.
Query Execution
-
Incremental statistics use an adjusted sampling rate when the previous rate was 100 percent and many new rows have been added.9
Adjusts the sampling rate for incremental statistics under these conditions.
Methods to access stored data
For: Windows instances using columnstore indexes
-
Memory management during columnstore query compilation is improved to reduce compilation time.10
Improves memory management during query compilation for columnstore indexes on Windows.
New feature 1 change
High Availability and Disaster Recovery
For: Availability group administrators
-
You can remove an IP address from an availability group listener with an
ALTER AVAILABILITY GROUPcommand.11Adds support forALTER AVAILABILITY GROUP ... MODIFY LISTENER ... REMOVE IP.
Removal 1 change
Universal Communication Stack
For: Windows instances
-
The deprecated RSA32Lib cryptographic library is removed as part of cryptography modernization.12
Removes RSA32Lib on Windows.
Known issues
-
Linked server queries that use MSDASQL fail with error 7416
Linked server queries that use the
MSDASQLprovider and specify a provider string (@provstr) fail with error 7416, saying that no login mapping exists.13Workaround 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_requestsmight 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 comes online.14How to apply the workaround SQL Trace FlagEnable trace flag 4696, avoid querying
sys.dm_exec_requestsfor databases that are recovering, or uninstall this update. With the trace flag enabled, queries againstsys.dm_exec_requestsorsys.sysprocesseson secondary replicas might return error 976 or 978.14 -
Incorrect behavior of SESSION_CONTEXT in parallel plans
Queries using
SESSION_CONTEXTmight return incorrect results or generate access violation dump files when they run in parallel query plans, particularly if the session is reset for reuse.15Workaround status No workaround yetMicrosoft has not published a manual workaround for this issue yet. Monitor release health until a resolving update is available.
Technical details
Data sheet · Security · Downloads · Components Click to collapse or expand
Data sheet
- Released
- 2026-07-16
- Classification
- Updates
- Type
- Cumulative update
- Servicing branch
- CU
- Restart
- Required
- Replaces
- KB5081477, KB5080999, KB5078297, KB5068450
- Replaced by
- KB5122768
| Version | Build | Channel |
|---|---|---|
| 2022 | 16.0.4265.3 | General availability |
Security
No vulnerabilities are listed for this update.
Downloads (Microsoft Update Catalog)
Updated components
199 files changed since the previous update for the same versions.
| Top changed components | Files |
|---|---|
| SQL Server Engine | 32 |
| SQL Server Replication | 12 |
| SQL Server Integration Services | 11 |
| SQL Server Agent | 5 |
| SQL Server Machine Learning Services | 4 |
| SQL Server Full-Text Search | 2 |
| SQL Server PolyBase | 2 |
Sources
Cited passages from Microsoft's official notes (15)
-
1.
Fixes a SQL injection vulnerability in the
support.microsoft.comsys.sp_MSforeachdbstored procedure that allows an authorized attacker to elevate privileges over a network. -
2.
Fixes an issue in which an index rebuild maintenance plan stops responding because of a long-running query.
support.microsoft.com -
3.
Fixes an issue in which monitoring queries that use
support.microsoft.comsys.dm_exec_requestsorsys.sysprocessesintermittently fail and return error "976" or "978" on a secondary replica in an availability group. -
4.
Fixes an issue in the interpolation calculation of the new cardinality estimator for very large values that can cause an
support.microsoft.comALTER INDEXoperation to choose a serial plan. -
5.
Fixes an access violation that occurs when you run
support.microsoft.comALTER PARTITION FUNCTION ... SPLIT RANGEagainst a partition function that's used by a table that has an identity column that's also referenced by a clustered index on a schema-bound view. -
6.
Fixes a nonyielding scheduler condition that can occur when SQL Server writes certain errors to the error log.
support.microsoft.com -
7.
Fixes a nonyielding scheduler condition that can occur if
support.microsoft.comsys.dm_db_index_operational_statsiterates through a large number of cached heaps or B-trees. -
8.
Adds more detailed error information to the Windows Server Failover Cluster log if the availability group resource DLL can't retrieve diagnostic column information.
support.microsoft.com -
9.
Adjusts the sampling rate for incremental statistics if the last sampling rate was 100 percent and many new rows are inserted into the table.
support.microsoft.com -
10.
Improves memory management during query compilation for columnstore indexes to reduce query compilation time.
support.microsoft.com -
11.
Adds support for removing an IP address from an availability group listener by using the
support.microsoft.comALTER AVAILABILITY GROUP ... MODIFY LISTENER ... REMOVE IPcommand. -
12.
Removes the deprecated RSA32Lib cryptographic library as part of ongoing cryptography modernization.
support.microsoft.com -
13.
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: -
14.
Enable trace flag 4696 to opt out of the code change that causes this issue.
support.microsoft.com -
15.
This issue occurs because of the manner in which
support.microsoft.comSESSION_CONTEXTinteracts with parallel execution threads, particularly if the session is reset for reuse.
Checked automatically: 8 of 8 checks passed, 15 quoted passages · compared with Microsoft's page on Oct 16, 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 5/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