CVE-2026-50525

Allocation of Resources Without Limits or Throttling
Affects
.NET
in
.NET
No items found.
Versions
System.Security.Cryptography.Xml >= 6.0.0 < 6.0.2
Exclamation circle icon
Patch Available

This Vulnerability has been fixed in the Never-Ending Support (NES) version offered by HeroDevs.

Overview

.NET is a free, open-source, cross-platform framework for building modern apps and powerful cloud services. It consists of a runtime and a developer platform made up of tools, programming languages, and libraries for building many different types of applications.

A Denial of Service (DoS) vulnerability (CVE-2026-50525) has been identified in the XML Encryption implementation of the System.Security.Cryptography.Xml component, which allows attackers to exhaust CPU and memory on an application that decrypts attacker-influenced XML. A crafted document can carry an unbounded number of EncryptedData elements, each of which the decryption transform processes in a single operation with no upper limit.

Per CWE-770: Allocation of Resources Without Limits or Throttling, the product allocates a reusable resource or group of resources on behalf of an actor without imposing any restrictions on the size or number of resources that can be allocated, in violation of the intended security policy for that actor.

This issue affects .NET 6. On .NET 6, System.Security.Cryptography.Xml is not part of the shared framework; it ships as an opt-in NuGet package (https://www.nuget.org/packages/System.Security.Cryptography.Xml), so only applications that add an explicit package reference to it are exposed.

Details

Module Info

Vulnerability Info

This High-severity vulnerability is found in the System.Security.Cryptography.Xml package as shipped for .NET 6. The XmlDecryptionTransform walks the input document and decrypts every EncryptedData element it encounters, enqueuing each one for processing. The traversal bounds recursion depth but never limits the total number of elements decrypted in a single operation:

int maxDepth = LocalAppContextSwitches.DangerousMaxRecursionDepth;
Queue<ProcessElementWorkItem> encryptedDatasQueue = new Queue<ProcessElementWorkItem>();
// ...
if (encryptedDataElement != null && encryptedDataElement.LocalName == "EncryptedData" &&
    encryptedDataElement.NamespaceURI == EncryptedXml.XmlEncNamespaceUrl)
{
    // ...
    if (ProcessEncryptedDataItem(encryptedDataElement))
    // ...
}

Any code path that runs the XML decryption transform over attacker-influenced XML is exposed: verifying a signed document whose signature references the http://www.w3.org/2002/07/decrypt#XML decryption transform, or decrypting a document directly. A document carrying a large number (or nested fan-out) of EncryptedData elements forces one decryption per element with no upper bound, exhausting CPU and allocation, with no privileges or user interaction required.

The fixed releases cap the number of EncryptedData elements decrypted in a single operation. The bound is configurable through the AppContext switch System.Security.Cryptography.Xml.MaxDecryptedDataElements (default 100); setting it to 0 disables the cap.

This vulnerability has been present since at least .NET 6.0 and likely earlier.

Mitigation

.NET 6 is End-of-Life and will not receive any updates to address this issue. For more information see .NET and .NET Core official support policy.

Users of the affected components should apply one of the following mitigations:

  • Upgrade affected applications to one of:
    • System.Security.Cryptography.Xml >= 8.0.4
    • System.Security.Cryptography.Xml >= 9.0.18
    • System.Security.Cryptography.Xml >= 10.0.10
  • Leverage a commercial support partner like HeroDevs for post-EOL security support, including NES for .NET 6.0.43 or later.

Credits

Microsoft credits Levi Broderick of Microsoft for reporting this vulnerability.

Vulnerability Details
Severity
Level
CVSS Assessment
Low
>=0 <4
Medium
>=4 <6
High
>=6 <8
Critical
>=8 <10
High
ID
CVE-2026-50525
PROJECT Affected
.NET
Versions Affected
System.Security.Cryptography.Xml >= 6.0.0 < 6.0.2
NES Versions Affected
Published date
August 3, 2026
≈ Fix date
July 16, 2026
Fixed in
Category
Allocation of Resources Without Limits or Throttling
Vex Document
Download VEXHow do I use it?
Sign up for the latest vulnerability alerts fixed in
NES for .NET
Rss feed icon
Subscribe via RSS
or

By submitting the form I acknowledge receipt of our Privacy Policy.

Thanks for signing up for our Newsletter! We look forward to connecting with you.
Oops! Something went wrong while submitting the form.