Sep 9, 2026·7 min read·86 visits
Heap-based buffer overflow in Microsoft .NET and Visual Studio parser components allows remote code execution via a maliciously crafted project, solution, or stream file.
A heap-based buffer overflow vulnerability (CVE-2026-71328) exists within the parser component of Microsoft Visual Studio and Microsoft .NET runtimes. This vulnerability permits an unauthenticated remote attacker to execute arbitrary code with the privileges of the running application, provided they can convince a user to load a maliciously crafted project file, solution, or stream.
CVE-2026-71328 is a high-severity remote code execution vulnerability classified under CWE-122 (Heap-based Buffer Overflow). The vulnerability resides within the parser components utilized by both Microsoft Visual Studio and Microsoft .NET runtimes. These parser components are responsible for processing structured inputs, including serialized project settings, metadata formats, and external resource streams.
The attack surface is exposed whenever an application built on affected versions of the .NET runtime or an instance of the Visual Studio IDE parses untrusted workspace files or streams. Because the parsing logic is typically executed under the security context of the current user, successful exploitation can result in the execution of arbitrary commands with the privileges of that user.
This vulnerability requires user interaction to trigger, as the victim must explicitly open or import a maliciously configured asset, such as a solution file (.sln), project file (.csproj), or deserialized stream. Despite requiring user action, the overall execution complexity is classified as low because the payload does not require specialized target configurations or high-privilege preconditions to trigger the underlying memory corruption.
The root cause of CVE-2026-71328 lies in an unsafe memory copy operation into a heap-allocated buffer during stream parsing. When processing structured input data, the parser calculates the required destination buffer size using metadata read from the incoming stream header. This calculated size is used to allocate a specific block of memory on the heap.
However, the parser fails to perform adequate validation bounds checks on the actual payload length against the pre-allocated buffer size. If the stream contains a payload larger than the size specified in the header, or if the header value is manipulated to represent a small allocation size while the stream supplies a larger volume of data, a mismatch occurs.
During the parsing loop, the application performs a block-copy operation of the input bytes into the allocated heap destination. Because the loop relies on the actual stream length or a secondary marker rather than the allocated buffer bounds, the incoming data overflows the allocated heap memory. This action overwrites adjacent heap headers, object vtables, or function pointers, allowing control flow hijack when those corrupted objects are subsequently referenced or freed.
To understand the technical mechanics of the bug, consider the following representative pseudocode illustrating the vulnerable parsing implementation. The parser reads an initial length field from the untrusted stream to allocate memory, but copies data using the total available stream length without verifying the boundary limits.
// VULNERABLE IMPLEMENTATION
public void ParseMetadataStream(Stream inputStream)
{
byte[] headerBuffer = new byte[4];
inputStream.Read(headerBuffer, 0, 4);
// Read the size declared by the untrusted header
int declaredSize = BitConverter.ToInt32(headerBuffer, 0);
// Heap allocation based on the untrusted header value
byte[] targetBuffer = new byte[declaredSize];
// Vulnerable loop: copies data until EOF or stream end, ignoring targetBuffer limits
int bytesRead;
int totalBytesRead = 0;
byte[] tempBuffer = new byte[1024];
while ((bytesRead = inputStream.Read(tempBuffer, 0, tempBuffer.Length)) > 0)
{
// Unsafe memory copy that writes beyond targetBuffer bounds if stream exceeds declaredSize
Buffer.BlockCopy(tempBuffer, 0, targetBuffer, totalBytesRead, bytesRead);
totalBytesRead += bytesRead;
}
}The patch addresses this issue by strictly constraining the copying process to the lesser of the declared buffer size and the remaining space in the allocated array, while enforcing a maximum size limit on the initial allocation. Additionally, it verifies that the actual stream data does not exceed the declared buffer capacity.
// PATCHED IMPLEMENTATION
public void ParseMetadataStreamSafe(Stream inputStream)
{
byte[] headerBuffer = new byte[4];
inputStream.Read(headerBuffer, 0, 4);
int declaredSize = BitConverter.ToInt32(headerBuffer, 0);
// Enforce an upper bound ceiling on the allocation size to prevent memory exhaustion
if (declaredSize < 0 || declaredSize > MaxAllowedSize)
{
throw new InvalidDataException("Invalid metadata stream size.");
}
byte[] targetBuffer = new byte[declaredSize];
int totalBytesRead = 0;
byte[] tempBuffer = new byte[1024];
int bytesRead;
while ((bytesRead = inputStream.Read(tempBuffer, 0, tempBuffer.Length)) > 0)
{
// Check for boundary overflow before copying
if (totalBytesRead + bytesRead > targetBuffer.Length)
{
throw new InvalidDataException("Input stream data exceeds allocated buffer capacity.");
}
Buffer.BlockCopy(tempBuffer, 0, targetBuffer, totalBytesRead, bytesRead);
totalBytesRead += bytesRead;
}
}Exploitation of CVE-2026-71328 depends on client-side execution vectors, relying on user interaction to trigger the parsing code. An attacker must construct a malformed asset, such as a solution file (.sln), project file (.csproj), or serialized stream payload, that incorporates the specific structural properties needed to cause the overflow.
The attack flow operates as follows:
To achieve successful remote code execution, the heap layout must be carefully manipulated. The attacker structures the payload to overwrite the vtable pointer of a subsequent C++ object on the heap or corrupt the metadata headers managed by the heap allocator. When a virtual function of the corrupted object is invoked, control flow redirects to a gadget sequence or injected shellcode, executing within the context of devenv.exe or the affected host application.
The impact of CVE-2026-71328 is classified as High, with a CVSS v3.1 base score of 8.8. A successful compromise leads to complete loss of confidentiality, integrity, and availability within the execution context of the vulnerable host process. Because developer machines frequently hold high-privilege access to source control systems, cloud environments, and internal networks, compromising a developer workspace represents a significant entry point for supply-chain attacks.
The CVSS vector is CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H. The vulnerability allows network-delivered vectors (AV:N) but requires User Interaction (UI:R) since a user must open the file. However, because there are no privilege prerequisites (PR:N), any user processing untrusted project files is susceptible.
While this vulnerability is not currently listed in CISA's Known Exploited Vulnerabilities (KEV) catalog, heap overflows in development environments are historically attractive targets for sophisticated threat groups seeking to establish initial access. The lack of public proof-of-concept exploits minimizes the current risk of automated scanning, but targeted campaigns exploiting this vector remain a possibility.
The definitive remediation for CVE-2026-71328 is the installation of the security updates released by Microsoft. Administrators and developers must update their .NET runtimes and Visual Studio installations to the designated secure versions immediately. Specifically, the following minimum versions contain the fixes: .NET 8.0.31, .NET 9.0.20, .NET 10.0.12, .NET 11.0 RC1, Visual Studio 2022 v17.14.40, and Visual Studio 2026 v18.9.3.
In environments where immediate patching cannot be deployed, several defensive strategies can mitigate exposure. Organizations should enforce policies restricting the opening of untrusted Visual Studio solutions or project files retrieved from public repositories or external parties. Utilizing Windows Defender Application Control (WDAC) or AppLocker can prevent Visual Studio components from executing anomalous subprocesses, such as command shells.
Furthermore, developers should build and test external or unverified code within isolated sandboxes or ephemeral virtual machines. This practice prevents compromise of the primary host system and limits lateral movement options for an attacker in the event of successful execution.
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H/E:U/RL:O/RC:C| Attribute | Detail |
|---|---|
| CVE ID | CVE-2026-71328 |
| Weakness | CWE-122 (Heap-based Buffer Overflow) |
| CVSS Score | 8.8 (High) |
| CVSS Vector | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
| Exploit Status | Unproven / None |
| KEV Status | Not Listed |
CVE-2026-115895 is a high-severity code injection vulnerability (CWE-94) in the happy-dom npm package prior to version 21.0.4. The vulnerability exists within the ECMAScriptModuleCompiler component, which transforms ECMAScript module syntax into executable Node.js functions when JavaScript evaluation is enabled. Due to an incomplete fix for CVE-2026-33943, the compiler failed to validate local named import aliases against legal JavaScript identifier rules. Attackers supplying crafted module imports—specifically utilizing destructuring default initializers alongside JSON module attributes—can inject arbitrary JavaScript expressions directly into the host Node.js runtime context.
An improper input validation and authorization bypass vulnerability exists in the LangGraph storage layer affecting langgraph, langgraph-checkpoint-postgres, and langgraph-checkpoint-sqlite. Because relational store implementations serialize namespace tuples into dot-delimited strings without validating labels on read, search, delete, and batch operations, an attacker who controls a namespace label can inject periods (.) to traverse namespace boundaries and access, modify, or delete data belonging to other namespaces.
CVE-2026-115886 (GHSA-2wqp-q3c6-ccj5) is a Server-Side Request Forgery (SSRF) and Unsafe Reflection vulnerability in MLflow versions 3.12.0rc0 prior to 3.17.0. Unauthenticated REST API endpoints accept serialized third-party scorer JSON payloads that are dynamically deserialized and reflectively instantiated without sanitizing constructor keyword arguments. When optional dependencies such as trulens and trulens-providers-litellm are installed, attackers can inject egress-steering arguments into the scorer payload, forcing the MLflow server to dispatch outbound HTTP requests to arbitrary internal destinations or cloud metadata services.
CVE-2026-113872 (GHSA-q7qp-rjg7-q26m) is a high-severity denial-of-service vulnerability affecting the multer multipart/form-data upload middleware for Node.js and Express in versions 2.0.0 through 2.4.0. When an endpoint is configured to accept multiple files using an asynchronous fileFilter callback, a crafted, truncated multipart HTTP request can trigger an unhandled error event on the underlying busboy stream parser after request teardown has already completed. Because all error listeners are stripped during teardown, Node.js treats the resulting error event as an uncaught exception and immediately terminates the server process.
CVE-2026-115897 (also tracked as GHSA-m5mm-p8h7-m29v and aliased as CVE-2026-115754) is a Cross-Site Scripting (XSS) vulnerability in the Yahoo serialize-javascript npm package prior to version 7.1.3. The flaw exists in the regular expression used by escapeFunctionBody() to neutralize HTML script closing tags within serialized JavaScript functions. Because function bodies are sanitized in isolation before structural formatting is applied, a function whose string representation terminates directly with the sequence '</script' bypasses the positive lookahead check. When combined with serialization formatting options that introduce whitespace delimiters and a subsequent property that supplies a closing bracket, an attacker can prematurely terminate an enclosing HTML <script> block and inject arbitrary HTML or JavaScript into the rendered document.
CVE-2026-109841 is a Subresource Integrity (SRI) verification bypass vulnerability in undici, the official HTTP/1.1 and HTTP/2 client library for Node.js that powers the global fetch() implementation. The flaw stems from improper handling of case sensitivity (CWE-178) when validating cryptographic hash algorithm tokens within SRI metadata. Because undici compared incoming algorithm identifiers against a strictly lowercase set without prior ASCII-lowercase normalization, valid uppercase or mixed-case tokens such as SHA256- or Sha384- were treated as unrecognized algorithms and discarded. Under SRI forward-compatibility rules, discarding all provided tokens results in an empty integrity list, causing undici to fail open and accept tampered HTTP response bodies without cryptographic verification.