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-35433
7.30.12%

CVE-2026-35433: Heap-Based Buffer Overflow and Privilege Escalation in .NET Desktop Runtime

Amit Schendel
Amit Schendel
Senior Security Researcher

May 18, 2026·8 min read·2 visits

No Known Exploit

Executive Summary (TL;DR)

A local attacker can trigger a heap buffer overflow in .NET Desktop Runtime (WinForms/WPF) by supplying malformed resource files or serialized payloads, potentially resulting in code execution and privilege escalation.

CVE-2026-35433 is a high-severity Elevation of Privilege (EoP) vulnerability affecting the .NET Desktop Runtime. The flaw originates from a heap-based buffer overflow in the Windows Forms and WPF components due to improper input validation and integer overflow during binary data parsing. Successful exploitation allows a local attacker to execute arbitrary code with the privileges of the compromised application.

Vulnerability Overview

CVE-2026-35433 identifies a critical weakness within the native layer of the .NET Desktop Runtime, specifically targeting components utilized by Windows Forms (WinForms) and Windows Presentation Foundation (WPF). The vulnerability is formally classified as CWE-122 (Heap-based Buffer Overflow), which is directly facilitated by preceding failures in input validation (CWE-20) and arithmetic safety (CWE-190). The affected subsystems are responsible for parsing and instantiating structured binary data, such as UI resources and serialized .NET Remoting Binary Format (NRBF) streams.

The core issue surfaces when the runtime processes length-prefixed data structures originating from untrusted sources. Native libraries, likely including wpfgfx_cor3.dll or Microsoft.Private.Winforms.dll, extract integer fields from the input stream to determine memory allocation requirements. The runtime fails to validate these extracted integers against the actual stream boundaries or safe operational limits before utilizing them in memory allocation formulas.

The Common Vulnerability Scoring System (CVSS v3.1) evaluates this flaw at 7.3 (High Severity). Exploitation mandates a local attack vector and requires explicit user interaction, meaning the victim must manually open a crafted file or initiate an application that consumes the malicious payload. Successful exploitation corrupts the native heap, granting the attacker the ability to execute arbitrary code within the context of the running application, which leads to privilege escalation if the application operates with elevated system rights.

Root Cause Analysis

The vulnerability stems from the processing of unstructured external data streams at the boundary between managed .NET code and native UI rendering libraries. When the .NET runtime loads a resource file (such as .resx or .ico) or deserializes an NRBF payload, it frequently offloads the processing of complex graphical or structural components to native C++ libraries. These native components expect well-formed length-prefixed data blocks.

The parsing routine extracts a 32-bit integer representing the 'count' of elements to follow in the stream. To allocate a buffer large enough to hold these elements, the native code multiplies this count by the known size of a single element structure (e.g., count * sizeof(ElementStruct)). Because the count integer is directly controlled by the attacker and the runtime enforces no upper bounds check, supplying an artificially large value induces an integer overflow during this multiplication.

For example, if the structure size is 4 bytes and the attacker supplies a count of 0x40000001, the multiplication yields 0x10000004. Due to the constraints of 32-bit arithmetic or truncated register usage, the value wraps around, resulting in a required allocation size of just 0x00000004 (4 bytes). The memory allocator successfully provisions this critically undersized heap buffer.

Following the allocation, the runtime proceeds to read the elements from the stream and copy them into the newly allocated heap chunk. The copy loop executes based on the original, un-truncated count value. This operation forcefully writes data far past the 4-byte boundary of the allocated buffer, overwriting adjacent heap chunks, metadata, and resident objects with attacker-controlled data.

Code Analysis and Patch Mechanics

Analyzing the vulnerability requires examining the conceptual difference between the flawed native allocation logic and the corrected implementation introduced in the servicing updates. The vulnerable code path implicitly trusted attacker-provided integers during arithmetic operations destined for the heap allocator.

