Microsoft SQL Server Elevation of Privilege Vulnerability (CVE-2025-55227)
SQL Server contains a command injection flaw that lets an authorised attacker inject SQL code during table creation and run it with elevated privileges. Successful exploitation could grant the attacker sysadmin rights.
Originally disclosed on Microsoft
Description
Improper neutralization of special elements used in a command ('command injection') in SQL Server allows an authorized attacker to elevate privileges over a network.
FAQ
How could an attacker exploit the vulnerability? An authorized attacker could inject SQL code and run it with elevated privileges at table creation.
FAQ
What privileges could be gained by an attacker who successfully exploited the vulnerability? An attacker who successfully exploited this vulnerability could gain sysadmin privileges.
FAQ
I am running SQL Server on my system. What action do I need to take? Update your relevant version of SQL Server. Any applicable driver fixes are included in those updates. There are GDR and/or CU (Cumulative Update) updates offered for my version of SQL Server. How do I know which update to use? First, determine your SQL Server version number. For more information on determining your SQL Server version number, see Microsoft Knowledge Base Article 321185 - How to determine the version, edition, and update level of SQL Server and its components. Second, in the following table, locate your version number or the version range that your version number falls within. The corresponding update is the one you need to install. Note If your SQL Server version number is not represented in the table below, your SQL Server version is no longer supported. Please upgrade to the latest Service Pack or SQL Server product to apply this and future security updates. Update Number Title Version Apply if current product version is… This security update also includes servicing releases up through… 5065220 Security update for SQL Server 2022 CU20+GDR 16.0.4212.1 16.0.4003.1 - 16.0.4210.1 KB 5063814 - SQL2022 RTM CU20 5065221 Security update for SQL Server 2022 RTM+GDR 16.0.1150.1 16.0.1000.6 - 16.0.1145.1 KB 5063756 - Previous SQL2022 RTM GDR 5065222 Security update for SQL Server 2019 CU32+GDR 15.0.4445.1 15.0.4003.23 - 15.0.4440.1 KB 5063757 - Previous SQL2019 RTM CU32 GDR 5065223 Security update for SQL Server 2019 RTM+GDR 15.0.2145.1 15.0.2000.5 - 15.0.2140.1 KB 5063758 - Previous SQL2019 RTM GDR 5065225 Security update for SQL Server 2017 CU31+GDR 14.0.3505.1 14.0.3006.16 - 14.0.3500.1 KB 5063759 - Previous SQL2017 RTM CU31 GDR 5065224 Security update for SQL Server 2017 RTM+GDR 14.0.2085.1 14.0.1000.169 - 14.0.2080.1 KB 5063760 - Previous SQL2017 RTM GDR 5065227 Security update for SQL 2016 Azure Connect Feature Pack 13.0.7065.1 13.0.7000.253 - 13.0.7060.1 KB 5063761 - Previous SQL2016 Azure Connect Feature Pack GDR 5065226 Security update for SQL Server 2016 SP3 RTM+GDR 13.0.6470.1 13.0.6300.2 - 13.0.6465.1 KB 5063762 - Previous SQL2016 RTM GDR What are the GDR and CU update designations and how do they differ? The General Distribution Release (GDR) and Cumulative Update (CU) designations correspond to the two different servicing options in place for SQL Server baseline releases. A baseline can be either an RTM release or a Service Pack release. GDR updates – cumulatively only contain security updates for the given baseline. CU updates – cumulatively contain all functional fixes and security updates for the given baseline. For any given baseline, either the GDR or CU updates could be options (see below). If SQL Server installation is at a baseline version, you can choose either the GDR or CU update. If SQL Server installation has intentionally only installed past GDR updates, then choose to install the GDR update package. If SQL Server installation has intentionally installed previous CU updates, then choose to install the CU security update package. Note: You are allowed to make a change from GDR updates to CU updates ONE TIME. Once a SQL Server CU update is applied to a SQL Server installation, there is NO way to go back to the GDR update path. Can the security updates be applied to SQL Server instances on Windows Azure (IaaS)? Yes. SQL Server instances on Windows Azure (IaaS) can be offered the security updates through Microsoft Update, or customers can download the security updates from Microsoft Download Center and apply them manually.
SQL Server
SQL Server
Microsoft
Microsoft
Customer Action Required
Yes
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely improper neutralisation of special elements in a command, allowing injected SQL to execute with elevated privileges during table creation.
Impact
An authorised attacker could gain sysadmin privileges, giving full control over the SQL Server instance.
What the attacker needed
Authorised access to SQL Server; ability to create a table
The fix
The vulnerability was fixed by installing the relevant GDR or CU security update for the affected SQL Server version.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
SQL Server is a database program. A command injection bug means someone who can already log in can sneak extra database instructions into a normal action, here creating a table. Those extra instructions run with higher permissions than they should, potentially giving the attacker full control of the database.
What is SQL injection?
Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.