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-33120
8.80.06%

CVE-2026-33120: Remote Code Execution via Untrusted Pointer Dereference in Microsoft SQL Server

Alon Barad
Alon Barad
Software Engineer

Apr 16, 2026·7 min read·4 visits

No Known Exploit

Executive Summary (TL;DR)

An untrusted pointer dereference in Microsoft SQL Server 2022 allows authorized, low-privileged attackers to achieve remote code execution via the network. Successful exploitation results in arbitrary code execution under the SQL Server service account context.

Microsoft SQL Server 2022 contains an untrusted pointer dereference vulnerability (CWE-822) that permits an authenticated, low-privileged attacker to execute arbitrary code within the context of the SQL Server service. This network-exploitable flaw carries a CVSS score of 8.8 and is patched in the April 2026 Security Updates.

Vulnerability Overview

Microsoft SQL Server 2022 exposes a remote code execution vulnerability identified as CVE-2026-33120. The flaw resides within the core database engine's processing of incoming client requests. An attacker with low-level database privileges can exploit this vulnerability over the network to execute arbitrary instructions on the host system.

The vulnerability is classified as an Untrusted Pointer Dereference (CWE-822). This class of weakness occurs when an application accepts a memory address from an untrusted source and attempts to read from or write to that address without proper validation. In the context of SQL Server, the engine improperly trusts client-supplied data as a legitimate pointer during specific transaction handling.

Exploitation of this vulnerability requires prior authentication. The attacker must possess a valid login to the SQL Server instance, though high-level administrative permissions are not necessary. The attack vector relies on sending specialized payloads via the Tabular Data Stream (TDS) protocol or crafted T-SQL commands.

The security impact is substantial despite the authentication requirement. Code execution occurs within the security context of the SQL Server service account, typically NT SERVICE\MSSQLSERVER. This level of access enables total compromise of the database engine, unauthorized access to all hosted data, and facilitates lateral movement across the internal network.

Root Cause Analysis

The fundamental flaw in CVE-2026-33120 stems from a failure to validate memory boundary constraints when processing user-controlled integer values. The SQL Server engine incorrectly casts specific input parameters directly into memory pointers. When these parameters are manipulated by an attacker, the engine attempts to access memory regions outside its intended scope.

Native C++ database engines often use memory pointers for performance optimization during data structure traversal. When processing complex requests, the engine parses incoming TDS packets into internal memory structures. The parser fails to verify if the address fields supplied within certain crafted requests point to valid, allocated memory segments belonging to the current session.

When the unvalidated pointer is dereferenced for a read or write operation, the resulting behavior is determined by the specific memory address supplied. An invalid address results in an immediate access violation and service termination. A carefully calculated address allows the attacker to corrupt adjacent memory structures, manipulate execution flow, and hijack instruction pointers.

The vulnerability requires specific internal state conditions to trigger the vulnerable code path. The engine must route the attacker's request through the subsystem responsible for handling the unvalidated parameter, which is accessible via standard authorized connections.

Mechanism & Conceptual Code Analysis

Microsoft SQL Server is a closed-source application, precluding direct analysis of the proprietary source code. However, the mechanics of CWE-822 in native database engines follow a consistent architectural pattern. The vulnerability typically occurs during the deserialization of complex binary structures from the network layer.

The following conceptual C++ snippet illustrates the core mechanism of the untrusted pointer dereference vulnerability. The code demonstrates how an unvalidated integer from an incoming request packet is unsafely cast to a data structure pointer.

// Conceptual representation of the vulnerable mechanism
void ProcessClientRequest(byte* tds_packet, size_t length) {
    // Extract client-controlled integer from the packet
    uint64_t raw_address = ExtractQWord(tds_packet, OFFSET_PARAMETER);
    
    // VULNERABILITY: Unsafe cast of unvalidated input to a pointer
    InternalTransactionData* tx_data = reinterpret_cast<InternalTransactionData*>(raw_address);
    
    // Dereference operation utilizing the attacker-controlled pointer
    if (tx_data->status == STATUS_ACTIVE) { 
        ExecuteTransactionCallback(tx_data->callback_ptr);
    }
}

In the patched version, the software must implement strict boundary checks and address validation. The remediation typically involves utilizing memory-safe handles or indices instead of raw pointers. If direct memory access is required, the address must be validated against a strict allowlist of allocated regions for the current process.

// Conceptual representation of the patched mechanism
void ProcessClientRequestPatched(byte* tds_packet, size_t length) {
    uint64_t handle_id = ExtractQWord(tds_packet, OFFSET_PARAMETER);
    
    // FIX: Look up the object via a secure mapping rather than raw cast
    InternalTransactionData* tx_data = SecureHandleLookup(handle_id);
    
    if (tx_data == nullptr) {
        RejectRequest();
        return;
    }
    
    if (tx_data->status == STATUS_ACTIVE) {
        ExecuteTransactionCallback(tx_data->callback_ptr);
    }
}

This architectural change mitigates the vulnerability by breaking the direct mapping between client-supplied data and system memory addresses. The application now controls the memory dereference entirely internally.

Exploitation Methodology

Exploiting CVE-2026-33120 requires a sequence of precise technical steps. The attacker must first establish a network connection to the SQL Server instance over TCP port 1433 (default) or the configured alternative. An active, authenticated session must be negotiated using valid credentials, such as a compromised service account or a low-privileged application user.

