CVE-2026-63577: CWE-295 Improper Certificate Validation in Legion of the Bouncy Castle Inc. bc-csharp
Improper certificate validation in the directoryName name-constraint check (PkixNameConstraintValidator.WithinDNSubtree) in Legion of the Bouncy Castle Inc. bc-csharp before 2.7.0 allows an attacker who controls, or can have certificates issued by, a name-constrained intermediate CA to get certificates accepted by PKIX path validation whose subject distinguished name, or a directoryName subjectAltName, lies outside the CA's permitted subtrees, via a name that places other RDNs ahead of a copy of the permitted RDN sequence, because the check looks for the constraint's first RDN anywhere in the name and compares the remaining RDNs from that position, instead of requiring the constraint to be an initial prefix of the name as RFC 5280 sections 4.2.1.10 and 7.1 require.
AI Analysis
Technical Summary
The vulnerability in bc-csharp before 2.7.0 arises from an incorrect implementation of the directoryName name-constraint check in the PkixNameConstraintValidator.WithinDNSubtree function. Specifically, the check looks for the constraint's first RDN anywhere within the subject name and compares subsequent RDNs from that position. RFC 5280 mandates that the name constraint must be an initial prefix of the subject name. This flaw allows an attacker who controls or can obtain certificates from a name-constrained intermediate CA to present certificates with subject distinguished names or directoryName subjectAltNames outside the permitted subtrees, bypassing PKIX path validation.
Potential Impact
This vulnerability can allow an attacker with control over a name-constrained intermediate CA, or the ability to have certificates issued by such a CA, to have certificates accepted by PKIX path validation even if the subject names lie outside the CA's permitted subtrees. This undermines the trust model of certificate validation and can lead to acceptance of unauthorized certificates, potentially enabling man-in-the-middle or impersonation attacks in systems relying on bc-csharp for certificate validation.
Mitigation Recommendations
A fix is available in bc-csharp version 2.7.0. Users should upgrade to version 2.7.0 or later to address this improper certificate validation vulnerability. No other mitigation or temporary workaround is indicated in the available data.
CVE-2026-63577: CWE-295 Improper Certificate Validation in Legion of the Bouncy Castle Inc. bc-csharp
Description
Improper certificate validation in the directoryName name-constraint check (PkixNameConstraintValidator.WithinDNSubtree) in Legion of the Bouncy Castle Inc. bc-csharp before 2.7.0 allows an attacker who controls, or can have certificates issued by, a name-constrained intermediate CA to get certificates accepted by PKIX path validation whose subject distinguished name, or a directoryName subjectAltName, lies outside the CA's permitted subtrees, via a name that places other RDNs ahead of a copy of the permitted RDN sequence, because the check looks for the constraint's first RDN anywhere in the name and compares the remaining RDNs from that position, instead of requiring the constraint to be an initial prefix of the name as RFC 5280 sections 4.2.1.10 and 7.1 require.
CVSS v4.0
Score 8.2high
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 in bc-csharp before 2.7.0 arises from an incorrect implementation of the directoryName name-constraint check in the PkixNameConstraintValidator.WithinDNSubtree function. Specifically, the check looks for the constraint's first RDN anywhere within the subject name and compares subsequent RDNs from that position. RFC 5280 mandates that the name constraint must be an initial prefix of the subject name. This flaw allows an attacker who controls or can obtain certificates from a name-constrained intermediate CA to present certificates with subject distinguished names or directoryName subjectAltNames outside the permitted subtrees, bypassing PKIX path validation.
Potential Impact
This vulnerability can allow an attacker with control over a name-constrained intermediate CA, or the ability to have certificates issued by such a CA, to have certificates accepted by PKIX path validation even if the subject names lie outside the CA's permitted subtrees. This undermines the trust model of certificate validation and can lead to acceptance of unauthorized certificates, potentially enabling man-in-the-middle or impersonation attacks in systems relying on bc-csharp for certificate validation.
Mitigation Recommendations
A fix is available in bc-csharp version 2.7.0. Users should upgrade to version 2.7.0 or later to address this improper certificate validation vulnerability. No other mitigation or temporary workaround is indicated in the available data.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- bcorg
- Date Reserved
- 2026-07-16T23:51:51.306Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 6abf5de7a43b0b3b8988eab1
Added to database: 10/02/2026, 07:31:51 UTC
Last enriched: 10/02/2026, 07:46:07 UTC
Last updated: 10/02/2026, 21:45:56 UTC
Views: 16
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.