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-50525

CVE-2026-50525: Denial of Service Vulnerability in Microsoft .NET XML Cryptography Stack

Amit Schendel
Amit Schendel
Senior Security Researcher

Jul 21, 2026·6 min read·157 visits

Executive Summary (TL;DR)

A Denial of Service vulnerability in Microsoft .NET allows unauthenticated remote attackers to crash applications by submitting XML payloads containing deeply nested cryptographic elements or infinite XSLT loops.

CVE-2026-50525 is a high-severity Denial of Service (DoS) vulnerability in the Microsoft .NET XML Cryptography stack. The vulnerability resides in the `System.Security.Cryptography.Xml` library, specifically within the `EncryptedXml` processing engine. Unauthenticated remote attackers can exploit this flaw by sending specifically crafted XML documents containing nested or recursive structures, or utilizing resource-intensive transforms. Processing such payloads leads to infinite CPU loops, stack exhaustion, or memory starvation, resulting in application termination.

Vulnerability Overview

The System.Security.Cryptography.Xml library provides the core implementation for XML encryption, decryption, and digital signatures within the Microsoft .NET ecosystem. This component is commonly deployed in enterprise architectures to process Security Assertion Markup Language (SAML) assertions, WS-Security SOAP headers, and generic encrypted XML files. Because these endpoints are often exposed to untrusted external networks, they present a significant attack surface.

This vulnerability is classified under CWE-770 (Allocation of Resources Without Limits or Throttling). In vulnerable versions of the library, the parsing engine processed incoming XML elements without tracking recursion depths or validating the resource safety of applied cryptographic transforms. Unauthenticated attackers can exploit this lack of control to target application endpoints that automatically handle XML decryption.

The resulting impact is a total loss of application availability. Depending on the vector chosen, the target process will experience 100% thread pool CPU starvation, a process-terminating Out-of-Memory (OOM) exception, or a direct runtime crash via stack overflow.

Technical Root Cause Analysis

The vulnerability stems from two independent implementation defects in the XML decryption process. First, during nested parsing and canonicalization processes handled by classes such as CanonicalizationDispatcher, EncryptedData, and EncryptedKey, the library recursively traversed elements without maintaining an explicit depth threshold. If a document contained multiple layers of nested encryption references, the execution stack would grow until a process-terminating StackOverflowException was thrown.

Second, the EncryptedXml engine supported arbitrary transforms defined within <CipherReference> elements. These transforms are applied to retrieve and reconstruct the ciphertext prior to decryption. In affected versions, the engine allowed powerful, highly expressive languages including XML Path Language (XPath) and Extensible Stylesheet Language Transformations (XSLT).

Because the XSLT processor was executed with default permissive configurations, it was susceptible to infinite loop patterns and exponential memory allocation models. Attackers could supply malicious XSLT stylesheets that execute recursive templates indefinitely or define recursively expanding variables. Since the parsing environment lacked resource enforcement thresholds, this directly led to system resource exhaustion.

Code Analysis and Security Patch

The security patch introduced in .NET fixes these issues by implementing a thread-static recursion tracking limit and establishing a strict whitelist of safe transform algorithms.

