CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-47296

CVE-2026-47296: Elevation of Privilege via SQL Injection in Microsoft SQL Server Internal Stored Procedures

Amit Schendel
Amit Schendel
Senior Security Researcher

Jul 20, 2026·5 min read·23 visits

Executive Summary (TL;DR)

An authenticated, low-privileged local attacker can exploit SQL command injection in SQL Server's internal administrative procedures to escalate privileges to sysadmin, gaining complete administrative control over the affected database instance.

CVE-2026-47296 is a high-severity local Elevation of Privilege (EoP) vulnerability in Microsoft SQL Server. The issue stems from the improper neutralization of special elements within internal database routines, allowing a low-privileged authenticated user to execute arbitrary database queries with the privileges of the database owner or system administrator. Microsoft has addressed this vulnerability in its July 2026 security updates.

Vulnerability Overview

Microsoft SQL Server utilizes internal stored procedures, functions, and views to perform system maintenance, metadata queries, and administrative integrations. To execute these specialized operations without granting excessive privileges to standard database users, the database engine implements context switching. These routines are designed to execute under the context of a highly privileged principal, such as the database owner (dbo) or a system administrator (sysadmin).

The vulnerability, classified under CWE-89, exists within the input validation mechanism of these administrative routines. If a low-privileged user possesses execution permissions on one of these objects, they can supply malformed parameters. The lack of structured separation between command logic and user-supplied data in the underlying routine allows input boundaries to be breached, enabling unauthorized execution of database commands.

The attack surface is exposed to any authenticated local user who can establish a database session. While typically classified as a local elevation of privilege vector, the threat model extends to multi-tenant environments, web applications utilizing shared database connections, and SaaS platforms that permit standard users to execute raw query parameters.

Root Cause Analysis

The root cause of CVE-2026-47296 resides in the insecure construction of dynamic SQL statements within administrative stored procedures. In Microsoft SQL Server, developers frequently use the WITH EXECUTE AS clause or cryptographic signatures to run routines with elevated rights. When these routines execute, SQL Server temporarily switches the execution context, granting the session the permissions of the target principal for the duration of the query execution.

The database engine relies on functions like EXEC() or sp_executesql to process commands dynamic in nature. A security boundary violation occurs when user input is concatenated directly into these execution strings. This implementation pattern fails to treat user-provided arguments as literal values, and instead parses them as executable syntax.

To trigger this vulnerability, an attacker must successfully connect to an affected SQL Server instance using valid database credentials. The attacker must then call a vulnerable system procedure and provide an input argument containing SQL command terminators and secondary payloads. When the database engine processes the concatenated string under the elevated context, it executes the secondary payload with the permissions of the elevated execution principal.

Code-Level Breakdown & Patch Analysis

The following code structures demonstrate the insecure code pattern alongside the secure, parameterized pattern implemented by the official patches.

-- Vulnerable internal stored procedure pattern
CREATE PROCEDURE sys.sp_vulnerable_metadata_helper
    @TargetTable NVARCHAR(256)