// Conceptual representation of the vulnerable native code path
HRESULT ProcessResourceStream(IStream* pStream) {
    UINT32 elementCount = 0;
    pStream->Read(&elementCount, sizeof(UINT32), NULL);
 
    // VULNERABILITY: Integer overflow occurs here if elementCount is large
    UINT32 allocationSize = elementCount * sizeof(ResourceElement);
 
    // Allocator receives undersized value (e.g., 4 bytes)
    ResourceElement* pBuffer = (ResourceElement*)HeapAlloc(GetProcessHeap(), 0, allocationSize);
 
    // Out-of-bounds write occurs during the read loop
    for (UINT32 i = 0; i < elementCount; i++) {
        pStream->Read(&pBuffer[i], sizeof(ResourceElement), NULL);
    }
}

The remediation strategy deployed by Microsoft in the .NET servicing updates relies on dependency rolls that update core libraries to utilize memory-safe abstractions and checked arithmetic. The patches strictly enforce capacity constraints before any allocation occurs.

// Conceptual representation of the patched native code path
HRESULT ProcessResourceStream(IStream* pStream) {
    UINT32 elementCount = 0;
    pStream->Read(&elementCount, sizeof(UINT32), NULL);
 
    UINT32 allocationSize = 0;
    // PATCH: Checked multiplication prevents integer overflow
    if (FAILED(UInt32Mult(elementCount, sizeof(ResourceElement), &allocationSize))) {
        return E_INVALIDARG;
    }
 
    // PATCH: Validate against maximum allowed stream size or system limits
    if (allocationSize > MAX_ALLOWED_RESOURCE_SIZE) {
        return E_BOUNDS;
    }
 
    ResourceElement* pBuffer = (ResourceElement*)HeapAlloc(GetProcessHeap(), 0, allocationSize);
    // ... stream reading proceeds safely
}

Additionally, the .NET team integrated widespread usage of ReadOnlySpan<T> across the managed interop layers. This modernization ensures that buffer bounds are explicitly tracked and verified by the managed runtime during marshalling operations, severely reducing the attack surface for similar memory corruption flaws in the future.

Exploitation Methodology

Exploiting CVE-2026-35433 requires an attacker to successfully manipulate the victim's local environment or trick the victim into executing a malicious asset. The primary delivery mechanism involves embedding the crafted payload within a seemingly benign file format natively processed by the .NET framework, such as a compiled .resx resource file, a custom application icon (.ico), or a serialized object file.

The attacker must precisely construct the malicious file to trigger the integer overflow. This involves hex-editing the length prefix fields within the structured binary format to insert the calculated overflow trigger value (e.g., 0x40000001). The remainder of the payload must contain the precise bytes intended to overwrite the adjacent heap memory.

To achieve reliable code execution, the attacker must bypass modern Windows memory mitigations, including Address Space Layout Randomization (ASLR) and Control Flow Guard (CFG). This typically requires heap grooming—manipulating the application's state to ensure that a target object containing a predictable function pointer or a virtual method table (vtable) resides immediately adjacent to the vulnerable undersized buffer.

Upon executing the out-of-bounds copy, the payload overwrites the target vtable pointer with a controlled address pointing to an attacker-controlled execution chain (such as a Return-Oriented Programming payload). When the application subsequently invokes a virtual method on the corrupted adjacent object, execution flow redirects to the attacker's shellcode, finalizing the exploitation sequence.

Impact Assessment and Scope

The concrete security impact of CVE-2026-35433 is bounded by the execution context of the application that triggers the vulnerability. Because the payload executes entirely within the compromised process space, the attacker assumes the identical permissions, token privileges, and identity of the victim application.

If the victim runs the malicious application under a standard user account, the attacker achieves local arbitrary code execution. This facilitates initial access, persistence establishment, and the potential to exfiltrate user-specific data. While severe, this baseline scenario does not immediately grant system-wide control without chaining an additional local privilege escalation exploit.