Once authenticated, the attacker constructs a specialized payload designed to reach the vulnerable code path. This payload typically takes the form of a malformed TDS packet or a specific sequence of T-SQL commands that trigger the internal subsystem responsible for the unvalidated pointer dereference. The payload contains memory addresses calculated to align with the database engine's internal memory layout.

Achieving reliable remote code execution via an untrusted pointer dereference involves bypassing modern memory protections. The attacker must account for Address Space Layout Randomization (ASLR) and Data Execution Prevention (DEP). This is often achieved by combining the CWE-822 weakness with an information disclosure vulnerability, or by targeting specific memory regions with predictable addresses.

> [!NOTE] > At the time of analysis, no public proof-of-concept (PoC) exploit code is available for CVE-2026-33120. The Exploit Prediction Scoring System (EPSS) score remains low at 0.00062.

Upon successful memory corruption and hijack of the instruction pointer, the attacker executes a secondary payload (shellcode). This shellcode typically spawns a reverse shell or executes arbitrary system commands under the privileges of the SQL Server process. The authenticated prerequisite limits random automated exploitation but remains highly viable for targeted attacks or post-breach lateral movement.

Impact Assessment

The impact of CVE-2026-33120 is evaluated as High, reflected in its CVSS v3.1 score of 8.8. The vulnerability directly threatens the confidentiality, integrity, and availability of the affected database server. The requirement for an authenticated session is the primary factor preventing a critical 9.8 score.

The CVSS vector CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H delineates the exact severity components. The attack is executable over the network (AV:N) with low attack complexity (AC:L). It requires low privileges (PR:L) and no user interaction (UI:N). The scope remains unchanged (S:U), but the impact on confidentiality, integrity, and availability are all high (C:H/I:H/A:H).

Successful execution results in system-level compromise. Database engines typically operate with extensive access to local storage, network resources, and Active Directory domains. An attacker executing code as the SQL Server service account can extract raw database files, dump credential material from memory, and pivot to other servers within the environment.

The vulnerability is highly relevant to environments utilizing multi-tenant database architectures or applications that map individual users to specific low-privileged database roles. In such configurations, an isolated tenant could exploit the flaw to compromise the underlying infrastructure and access data belonging to other tenants.

Remediation and Mitigation Guidance

Microsoft addressed CVE-2026-33120 in the April 2026 Patch Tuesday update cycle. Organizations must apply security update KB5084815 to all affected instances of Microsoft SQL Server 2022. The patch updates the database engine to version 16.0.1175.1 across Windows, Linux, and GDR editions.

There are no known configuration workarounds to mitigate this vulnerability without applying the security update. The flaw resides in fundamental request processing logic, meaning features cannot simply be disabled to close the attack vector. Immediate deployment of the provided patch is the sole effective remediation strategy.

Defense-in-depth measures provide secondary protection against exploitation attempts. Network segmentation should restrict database access strictly to authorized application servers and administrative jump hosts. Implementing the principle of least privilege ensures that database accounts are only provisioned with the minimum necessary access, reducing the pool of credentials available to an attacker.

Security teams should monitor database query logs and network traffic for anomalous behavior. While specific IDS/IPS signatures for this precise vulnerability are not currently standardized, alerts should be configured for unusual T-SQL activity, sudden service crashes (indicative of failed memory corruption attempts), or unauthorized administrative command execution originating from low-privileged accounts.

Official Patches

MicrosoftDescription of the security update for SQL Server 2022 GDR: April 14, 2026
MicrosoftMSRC Advisory for CVE-2026-33120

Technical Appendix

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

Affected Systems

Microsoft SQL Server 2022 (GDR)Microsoft SQL Server 2022 on LinuxMicrosoft SQL Server 2022 on Windows

Affected Versions Detail

Product
Affected Versions
Fixed Version
Microsoft SQL Server 2022 (GDR)
Microsoft
16.0.0 — < 16.0.1175.116.0.1175.1
Microsoft SQL Server 2022 on Linux
Microsoft
< 16.0.1175.116.0.1175.1
Microsoft SQL Server 2022 on Windows
Microsoft
< 16.0.1175.116.0.1175.1
AttributeDetail
CWE IDCWE-822
Attack VectorNetwork (Authenticated)
CVSS v3.18.8
EPSS Score0.00062
ImpactRemote Code Execution
Exploit StatusNo Known Exploits
CISA KEVNot Listed

MITRE ATT&CK Mapping

T1190Exploit Public-Facing Application
Initial Access
T1068Exploitation for Privilege Escalation
Privilege Escalation
T1059.004Command and Scripting Interpreter: Unix Shell
Execution
CWE-822
Untrusted Pointer Dereference

The system dereferences a pointer that contains a memory address provided by an untrusted user.

Vulnerability Timeline

Vulnerability officially disclosed by Microsoft and NVD.
2026-04-14
Security update KB5084815 released by Microsoft.
2026-04-14
Zero Day Initiative publishes Patch Tuesday analysis including CVE-2026-33120.
2026-04-14

References & Sources

  • [1]MSRC Update Guide CVE-2026-33120
  • [2]Microsoft Support KB5084815
  • [3]CVE.org Record for CVE-2026-33120
  • [4]NVD Detail for CVE-2026-33120
  • [5]ZDI April 2026 Security Update Review

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.