Skip to content
RCE Advisory Advanced CVE-2026-118112

Microsoft SQL Server Elevation of Privilege Vulnerability (CVE-2026-118112)

SQL Server contains a code injection flaw where an authenticated user who can create or modify database objects can plant crafted content in a database. When a separate administrator later runs an affected administrative operation that processes that content, the attacker's code could execute with elevated privileges.

Le Nguyen Khang Follow

Originally disclosed on Microsoft

High 8.0 View original

Description

Improper control of generation of code ('code injection') in SQL Server allows an authorized attacker to elevate privileges over a network.

FAQ

I am running SQL Server on my system. What action do I need to take? Update your relevant version of SQL Server using the applicable November 2026 security update listed below. 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, see Microsoft Knowledge Base Article 321185 - How to determine the version, edition, and update level of SQL Server and its components. Second, locate the range containing your current version number in the following table. The corresponding update is the one you need to install. Note: If your version is not represented in the table, review the applicable update's prerequisites and the support status of your SQL Server release before choosing an update. Absence from this table alone does not establish that a version is unsupported. Update Number Title Version Apply if current product version is… This security update also includes servicing releases up through… 5129299 SQL Server 2025 CU10+GDR (November GDR 2026) 17.0.5045.3 17.0.4006.2 - 17.0.5035.5 KB5125471 - SQL2025 RTM CU10 5132748 SQL Server 2025 RTM+GDR (November GDR 2026) 17.0.1155.3 17.0.1000.7 - 17.0.1145.4 KB5128492 - Previous SQL2025 RTM GDR 5129300 SQL Server 2022 CU27+GDR2 (November GDR 2026) 16.0.4315.2 16.0.4003.1 - 16.0.4305.5 KB5126934 - SQL2022 RTM CU27 GDR 5132747 SQL Server 2022 RTM+GDR (November GDR 2026) 16.0.1220.3 16.0.1000.6 - 16.0.1210.3 KB5128493 - Previous SQL2022 RTM GDR 5132745 SQL Server 2019 CU32+GDR (November GDR 2026) 15.0.4510.2 15.0.4003.23 - 15.0.4500.2 KB5128494 - Previous SQL2019 RTM CU32 GDR 5132751 SQL Server 2019 RTM+GDR (November GDR 2026) 15.0.2210.4 15.0.2000.5 - 15.0.2200.2 KB5128495 - Previous SQL2019 RTM GDR 5132746 SQL Server 2017 CU31+GDR (November GDR 2026) 14.0.3570.2 14.0.3006.16 - 14.0.3560.2 KB5128496 - Previous SQL2017 RTM CU31 GDR 5132749 SQL Server 2017 RTM+GDR (November GDR 2026) 14.0.2150.2 14.0.1000.169 - 14.0.2140.2 KB5128497 - Previous SQL2017 RTM GDR What are the GDR and CU update designations and how do they differ? General Distribution Release (GDR) updates provide security and other broadly applicable critical fixes. Cumulative Updates (CUs) include accumulated fixes for the applicable SQL Server release. Use the version ranges above to select the security update for your installed servicing branch; CU+GDR updates apply to the listed CU branch, while RTM+GDR updates apply to the listed RTM/GDR branch.

FAQ

How could an attacker exploit this vulnerability? An authenticated attacker with permission to create or modify database objects could prepare specially crafted content in an affected database. A separate administrator must perform the affected administrative operation that processes this content. Successful exploitation could allow the attacker to run database commands with elevated privileges.

SQL Server

SQL Server

Microsoft

Microsoft

Customer Action Required

Yes

The original report as published on the Microsoft Security Response Center, by Le Nguyen Khang (hacnho) with VCCorp. Images and videos are our own copies; raw HTML is shown as text. View it on Microsoft Security Response Center.

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, the administrative operation that processes database object content does not properly separate or validate that content before generating and running code from it.

Impact

An authenticated attacker could run database commands with elevated privileges, but only if a separate administrator performs the affected administrative operation on the crafted content.

What the attacker needed

Authenticated database account; permission to create or modify objects; admin runs affected operation

The fix

It was fixed by installing the applicable November 2026 security update for the relevant 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 that stores and organises data. This flaw means a user who is allowed to add or change items inside a database can leave something booby-trapped there. Later, when an administrator performs a routine task that reads that content, the trap could run commands with the administrator's higher powers.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

More by Le Nguyen Khang

View all

7 more disclosed reports, best first.

More from Microsoft

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.