CVE-2026-103604: Quadratic-time escaping when converting X.509 distinguished names to strings

Published Oct 2, 2026
·
Updated

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.

Affected Software

2 affected components
Bouncy Castle bc-csharp<2.7.0
bouncycastle bc-csharp<2.7.0

Event History

Oct 2, 2026
CVE Published
via MITRE·07:11 AM
Data Sourced
via MITRE·07:11 AM
DescriptionWeakness
Data Sourced
via OSV·07:11 AM
DescriptionSeverityWeakness
Data Sourced
via NVD·08:17 AM
DescriptionSeverityWeakness
Data Sourced
via NVD·08:17 AM
RemedyAffected Software

Frequently Asked Questions

1

Which applications are exposed to this denial-of-service issue?

Applications using Bouncy Castle bc-csharp before 2.7.0 are exposed when they convert attacker-controlled X.509 distinguished names to strings. This can occur when names from certificates, CRLs, certification requests, or similar structures are logged, displayed, compared with IetfUtilities.RdnAreEqual, or processed during PKIX path validation for directoryName name constraints.

2

What does an attacker need to do to trigger the issue?

An unauthenticated remote attacker needs to supply a structure containing a distinguished-name attribute with a long value that requires escaping, such as many commas or leading or trailing spaces. Triggering requires the application to process that name through the affected string-conversion or comparison path.

3

Are all uses of the affected library vulnerable by default?

No. Exposure depends on whether the application converts an attacker-controlled distinguished name to a string or performs the affected RDN comparison. The provided information does not identify a universally affected default configuration.

4

What is the remediation?

Upgrade Bouncy Castle bc-csharp to version 2.7.0 or later. If upgrading cannot happen immediately, avoid or limit processing of untrusted certificates, CRLs, certification requests, and other structures whose distinguished names may be converted, logged, displayed, or compared.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203