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·8 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

•about 1 hour ago•GHSA-2G6R-C272-W58R
3.7

CVE-2026-26013: Server-Side Request Forgery in LangChain Image Token Counting

Prior to version 1.2.11, the LangChain LLM framework is affected by a Server-Side Request Forgery (SSRF) vulnerability inside its image token counting mechanism. Specifically, the ChatOpenAI.get_num_tokens_from_messages() method retrieves arbitrary image_url values from user prompts without validating the destination host or IP address. Attackers can exploit this issue to scan internal infrastructure, access local services, or harvest credentials from cloud metadata services.

Alon Barad
Alon Barad
2 views•6 min read
•about 1 hour ago•GHSA-8MV7-9C27-98VC
5.1

GHSA-8mv7-9c27-98vc: Cross-Site Request Forgery (CSRF) Bypass in Astro/Hono Composable Pipeline

A security vulnerability was identified in the Astro web framework's composable integration pipeline with Hono. Due to the structural coupling of CSRF origin validation exclusively within the `middleware()` primitive, applications assembling their routing pipeline manually could execute state-mutating actions before or entirely without origin validation. This flaw allows attackers to execute blind, write-only Cross-Site Request Forgery (CSRF) attacks against state-mutating Astro Actions or endpoints on behalf of authenticated users.

Amit Schendel
Amit Schendel
2 views•7 min read
•about 1 hour ago•CVE-2008-4128
9.3

CVE-2008-4128: Multiple Cross-Site Request Forgery Vulnerabilities in Cisco IOS HTTP Administration

Multiple cross-site request forgery (CSRF) vulnerabilities in the HTTP Administration component in Cisco IOS 12.4 on the 871 Integrated Services Router allow remote attackers to execute arbitrary commands via crafted HTTP requests. This occurs because the web administrative server fails to validate request origins or use anti-CSRF tokens, allowing an attacker to abuse an active administrative session.

Alon Barad
Alon Barad
4 views•7 min read
•about 2 hours ago•GHSA-F283-GHQC-FG79
5.3

GHSA-f283-ghqc-fg79: Denial of Service via Unbounded Cookie Jar Resource Exhaustion in Guzzle

An unbounded resource allocation vulnerability exists in Guzzle's cookie parsing and storage engine. Prior to version 7.15.1, Guzzle did not restrict the number or size of cookies stored within the client-side CookieJar. This lack of boundary control allows a malicious server or an intermediary proxy to poison the cookie storage with oversized or excessive Set-Cookie headers. When the client subsequently targets sibling domains or legitimate services using the same cookie jar, it transmits exceptionally large Cookie headers, triggering upstream protocol violations and resulting in Denial of Service (HTTP 431 / HTTP 400 rejection).

Amit Schendel
Amit Schendel
4 views•6 min read
•about 3 hours ago•GHSA-WM3W-8RRP-J577
7.5

GHSA-WM3W-8RRP-J577: Host-Only Cookie Scope Exposure in Guzzle Cookie Jar

An information disclosure vulnerability in guzzlehttp/guzzle allows host-only cookies to be incorrectly matched and sent to subdomains. Because Guzzle failed to track whether cookies were defined without a Domain attribute, it evaluated host-only cookies using standard domain-suffix rules, widening their scope and exposing sensitive session tokens to untrusted subdomains.

Alon Barad
Alon Barad
5 views•6 min read
•about 4 hours ago•GHSA-H95V-H523-3MW8
5.9

GHSA-H95V-H523-3MW8: Sensitive URI Fragment Disclosure via Referer Headers in Guzzle HTTP Client

An issue in Guzzle's RedirectMiddleware allows client-side URI fragments to be leaked over the network in Referer headers during same-scheme HTTP redirects.

Amit Schendel
Amit Schendel
5 views•6 min read