However, if the vulnerable application operates as a background service, an administrative tool, or a process explicitly elevated via User Account Control (UAC), the impact escalates drastically. In an elevated context, the attacker gains full NT AUTHORITY\SYSTEM or Administrator rights. This results in a total compromise of system confidentiality and integrity, allowing the deployment of rootkits, tampering with security software, and permanent system modification.

The Exploit Prediction Scoring System (EPSS) currently assigns this vulnerability a score of 0.00122, placing it in the 30.67th percentile. This exceptionally low probability metric correlates with the current lack of public weaponization. Developing a reliable heap exploit against modern .NET native components requires deep expertise in Windows heap internals, limiting the immediate threat to highly resourced adversaries.

Remediation and Mitigation Strategies

The definitive resolution for CVE-2026-35433 requires applying the specific servicing updates provided by Microsoft across all affected .NET environments. Organizations must update .NET 10.0 deployments to version 10.0.8, .NET 9.0 deployments to version 9.0.16, and .NET 8.0 deployments to version 8.0.27. These patches incorporate the essential bounds checking and checked arithmetic operations within the native libraries.

For legacy systems relying on older framework versions, administrators must install the cumulative updates released in or after May 2026. This applies to environments utilizing .NET Framework 3.5, 4.7.2, 4.8, and 4.8.1. Patching these legacy frameworks is critical, as they heavily utilize the vulnerable WinForms and WPF native interop components across enterprise desktop fleets.

In scenarios where immediate patching is administratively blocked, security teams should implement interim risk reduction strategies. Organizations must block the inbound delivery of untrusted .resx files, .ico files, and unknown binary-serialized objects at the email gateway and web proxy levels. Developers should audit internal applications to ensure they do not deserialize external NRBF payloads or load untrusted UI resources dynamically.

Security operations centers should enhance endpoint detection and response (EDR) telemetry to monitor for anomalous application crashes. Applications relying on WinForms or WPF that crash with specific heap corruption exception codes (e.g., 0xC0000374) require immediate forensic investigation, as these crashes serve as strong indicators of failed exploitation attempts.

Official Patches

MicrosoftMicrosoft Security Response Center Advisory for CVE-2026-35433

Fix Analysis (1)

Technical Appendix

CVSS Score
7.3/ 10
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:L
EPSS Probability
0.12%
Top 69% most exploited

Affected Systems

Windows Desktop environments running .NET applicationsSystems executing WinForms applicationsSystems executing WPF applications

Affected Versions Detail

Product
Affected Versions
Fixed Version
.NET 10.0
Microsoft
10.0.0 <= version < 10.0.810.0.8
.NET 9.0
Microsoft
9.0.0 <= version < 9.0.169.0.16
.NET 8.0
Microsoft
8.0.0 <= version < 8.0.278.0.27
.NET Framework
Microsoft
3.5, 4.7.2, 4.8, 4.8.14.8.9334.0
AttributeDetail
Primary CWECWE-122 (Heap-based Buffer Overflow)
Attack VectorLocal (User Interaction Required)
CVSS v3.1 Score7.3
EPSS Score0.00122 (30.67%)
ImpactElevation of Privilege / Arbitrary Code Execution
Exploit StatusNone (No public PoC)
CISA KEVNot Listed

MITRE ATT&CK Mapping

T1190Exploit Public-Facing Application
Initial Access
T1203Exploitation for Client Execution
Execution
T1068Exploitation for Privilege Escalation
Privilege Escalation
CWE-122
Heap-based Buffer Overflow

The runtime fails to validate a length field during the parsing of structural binary data, leading to an integer overflow and a subsequent heap-based buffer overflow.

Vulnerability Timeline

Internal fix integration began via automated dependency updates
2026-03-11
CVE-2026-35433 published by Microsoft
2026-05-12
NVD analysis completed and CVSS scores assigned
2026-05-13

References & Sources

  • [1]Microsoft Security Update Guide
  • [2]CVE.org Record
  • [3]WPF Dependency Update Commit

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.