CVE-2026-103604 Quadratic-time escaping when converting X.509 distinguished names to strings
Remote attackers can cause CPU exhaustion and denial of service in applications using the Bouncy Castle C# library by providing crafted X.509 certificates with long attribute values.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- None listed
What is CVE-2026-103604?
CVE-2026-103604 is a high-severity denial of service vulnerability in Legion of the Bouncy Castle Inc. bc-csharp, published on 2 Oct 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
Inefficient algorithmic complexity in X.509 distinguished name string conversion (X509Name.ToString and IetfUtilities.ValueToString) in Legion of the Bouncy Castle Inc. bc-csharp before 2.7.0 allows a remote unauthenticated attacker to cause a denial of service through CPU exhaustion via a certificate, CRL, certification request or other structure whose name contains a long attribute value made up of characters that must be escaped, such as commas, or of leading or trailing spaces, because each escaping backslash was inserted into the buffer being scanned, so the work grew quadratically with the length of the value. Applications are exposed when they convert such a name to a string, for example to log or display it, or compare it with IetfUtilities.RdnAreEqual, as PKIX path validation does for directoryName name constraints.
Weakness: CWE-407
Which versions are affected by CVE-2026-103604?
It affects 1 product.
Products include Bouncycastle Bc-Csharp.
How do I fix CVE-2026-103604?
No fix has been published for CVE-2026-103604 yet. Limit exposure of the affected software until one is available.
Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.
Is CVE-2026-103604 being exploited?
There is no known exploitation of CVE-2026-103604 in the wild and no public exploit code.
Other vulnerabilities in Legion of the Bouncy Castle Inc. bc-csharp
- CVE-2026-63569 MTI/A0 DHAgreement does not validate the peer's ephemeral value
- CVE-2026-103600 Unbounded ASN.1 nesting depth causes process-terminating stack overflow
- CVE-2026-103603 Unbounded HSS public key level count allows huge array allocation during signature verification
- CVE-2026-16000 KCcmBlockCipher (DSTU 7624 CCM) tag not bound to nonce when no associated data is used
- CVE-2026-63566 DTLS handshake reassembler allocates buffer from unchecked 24-bit length
Sources
Also known as GHSA-p48w-99f8-9598.