May 3, 2026·6 min read·115 visits
An integer overflow in the Windows SMBv3 decompression routine leads to a kernel heap buffer overflow, allowing unauthenticated remote attackers to execute arbitrary code as SYSTEM via port 445.
CVE-2020-0796 is a critical remote code execution (RCE) vulnerability in the Microsoft Server Message Block 3.1.1 (SMBv3) protocol. The flaw resides in the way the SMBv3 protocol handles certain compression requests within the srv2.sys kernel driver, allowing an unauthenticated attacker to execute arbitrary code with SYSTEM privileges.
The Server Message Block 3.1.1 (SMBv3) protocol introduced a new feature for compressing data payloads, designed to optimize data transfer across networks. This compression capability is handled within the Windows kernel by the SMB server driver, srv2.sys. The vulnerability, tracked as CVE-2020-0796, is an integer overflow flaw present in the decompression routines of this driver.
The vulnerability manifests when the server processes incoming network packets containing the SMB2_COMPRESSION_TRANSFORM_HEADER. Because the protocol handles compression pre-authentication, the affected code path is fully accessible to any unauthorized network user. This architectural design makes the vulnerability wormable, allowing lateral movement without credentials.
Successful exploitation results in arbitrary code execution within the context of the Windows kernel (SYSTEM). Consequently, an attacker can fully compromise the target system, install persistent malware, or pivot to other machines on the network. The flaw affects Windows 10 and Windows Server versions 1903 and 1909, as earlier versions lack the SMBv3 compression feature.
The root cause of CVE-2020-0796 resides in the Srv2DecompressData function within the srv2.sys driver. When an SMBv3 client sends a compressed packet, it prefixes the payload with an SMB2_COMPRESSION_TRANSFORM_HEADER. This header includes several fields, notably the OriginalCompressedSegmentSize (the expected uncompressed size) and an Offset value indicating where the data begins.
The vulnerability is a classic integer overflow triggered by the summation of the OriginalCompressedSegmentSize and Offset fields. Both variables are supplied as unsigned 32-bit integers directly from the network packet without prior bounds checking. If an attacker crafts a packet where the sum of these two values exceeds the maximum 32-bit integer limit (0xFFFFFFFF), the arithmetic operation wraps around, resulting in a significantly smaller value.
The srv2.sys driver subsequently uses this wrapped-around, undersized value as the size argument for a memory allocation call via SrvNetAllocateBuffer. The system successfully allocates the small buffer on the kernel heap. However, the subsequent decompression routine (such as LZNT1) relies on the original, unmodified OriginalCompressedSegmentSize field to determine how much data to write.
As the decompression routine executes, it extracts the payload and writes it into the undersized buffer. Because the uncompressed data is larger than the allocated space, the write operation continues past the buffer boundaries. This causes a severe heap-based buffer overflow, overwriting adjacent kernel memory structures.
Exploiting this heap-based buffer overflow requires manipulating the kernel heap layout to achieve reliable code execution. An attacker initiates the attack by sending an SMB2 Negotiate Protocol Request to port 445, signaling support for compression. The server acknowledges this, establishing a session where compressed payloads are accepted.
The attacker then transmits a specially crafted payload with the malicious SMB2_COMPRESSION_TRANSFORM_HEADER. The goal is to position sensitive kernel data structures adjacent to the undersized buffer allocated by SrvNetAllocateBuffer. By controlling the contents of the compressed payload, the attacker dictates the exact bytes written during the overflow.
Reliable remote code execution relies on overwriting function pointers or executing a data-only attack against token privileges. If the heap grooming fails or the overwritten memory contains critical operational data, the srv2.sys driver will crash. This crash results in a system-wide bug check, commonly known as a Blue Screen of Death (BSOD), rendering the system unavailable.
In addition to the remote attack vector, a local privilege escalation (LPE) vector exists. A low-privileged local user can construct the same malicious packet and transmit it to the local SMB client component. This achieves the same integer overflow and subsequent buffer overflow, elevating the local process privileges to SYSTEM.
The security impact of CVE-2020-0796 is absolute system compromise. Execution context occurs at the kernel level (Ring 0), bypassing all user-mode security boundaries. The CVSS v3.1 score of 10.0 reflects the worst-case scenario: unauthenticated, remote, low-complexity exploitation with complete loss of confidentiality, integrity, and availability.
The vulnerability is designated as wormable. Network-based exploitation requires zero user interaction and exploits a protocol (SMB) that is ubiquitous in enterprise environments. An exploit payload can independently identify and infect adjacent vulnerable hosts, facilitating rapid propagation akin to the WannaCry or NotPetya campaigns.
The Exploit Prediction Scoring System (EPSS) assigns this vulnerability a score of 0.94408, placing it in the 99.98th percentile. This metric indicates near-certain exploitation activity in the wild. Furthermore, the Cybersecurity and Infrastructure Security Agency (CISA) has added CVE-2020-0796 to its Known Exploited Vulnerabilities (KEV) catalog, confirming active utilization by threat actors, including ransomware operators.
Remediation primarily requires applying the out-of-band security updates released by Microsoft on March 12, 2020, or any subsequent cumulative updates. These patches correct the arithmetic logic in Srv2DecompressData by implementing safe integer math operations. The patched driver explicitly validates that the addition of OriginalCompressedSegmentSize and Offset does not overflow before allocating memory.
For systems where immediate patching is strictly impossible, administrators must implement the official workaround. Disabling SMBv3 compression prevents the vulnerable code path from being reached. This is achieved via a PowerShell command that creates a specific registry key.
# Disable SMBv3 Compression (does not require a reboot)
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" DisableCompression -Type DWord -Value 1 -ForceApplying this registry change takes effect immediately without requiring a system reboot. However, this workaround does not protect the SMB client component from the local privilege escalation vector. Local unprivileged users can still exploit the flaw to gain SYSTEM access unless the system is fully patched.
Network perimeter defense forms the final layer of mitigation. Administrators must ensure TCP port 445 is blocked at the edge firewall, preventing inbound SMB connections from the internet. Intrusion Detection Systems (IDS) utilizing Snort or Suricata rules should be deployed to monitor internal traffic for the \xfcSMB header combined with anomalous length fields.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H| Product | Affected Versions | Fixed Version |
|---|---|---|
Windows 10 Microsoft | 1903 | - |
Windows 10 Microsoft | 1909 | - |
Windows Server Microsoft | 1903 | - |
Windows Server Microsoft | 1909 | - |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-119 |
| Attack Vector | Network |
| CVSS Score | 10.0 (Critical) |
| EPSS Score | 0.94408 |
| Impact | Unauthenticated Remote Code Execution as SYSTEM |
| Exploit Status | Weaponized |
| CISA KEV | Listed |
Improper Restriction of Operations within the Bounds of a Memory Buffer
CVE-2026-118750 is an uncontrolled resource allocation vulnerability (CWE-770) affecting the Microsoft.AspNetCore.WebUtilities component in ASP.NET Core. Specifically, the FileBufferingReadStream class eagerly allocates large memory buffers from the shared ArrayPool<byte> inside its constructor prior to reading any incoming request payload data. An unauthenticated remote attacker can exploit this behavior by opening numerous concurrent connections and stalling or omitting request body transmission, exhausting shared memory pools and causing a server-wide Denial of Service (DoS).
CVE-2026-114155 is a local elevation of privilege vulnerability affecting Microsoft .NET on Linux and macOS platforms. The vulnerability exists within the dotnet-watch (Hot Reload) component and is caused by a Time-of-Check Time-of-Use (TOCTOU) race condition (CWE-367) during the generation and execution of temporary XML solution files (.slnx) in shared system temporary directories. A local attacker with low privileges can intercept and modify the temporary solution file before MSBuild evaluates it, achieving arbitrary code execution in the security context of the user running dotnet-watch.
CVE-2026-118748 is a remote Denial of Service (DoS) vulnerability in Microsoft ASP.NET Core (.NET 11.0 preview releases prior to 11.0.0) and Microsoft Visual Studio 2026 (prior to 18.12.0). The flaw originates from unbounded resource allocation (CWE-770) within the Blazor static server-side rendering (static-SSR) validation pipeline, where dynamic or attacker-supplied form field identifiers are cached in a singleton-scoped memory structure without size limits or eviction policies. Unauthenticated remote attackers can exploit this condition over the network by sending repeated HTTP requests with unique field names, exhausting heap memory and terminating the host process via an unhandled OutOfMemoryException.
CVE-2026-114150 is a network-accessible information disclosure vulnerability affecting Microsoft ASP.NET Core in .NET 11.0 preview releases and Microsoft Visual Studio 2026 prior to version 18.12.0. The flaw stems from the use of uninitialized resources (CWE-908) within response buffering components, specifically ResponseBufferingStream used by middleware such as HTTP Logging and Output Caching. Because rented memory segments from ArrayPool<byte> or MemoryPool<byte> are not cleared upon return or strictly bounded to the exact written byte count during subsequent reads, residual response payloads from earlier HTTP requests remain in the buffer tail. Downstream consumers or log sinks reading these buffers expose confidential cross-session data, including authentication tokens and personally identifiable information.
An incorrect authorization vulnerability (CWE-863) exists in the ASP.NET Core SignalR HTTP Connection Dispatcher (`Microsoft.AspNetCore.Http.Connections`). The connection negotiation process failed to bind the authenticated caller identity to the generated connection state, and subsequent transport or message dispatch handlers failed to verify caller consistency. Consequently, an authenticated low-privilege attacker who obtains a valid connection identifier or token can inject messages into or hijack another user's SignalR session, achieving an elevation of privilege across security boundaries.
CVE-2026-109478 is a network-accessible Denial of Service (DoS) vulnerability in ASP.NET Core caused by inefficient algorithmic complexity (CWE-407) when parsing comma-separated HTTP request headers. Prior to the patch, the internal helper method ParsingHelpers.GetHeaderSplit repeatedly called StringValues.Concat inside a loop iterating over each comma-separated token. Because StringValues allocates a new array of size k + 1 and copies all existing elements upon each concatenation, processing N tokens incurs O(N^2) time and space complexity. An unauthenticated remote attacker can send HTTP requests with headers containing thousands of short, comma-separated values to exhaust CPU cycles and induce severe Garbage Collection (GC) pauses, rendering the web application unresponsive.