high · 7.5CVE-2026-50525Jul 20, 2026

CVE-2026-50525: System.Security.Cryptography.Xml EncryptedXml Denial of Service

Shubham Kandhare
Security Engagement Manager, SecureLayer7

A crafted encrypted XML document sent to any .NET application using EncryptedXml can exhaust server resources and crash the process, with no authentication required.

PackageSystem.Security.Cryptography.Xml
Ecosystemnuget
Affected>= 10.0.0, <= 10.0.9
Fixed in10.0.10

The problem

The EncryptedXml class in System.Security.Cryptography.Xml processes XML encryption structures that can include CipherReference elements with chained Transform nodes. Before the patch, there was no limit on transform chain depth or total resource consumption during decryption, so a malicious XML document could drive the runtime into unbounded recursive processing.

Any endpoint that accepts XML and passes it through the EncryptedXml decryption path is exposed. This includes SAML processors, document pipelines, message queues, and internal APIs. The attack requires no credentials and no user interaction (CVSS AV:N/AC:L/PR:N/UI:N/A:H).

The fix

Update System.Security.Cryptography.Xml to 10.0.10 (.NET 10), 9.0.18 (.NET 9), or 8.0.29 (.NET 8). Run `dotnet add package System.Security.Cryptography.Xml` in your project directory, then recompile and redeploy. Self-contained apps and container images must be rebuilt.

An AppContext switch exists to restore old behavior if needed, but Microsoft and the broader community recommend leaving the new defaults in place.

Reported by Levi Broderick (Microsoft).

References: [1][2][3][4][5][6]

Related research