WITH EXECUTE AS OWNER -- Executes with db_owner context
AS
BEGIN
    DECLARE @DynamicSQL NVARCHAR(MAX);
    -- VULNERABILITY: Direct string concatenation of user input
    SET @DynamicSQL = N'SELECT * FROM sys.objects WHERE name = ''' + @TargetTable + N'''';
    
    -- Executes the concatenated command as the owner
    EXEC(@DynamicSQL);
END;

In the patched implementation, Microsoft removed string concatenation, replacing it with explicit parameter binding using sp_executesql. This ensures that user input is never evaluated as SQL syntax during the query compilation stage.

-- Patched stored procedure pattern
CREATE PROCEDURE sys.sp_vulnerable_metadata_helper
    @TargetTable NVARCHAR(256)
WITH EXECUTE AS OWNER
AS
BEGIN
    DECLARE @DynamicSQL NVARCHAR(MAX);
    -- FIX: Use a parameterized query structure
    SET @DynamicSQL = N'SELECT * FROM sys.objects WHERE name = @BoundTable';
    
    -- FIX: Execute with rigid parameter definition preventing injection
    EXEC sp_executesql 
        @DynamicSQL, 
        N'@BoundTable NVARCHAR(256)', 
        @BoundTable = @TargetTable;
END;

This remediation completely closes the vulnerability vector because the query planner evaluates the parameter @BoundTable strictly as a string literal. Any attempt to supply special operators or command terminators inside the parameter results in a literal string search rather than administrative execution. The fix is considered structurally complete across the affected internal routines; however, custom database applications implementing similar dynamic patterns remain vulnerable if not manually remediated.

Exploitation Methodology

An attacker with minimal permissions (such as standard database-level public role access) can initiate the privilege escalation process. The attack does not require elevated server-level configuration or non-standard engine states.

The exploit payload is injected into the target stored procedure parameter. A typical exploit string terminates the primary query logic using a single quote character, inserts the malicious command, and comments out the remainder of the generated query string.

-- Example exploitation execution block
EXEC sys.sp_vulnerable_metadata_helper 
    @TargetTable = N"test_table'; ALTER SERVER ROLE sysadmin ADD MEMBER [low_priv_user]; --";

When processed by the database engine, the resulting statement executes two distinct commands sequentially: the initial SELECT query, followed by the ALTER SERVER ROLE command. Because the entire execution occurs under the active context of OWNER, the secondary instruction succeeds, adding the attacker's database login to the highly privileged sysadmin server role.

Impact Assessment & Security Context

Successful exploitation of CVE-2026-47296 results in a complete compromise of the affected database instance. The confidentiality, integrity, and availability of all data managed by the database server are impacted.

By gaining the sysadmin role, the attacker obtains the capability to read, alter, or delete any user or system database record. Furthermore, the attacker can modify instance configurations, establish persistence mechanisms, or execute arbitrary operating system commands by enabling advanced configuration options such as xp_cmdshell (if permitted by the underlying operating system service account privileges).

Although the CVSS score is 7.8 due to the local attack vector and prerequisite database authentication, the real-world risk is elevated in multi-tenant environments. In such architectures, multiple application frontends or customers share physical database instances, meaning a compromise of a single low-privileged account leads to total host exposure.

Official Patches

MicrosoftMicrosoft Security Response Center (MSRC) Advisory and Patch Catalog

Technical Appendix

CVSS Score
7.8/ 10
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
EPSS Probability
0.23%
Top 86% most exploited

Affected Systems

Microsoft SQL Server 2016Microsoft SQL Server 2017Microsoft SQL Server 2019Microsoft SQL Server 2022Microsoft SQL Server 2025

Affected Versions Detail

Product
Affected Versions
Fixed Version
SQL Server 2025
Microsoft
>= 17.0.1000.7 and < 17.0.1125.2 (GDR)17.0.1125.2
SQL Server 2022
Microsoft
>= 16.0.1000.6 and < 16.0.1190.2 (GDR)16.0.1190.2
SQL Server 2019
Microsoft
>= 15.0.2000.5 and < 15.0.2180.2 (GDR)15.0.2180.2
SQL Server 2017
Microsoft
>= 14.0.1000.169 and < 14.0.2120.1 (GDR)14.0.2120.1
SQL Server 2016 SP3
Microsoft
>= 13.0.6300.2 and < 13.0.6500.1 (GDR)13.0.6500.1
AttributeDetail
CWE IDCWE-89 (SQL Injection)
Attack VectorLocal (Authenticated)
CVSS v3.1 Base Score7.8
EPSS Score0.00232
Impact TypePrivilege Escalation (up to sysadmin)
Exploit Statusnone (no public PoC available)
CISA KEV StatusNot Listed

MITRE ATT&CK Mapping

T1190Exploit Public-Facing Application
Initial Access
T1068Exploitation for Privilege Escalation
Privilege Escalation
CWE-89
Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')

Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')

Vulnerability Timeline

CVE-2026-47296 is officially published by Microsoft and assigned to the CVE list.
2026-07-14
Microsoft releases official security advisories and patches across GDR and CU update branches.
2026-07-14
National Vulnerability Database (NVD) analyzes and updates the CVSS scoring.
2026-07-16
EPSS scores are populated, reflecting unproven exploit maturity.
2026-07-19

References & Sources

  • [1]Microsoft Security Response Center (MSRC) Update Guide
  • [2]CVE.org Official Record
  • [3]National Vulnerability Database (NVD) Entry

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•34 minutes ago•CVE-2026-55153
7.1

CVE-2026-55153: JNDI Injection and Deserialization Gadget Abuse in mchange-commons-java

A JNDI Injection and Deserialization Gadget vulnerability exists in mchange-commons-java prior to version 0.6.0. The com.mchange.v2.naming.JavaBeanObjectFactory component permits arbitrary class instantiation and setter invocation, allowing attackers to perform Server-Side Request Forgery (SSRF) and remote class loading.

Alon Barad
Alon Barad
1 views•5 min read
•about 2 hours ago•GHSA-8RW6-P7M8-63JP
6.5

GHSA-8RW6-P7M8-63JP: Array Element-Level SELECT Permissions Leak in SurrealDB

SurrealDB versions supporting element-level SELECT permissions on arrays are vulnerable to a logical authorization bypass. Due to an index-shifting error during array filtration, restricted elements can skip permission checks and leak to unauthorized record users.

Alon Barad
Alon Barad
3 views•6 min read
•about 24 hours ago•CVE-2026-12243
7.5

CVE-2026-12243: Incomplete Path Traversal Validation and Percent-Encoding Bypass in NLTK

CVE-2026-12243 is a path traversal vulnerability in the Natural Language Toolkit (NLTK) version 3.9.4. The flaw exists because the input validation routine fails to account for percent-encoded directory traversal sequences like '..%2f' before passing them to urllib.request.url2pathname(), which decodes them into active traversal sequences.

Amit Schendel
Amit Schendel
5 views•8 min read
•1 day ago•CVE-2026-73654
8.5

CVE-2026-73654: Prototype Pollution in Trigger.dev leading to Cascading Denial of Service

CVE-2026-73654 is a high-severity prototype pollution vulnerability in Trigger.dev. The flaw occurs during the handling of run-metadata updates through the PUT /api/v1/runs/:runId/metadata endpoint. Because user-supplied keys are parsed directly by the @jsonhero/path library without sanitization, an authenticated attacker with low privileges can pollute the global Object.prototype. This causes database queries via Prisma ORM to fail validation and induces unhandled exceptions in the Prometheus metrics client, resulting in a process-wide denial of service.

Alon Barad
Alon Barad
11 views•6 min read
•1 day ago•CVE-2026-73559
6.5

CVE-2026-73559: Uncontrolled Resource Consumption in vLLM API completions

CVE-2026-73559 is an uncontrolled resource consumption vulnerability in the vLLM engine, specifically within the /v1/completions API endpoint, allowing authenticated attackers to cause application-level denial of service via unbounded prompt arrays.

Amit Schendel
Amit Schendel
10 views•5 min read
•1 day ago•CVE-2026-54526
9.9

CVE-2026-54526: Strict Template Referencing Bypass and Privilege Escalation in Argo Workflows

A critical security bypass vulnerability in Argo Workflows allows authenticated attackers with workflow submission privileges to bypass 'Strict' or 'Secure' template referencing restrictions. By injecting unvalidated fields into the nested ArtifactGC configuration, attackers can execute arbitrary pod patches, leading to host namespace escape and cluster-wide privilege escalation.

Alon Barad
Alon Barad
15 views•6 min read