To prevent stack exhaustion, the patch leverages a [ThreadStatic] recursion counter (t_depth) and validates execution depth against LocalAppContextSwitches.DangerousMaxRecursionDepth, which defaults to 64. Below is the patched implementation in CanonicalizationDispatcher.cs:

    internal static class CanonicalizationDispatcher
    {
+       [ThreadStatic]
+       private static int t_depth;
+
        public static void Write(XmlNode node, StringBuilder strBuilder, DocPosition docPos, AncestralNamespaceContextManager anc)
        {
-           if (node is ICanonicalizableNode)
+           int maxDepth = LocalAppContextSwitches.DangerousMaxRecursionDepth;
+           if (maxDepth > 0 && t_depth > maxDepth)
+           { 
+               // Enforce depth validation threshold
+               throw new CryptographicException(SR.Cryptography_Xml_MaxDepthExceeded);
+           }
+
+           t_depth++;
+           try
            {
-               ((ICanonicalizableNode)node).Write(strBuilder, docPos, anc);
+               if (node is ICanonicalizableNode canonicalizableNode)
+               { 
+                   canonicalizableNode.Write(strBuilder, docPos, anc);
+               }
+               else
+               { 
+                   WriteGenericNode(node, strBuilder, docPos, anc);
+               }
            }
-           else
+           finally
            {
-               WriteGenericNode(node, strBuilder, docPos, anc);
+               t_depth--;
            }
        }

Additionally, the patch restricts allowed transforms in <CipherReference> elements. The ReferenceUsesSafeTransformMethods helper matches incoming transform algorithms against a hardcoded whitelist (DefaultSafeTransformMethods). Safe algorithms include standard base64 decoding, license transforms, and official canonicalization algorithms (such as C14N). Dangerous transforms like XSLT or XPath are rejected immediately, preventing arbitrary code execution paths in the transformation layer.

Exploitation and Attack Flow

An attacker targets this vulnerability by identifying endpoints that accept and process encrypted XML input. The attack does not require prior authentication or session privileges. The exploit payloads are typically delivered as HTTP POST requests containing crafted XML structures.

In an XSLT infinite loop attack, the payload defines a stylesheet inside the <CipherReference> node. This stylesheet contains a template that recursively references itself without a termination condition. When the application receives the payload and invokes EncryptedXml.DecryptDocument(), the execution flow hangs indefinitely on a single CPU thread. By sending multiple identical requests, an attacker can exhaust all threads in the application thread pool, freezing the server.

Alternatively, an attacker can construct an XML expansion attack (similar to the Billion Laughs format) inside the XSLT block. The transform uses nested string concatenations to exponentially expand a baseline string into gigabytes of memory buffer. The resulting allocation instantly triggers an uncatchable OutOfMemoryException, which causes the host operating system to terminate the .NET process.

Impact Assessment and Vector Breakdown

The exploitation of CVE-2026-50525 leads directly to a Denial of Service. The vulnerability possesses high exploitability due to its low attack complexity and the absence of user interaction or privilege requirements.

The impact is concentrated on system availability. Because .NET process crashes often affect shared application pools (such as IIS Worker Processes or Kestrel host runtimes), a successful attack can disrupt adjacent, healthy services running on the same host.

There is no recorded compromise of confidentiality or integrity associated with this vulnerability. An attacker cannot use this bug to extract data or escalate privileges directly, making the overall impact score 3.6 on the CVSS scale. The National Vulnerability Database assigns a CVSS v3.1 base score of 7.5.

Remediation and Mitigation Guidance

The primary remediation pathway is the installation of updated .NET runtimes and SDK assemblies released by Microsoft. Administrators should upgrade systems to .NET 10.0.6, 9.0.18, or 8.0.29. If using the NuGet dependency model, the System.Security.Cryptography.Xml package must be updated to version 8.0.1 or above.

Temporary workarounds are available for environments where immediate patching is not possible. Security administrators can restrict allowable XML schemas using Web Application Firewall (WAF) deep packet inspection. Rules should be configured to detect and drop incoming payloads containing the XSLT transform identifier (http://www.w3.org/TR/1999/REC-xslt-19991116) or unexpected nested <Transform> blocks.

Additionally, developers can adjust application configuration settings to control the recursion depth limits programmatically using AppContext switches. The System.Security.Cryptography.Xml.DangerousMaxRecursionDepth property can be set to a conservative value, such as 32, within the application's initialization routine to minimize the vulnerability window.

Fix Analysis (1)

Technical Appendix

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

Affected Systems

Microsoft .NET 10.0Microsoft .NET 9.0Microsoft .NET 8.0Microsoft .NET Framework 3.5Microsoft .NET Framework 4.6.2Microsoft .NET Framework 4.7Microsoft .NET Framework 4.7.1Microsoft .NET Framework 4.7.2Microsoft .NET Framework 4.8Microsoft .NET Framework 4.8.1Microsoft Visual Studio 2022 v17.12Microsoft Visual Studio 2022 v17.14Microsoft Visual Studio 2026 v18.7

Affected Versions Detail

Product
Affected Versions
Fixed Version
.NET
Microsoft
>= 10.0.0, < 10.0.610.0.6
.NET
Microsoft
>= 9.0.0, < 9.0.189.0.18
.NET
Microsoft
>= 8.0.0, < 8.0.298.0.29
AttributeDetail
CWE IDCWE-770
Attack VectorNetwork
CVSS v3.1 Score7.5 (High)
Exploit MaturityProof of Concept
ImpactDenial of Service (DoS)
KEV StatusNot Listed

MITRE ATT&CK Mapping

T1499Endpoint Denial of Service
Impact
CWE-770
Allocation of Resources Without Limits or Throttling

The software does not restrict, or incorrectly restricts, the allocation of a resource, leading to exhaustion.

References & Sources

  • [1]Microsoft Security Update Guide - CVE-2026-50525

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.

More Reports

•about 1 hour ago•GHSA-C9XM-49CP-XCR9
6.3

GHSA-C9XM-49CP-XCR9: Server-Side Request Forgery in rmcp OAuth Client

A Server-Side Request Forgery (SSRF) vulnerability exists in the rmcp OAuth client, which is part of the Model Context Protocol (MCP) Rust SDK. The vulnerability arises from insecure processing of the resource_metadata parameter in WWW-Authenticate headers returned by a malicious or compromised MCP server. The client parses and fetches absolute URLs from this header without validation of scheme, origin, or network routing, allowing remote attackers to initiate HTTP GET requests to local network interfaces, RFC 1918 private subnets, or cloud metadata endpoints.

Alon Barad
Alon Barad
2 views•6 min read
•about 6 hours ago•CVE-2026-92945
4.2

CVE-2026-92945: Sandbox Escape and Module Allowlist Bypass via Path Prefix Matching in vm2

A module allowlist bypass vulnerability (CVE-2026-92945 / GHSA-7q3f-wx44-378m) was identified in the vm2 sandboxing library prior to version 3.11.7. This flaw permits unauthenticated or untrusted code running within the sandbox environment to bypass explicit module restrictions. When the transitive resolution option is disabled, the system fails to validate file system path boundaries, allowing prefix-sharing sibling directories to be resolved and loaded, thereby escaping intended sandbox restrictions.

Amit Schendel
Amit Schendel
6 views•6 min read
•about 7 hours ago•CVE-2026-92941
10.0

CVE-2026-92941: Sandbox Escape and Process-Wide TLS Trust Store Manipulation in vm2

CVE-2026-92941 is a critical sandbox-escape and trust-manipulation vulnerability in the vm2 library (versions 3.11.3 to 3.11.6). This security flaw allows untrusted code executing within a NodeVM sandbox environment to compromise the global TLS trust store of the host Node.js process. By leveraging a design flaw where the host's native 'tls.setDefaultCACertificates' can be executed via a proxy wrapper, combined with a bridge unwrapping bypass in the 'url' module, an attacker can modify the process-wide default root Certificate Authorities. Consequently, all subsequent outbound TLS/HTTPS clients running on the host thread are forced to trust attacker-signed certificates, facilitating transparent Man-in-the-Middle (MitM) attacks. The vulnerability was resolved in version 3.11.7 of vm2 by introducing built-in member-level sanitization before applying read-only proxy wrappers.

Amit Schendel
Amit Schendel
5 views•10 min read
•about 8 hours ago•CVE-2026-92944
9.8

CVE-2026-92944: Sandbox Escape in vm2 via Stale V8 PromiseThenLookupChain Protector

A critical engine-level reachability failure in Node.js 26 running V8 14.6 allows attackers to escape the vm2 sandbox environment. When consecutive prototype properties are modified using sequential assignments, a V8 optimization bug fails to invalidate the PromiseThenLookupChain protector. By calling Promise.prototype.finally, the attacker bypasses the vm2 wrappers, hijacks the promise reaction using a custom constructor, triggers a calibrated stack overflow to capture a host-realm RangeError, and executes arbitrary shell commands on the host.

Alon Barad
Alon Barad
7 views•8 min read
•about 9 hours ago•CVE-2026-92939
9.9

CVE-2026-92939: Critical Sandbox Escape via Host Crypto setEngine Native Code Execution in vm2

A critical sandbox escape vulnerability in the vm2 library allows sandboxed JavaScript code to bypass containment and execute arbitrary native code on the host process. This occurs when the host's builtin crypto module is exposed to the NodeVM environment. Although vm2 implements a read-only proxy layer to restrict direct modifications to host properties, it does not prevent invocation of host-level functions. By calling the crypto.setEngine API with a path to a malicious native library on disk, an attacker can trigger OpenSSL's dynamic module loader. The host's operating system loader immediately runs the dynamic library's initializers/constructors before verifying engine compatibility, leading to remote code execution in the context of the host process.

Amit Schendel
Amit Schendel
6 views•5 min read
•about 10 hours ago•CVE-2026-92938
9.9

CVE-2026-92938: Remote Code Execution in vm2 via node:sqlite DatabaseSync Sandbox Escape

CVE-2026-92938 is a critical sandbox escape vulnerability in the vm2 library (versions 3.11.3 through 3.11.6) that allows arbitrary native code execution on the host when the node:sqlite built-in module is loaded inside a sandboxed NodeVM environment.

Amit Schendel
Amit Schendel
8 views•8 min read