KB5065220: Security update for SQL Server 2022, CU branch, September 2025. DMV data exposure and temporal-table SQL execution flaws fixed
Fixes two Important SQL Server vulnerabilities: one could expose sensitive statement text, and the other could let attackers with elevated privileges run SQL code.
Does it affect you? Applies to: SQL Server 2022 instances on Windows and Linux. To apply the update, the instance must have SQL Server 2022 or a SQL Server 2022 CU release through CU20 GDR installed; the downloadable security package is for x64.
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 2 changes
Programmability
For: SQL Server administrators and users querying other sessions
-
Statement text inspected from other sessions might contain sensitive data.1
Fixes an issue in which DMVs are used in specific scenarios to inspect the text of statements that are running in other sessions and might contain sensitive data. The issue affects Linux and Windows.
Temporal
-
Improper input validation during temporal history table cleanup could let attackers with elevated privileges run SQL code.2
Fixes improper input validation during internal temporal history table cleanup. The issue affects Linux and Windows.
Technical details
Data sheet · Security · Downloads · Components Click to collapse or expand
Data sheet
- Released
- 2025-09-09
- Classification
- Security Updates
- Type
- Cumulative update
- Servicing branch
- CU
- Restart
- Required
- Replaces
- KB5063814, KB5059390, KB5058721, KB5054531
- Replaced by
- KB5068406
| Version | Build | Channel |
|---|---|---|
| 2022 | 16.0.4212.1 | General availability |
Security
| Vulnerability | Severity | CVSS |
|---|---|---|
|
Microsoft SQL Server Elevation of Privilege Vulnerability
|
Important | 8.8 |
|
Microsoft SQL Server Information Disclosure Vulnerability
|
Important | 6.5 |
Downloads (Microsoft Update Catalog)
Updated components
145 files changed since the previous update for the same versions.
| Top changed components | Files |
|---|---|
| SQL Server Engine | 115 |
| SQL Server PolyBase | 3 |
Sources
Cited passages from Microsoft's official notes (2)
-
1.
Fixes an issue in which DMVs are used in specific scenarios to inspect the text of statements that are running in other sessions and might contain sensitive data.
support.microsoft.com -
2.
Fixes improper input validation that occurs during internal temporal history table cleanup and that enables attackers to run SQL code by having elevated privileges.
support.microsoft.com
Checked automatically: 8 of 8 checks passed, 2 quoted passages · compared with Microsoft's page on Oct 20, 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