Aug 12, 2026·6 min read·176 visits
A remote, unauthenticated attacker can trigger an infinite loop and 100% CPU exhaustion in .NET servers by sending a malformed WebSocket frame header followed by an immediate connection termination.
CVE-2026-62901 is a high-severity Denial of Service (DoS) vulnerability in the Microsoft .NET ecosystem, specifically affecting the System.Net.WebSockets frame-processing engine and associated network transports. Under certain circumstances, a remote, unauthenticated attacker can exploit this vulnerability by sending malformed or specifically crafted WebSocket packets over the network, causing a targeted .NET application server to enter a tight infinite loop. This behavior results in 100% CPU utilization on the executing thread, starving application resources and leading to a complete Denial of Service.
CVE-2026-62901 is a critical vulnerability within the .NET runtime ecosystem affecting core networking capabilities. Specifically, the flaw resides in the System.Net.WebSockets frame-processing state machine and the accompanying network transport libraries. This vulnerability allows unauthenticated remote attackers to trigger an infinite loop inside the target host process, leading to resource exhaustion.
The vulnerability impacts services utilizing WebSockets for real-time bidirectional communication, such as SignalR applications, custom WebSocket servers, and APIs upgraded to HTTP/2 or HTTP/3. It is classified under CWE-606 (Unchecked Input for Loop Condition). The severity of the flaw is heightened because it requires no specialized privileges or user interaction to exploit.
Furthermore, the vulnerability extends into the native MsQuic library, which is the underlying transport mechanism for HTTP/3 in .NET. A parallel parsing issue in native frame processing could similarly be triggered by malformed packets over QUIC. This multi-layered impact makes it necessary to remediate both the managed-code framework and the associated native binary dependencies.
The root cause of the vulnerability lies in the input-handling logic of the managed WebSocket frame parser. When a WebSocket connection is established, incoming data frames are analyzed to extract control flags, masking keys, and the declared payload length. The frame parsing mechanism operates via a loop that reads incoming bytes iteratively to satisfy the length declared in the frame header.
In vulnerable versions of the framework, the frame parser uses the declared payload length from the WebSocket header as the primary loop termination metric. If the client stops transmitting data abruptly, or terminates the connection, the underlying Stream.ReadAsync call returns 0 bytes, signifying an End-of-Stream (EOF) state. However, the parsing loop fails to validate this return value.
Because the loop logic does not verify whether the read operation actually yielded a non-zero number of bytes, it continues to execute. The counter tracking remaining bytes to be read (remainingBytes) is never decremented because no data is received. This creates an unyielding execution pattern where the loop executes indefinitely with a read result of 0 bytes.
Analyzing the vulnerable execution flow reveals the absence of a crucial check on the return value of the asynchronous read stream. In the unpatched implementation of the frame parser, the read loop is structured to continuously pull data from the network stream until the expected payload size is fulfilled.
Below is a conceptual representation of the vulnerable code segment:
// Vulnerable frame reading loop
while (remainingBytes > 0)
{
// The return value 'read' is not checked for 0 (EOF)
int read = await _stream.ReadAsync(buffer, cancellationToken);
// Process the buffer...
remainingBytes -= read; // If read is 0, remainingBytes never decreases
}The official patch remediated this vulnerability by validating the byte count returned from the read operation. If ReadAsync returns 0 while there are still expected bytes to read, the routine immediately aborts, throws a WebSocketException, and terminates the connection. This prevents the execution thread from spinning in an infinite loop.
// Patched frame reading loop
while (remainingBytes > 0)
{
int read = await _stream.ReadAsync(buffer, cancellationToken);
if (read == 0)
{
// Explicitly check for End-of-Stream (EOF)
throw new WebSocketException(WebSocketError.ConnectionClosedPrematurely);
}
// Process the buffer...
remainingBytes -= read;
}Exploitation of CVE-2026-62901 relies on sending a crafted network payload that triggers the loop condition without providing the bytes to satisfy it. An attacker begins by initiating a standard HTTP/1.1 or HTTP/2 GET request to upgrade the connection to WebSockets. This process requires no pre-existing authentication, allowing any network-adjacent attacker to reach the vulnerable handler.
Once the WebSocket handshake completes, the attacker transmits a specifically structured WebSocket frame header. This header specifies an artificially inflated payload length, often utilizing the extended 64-bit length descriptor to indicate several gigabytes of expected data. Immediately after transmitting the header, the attacker terminates transmission or half-closes the TCP socket.
As a result, the server-side buffer reaches an EOF state. The System.Net.WebSockets parsing engine continues to poll the closed socket stream, receiving 0 bytes in return. The parsing loop enters the infinite execution state, utilizing 100% of the host CPU core assigned to that thread. By executing multiple parallel connections of this type, an attacker can consume all threads in the thread pool, completely freezing the target web server.
When .NET applications run WebSockets over HTTP/3 (under RFC 9220), they rely on the native library MsQuic for stream transport. A parallel bug existed in the native frame processing layer of MsQuic, where unvalidated frame boundary checks could also cause an infinite loop in the native transport driver.
To fully address this vector, Microsoft updated the native dependency version of MsQuic within the .NET SDK build properties. Specifically, the build configuration eng/Versions.props was patched to bump MicrosoftNativeQuicMsQuicSchannelVersion from version 2.4.18 to 2.5.9.
Consequently, developers compiling applications as self-contained deployments must ensure they compile using the updated SDK. Otherwise, the output binary bundle may still carry the vulnerable version of the native msquic.dll or libmsquic.so library, leaving the deployment exposed to the native loop vulnerability even if the managed libraries are updated.
The primary and most effective remediation path is upgrading the .NET runtime to the latest security releases. System administrators must deploy updates for .NET 10.0.11, 9.0.19, or 8.0.30 depending on the major version of their environment. Similarly, development environments using Visual Studio 2022 or Visual Studio 2026 must be updated to version 17.14.38 or 18.8.3 respectively.
In scenarios where immediate patching is not feasible, network-level controls should be implemented. Reverse proxies, such as YARP, NGINX, or IIS, can be configured to enforce strict limits on the number of concurrent WebSocket connections from single source IP addresses. Applying aggressive write and read timeouts at the proxy level can also force-terminate stalled connections before they exhaust server threads.
Additionally, security teams should implement monitoring alerts for rapid, abnormal increases in CPU utilization on .NET hosts. Monitoring tools can track thread pool exhaustion indicators and abnormally long-lived WebSocket sessions that exhibit zero throughput. These metrics can help identify ongoing denial of service attempts in real time.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H| Product | Affected Versions | Fixed Version |
|---|---|---|
.NET 10.0 Microsoft | >= 10.0.0, < 10.0.11 | 10.0.11 |
.NET 9.0 Microsoft | >= 9.0.0, < 9.0.19 | 9.0.19 |
.NET 8.0 Microsoft | >= 8.0.0, < 8.0.30 | 8.0.30 |
Visual Studio 2022 Microsoft | >= 17.14.0, < 17.14.38 | 17.14.38 |
Visual Studio 2026 Microsoft | >= 18.0, < 18.8.3 | 18.8.3 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-606: Unchecked Input for Loop Condition |
| Attack Vector | Network |
| CVSS v3.1 | 7.5 (High) |
| Impact | Denial of Service (DoS) via 100% CPU Exhaustion |
| Exploit Status | None |
| KEV Status | Not Listed |
The product uses input before or during the calculation of a loop condition, but it does not validate or incorrectly validates the input. This can lead to an infinite loop or excessive loop iterations, exhausting target resources.
CVE-2026-128068 (GHSA-cpgf-5mjf-73p7) is a Regular Expression Denial of Service (ReDoS) vulnerability in the rails-html-sanitizer Ruby gem affecting versions 1.0.3 through 1.7.1. The flaw resides in the Rails::HTML::PermitScrubber#scrub_attribute method, which uses the multiline regular expression /^\s*[^#\s].*/m to enforce local-only URI fragment references on SVG elements. On Ruby runtimes prior to version 3.2 (CRuby <= 3.1 and JRuby), evaluating an attribute value composed of repeated newline and whitespace characters without a hash character triggers quadratic backtracking O(n^2). Applications are only vulnerable if their sanitization allowlist is explicitly configured to permit SVG reference elements such as <use> alongside href or xlink:href attributes.
CVE-2026-126360 (GHSA-mf5v-w3w3-f6cg) is an algorithmic complexity vulnerability (Regular Expression Denial of Service) in the trace context propagation logic of the opentelemetry-api package within the OpenTelemetry Python ecosystem. In versions prior to 1.45.2, the TraceContextTextMapPropagator.extract() method utilizes a regular expression susceptible to quadratic-time backtracking when parsing malformed W3C traceparent headers containing long sequences of whitespace followed by an embedded newline character. In Python applications—particularly those using single-threaded asynchronous event loops—an unauthenticated remote attacker transmitting payloads over newline-preserving carriers can monopolize CPU execution and induce application-level Denial of Service.
CVE-2026-126359 (GHSA-3gg2-335m-rxc6) is an improper input neutralization vulnerability (CWE-79) in the Hono web framework (`honojs/hono`). Versions from 3.12.0 prior to 4.13.16 evaluate and escape interpolated strings in the `hono/css` helper individually before concatenating template chunks and stripping CSS comments. When a `<` character and a `/style>` sequence are split across template boundaries, adjacent interpolations, or separated by a CSS comment, the sanitizer fails to escape the closing tag sequence. During Server-Side Rendering (SSR), the `<Style />` component outputs an unescaped `</style>` delimiter, permitting an attacker to break out of the CSS raw text context and execute arbitrary HTML and JavaScript in the victim's browser.
An incorrect authorization vulnerability (CWE-863) exists in the Hono web application framework (npm package `hono`) from version 4.1.4 prior to 4.13.16. Flaws in the registration-time coverage calculation and regular expression compilation within `RegExpRouter` cause wildcard middleware to be omitted under three specific routing conditions: parameter pattern equivalence mismatches, wildcard boundary collisions, and request paths containing percent-encoded line terminators. Because Hono's default `SmartRouter` selects `RegExpRouter` for most standard web applications, unauthenticated remote clients can bypass authentication, authorization, or security middleware registered on wildcard paths to directly access protected route handlers or the application's not-found handler.
CVE-2026-126357 (GHSA-4m76-xfj5-7975) is an authentication bypass vulnerability in the Hono web application framework prior to version 4.13.16. The flaw resides in the prefix-stripping and URL reconstruction logic of `app.mount()` and the `mount()` middleware. Two distinct path transformation errors—static route-pattern length slicing on dynamic prefixes and URL normalization of decoded pathnames—create a routing discrepancy between the outer Hono router and the mounted sub-application. An unauthenticated attacker can exploit these discrepancies to bypass outer authentication or authorization middleware and access protected inner routes directly.
A parser differential vulnerability exists in the Hono web application framework versions 4.5.1 prior to 4.13.16. The built-in form validation middleware (`validator('form')`) utilizes an overly restrictive regular expression to evaluate the HTTP `Content-Type` header for `multipart/form-data` payloads. When a client supplies additional valid MIME parameters (such as `charset=utf-8`) or multiple whitespace characters following a semicolon delimiter, the regular expression fails to match. Consequently, the validator passes an empty object to the validation callback instead of the parsed form fields. If the validation logic permits empty objects or only checks for disallowed values on optional properties, the request passes validation, allowing downstream route handlers calling `c.req.parseBody()` or `c.req.formData()` to process unvalidated user input.