CVE-2026-103604: CWE-407 Inefficient Algorithmic Complexity in Legion of the Bouncy Castle Inc. bc-csharp
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.
AI Analysis
Technical Summary
The vulnerability arises from a quadratic time complexity in processing X.509 distinguished name strings when escaping certain characters like commas or spaces. Each escaping backslash is inserted into the buffer being scanned, causing the processing time to grow quadratically with the length of the attribute value. This can be exploited remotely by an unauthenticated attacker by supplying a certificate, CRL, or certification request with a specially crafted name, resulting in CPU exhaustion and denial of service. The affected methods are X509Name.ToString and IetfUtilities.ValueToString in bc-csharp versions prior to 2.7.0. Applications that convert these names to strings, such as during logging or PKIX path validation, are vulnerable.
Potential Impact
An attacker can cause a denial of service by exhausting CPU resources through supplying a crafted certificate or related structure with a long attribute value requiring escaping. This impacts availability of applications using vulnerable versions of bc-csharp when they process such names. No authentication or user interaction is required, and the attack surface includes any application converting X.509 distinguished names to strings using the affected methods.
Mitigation Recommendations
Upgrade to bc-csharp version 2.7.0 or later, where this inefficient algorithmic complexity issue is fixed. No other mitigation is indicated. Patch status is confirmed by the version boundary provided. There is no indication of temporary fixes or vendor advisories stating otherwise.
CVE-2026-103604: CWE-407 Inefficient Algorithmic Complexity in Legion of the Bouncy Castle Inc. bc-csharp
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.
CVSS v4.0
Score 8.7high
Affected software
Legion of the Bouncy Castle Inc.
bc-csharp
pkg:nuget/BouncyCastle.CryptographyRun on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability arises from a quadratic time complexity in processing X.509 distinguished name strings when escaping certain characters like commas or spaces. Each escaping backslash is inserted into the buffer being scanned, causing the processing time to grow quadratically with the length of the attribute value. This can be exploited remotely by an unauthenticated attacker by supplying a certificate, CRL, or certification request with a specially crafted name, resulting in CPU exhaustion and denial of service. The affected methods are X509Name.ToString and IetfUtilities.ValueToString in bc-csharp versions prior to 2.7.0. Applications that convert these names to strings, such as during logging or PKIX path validation, are vulnerable.
Potential Impact
An attacker can cause a denial of service by exhausting CPU resources through supplying a crafted certificate or related structure with a long attribute value requiring escaping. This impacts availability of applications using vulnerable versions of bc-csharp when they process such names. No authentication or user interaction is required, and the attack surface includes any application converting X.509 distinguished names to strings using the affected methods.
Mitigation Recommendations
Upgrade to bc-csharp version 2.7.0 or later, where this inefficient algorithmic complexity issue is fixed. No other mitigation is indicated. Patch status is confirmed by the version boundary provided. There is no indication of temporary fixes or vendor advisories stating otherwise.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- bcorg
- Date Reserved
- 2026-09-30T23:01:10.053Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 6abf5de5a43b0b3b8988e877
Added to database: 10/02/2026, 07:31:49 UTC
Last enriched: 10/02/2026, 07:46:54 UTC
Last updated: 10/02/2026, 21:45:56 UTC
Views: 12
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.