Skip to the content
The Update Bureau
SQL Server 2022 CU20 + GDR SQL Server 2022 CU20 + GDR Security update
Patch Tuesday

KB5065220

KB5065220: Security update for SQL Server 2022, CU branch, September 2025. DMV data exposure and temporal-table SQL execution flaws fixed

In short

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.

Build
16.0.4212.1
Servicing branch
CU
Security
2 fixed
Restart
Required

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
+14 earlier KB5050771, KB5048038, KB5048033, KB5046862, KB5046059, KB5041321, KB5042578, KB5038325, KB5040939, KB5036432, KB5036343, KB5033663, KB5032679, KB5033592
Replaced by
KB5068406
VersionBuildChannel
2022 16.0.4212.1 General availability

Security

2 vulnerabilities fixed
2 important
VulnerabilitySeverityCVSS
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 componentsFiles
SQL Server Engine115
SQL Server PolyBase3

Sources

Updated
Cited passages from Microsoft's official notes (2)
  1. 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. 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