Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessObtain name-constrained intermediate CA cert
-
DeliveryCraft leaf DN prepending RDNs before permitted sequence
-
ExploitPresent chain to bc-csharp PKIX validation
-
ExecutionName-constraint prefix check bypassed
-
ImpactForged identity accepted / impersonation
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A07:2025 - Authentication Failures
ASVS 5.0
V12 - Secure Communication Certificate validation
|
| Exploitation Conditions | Exploitation requires the attacker to control, or be able to have certificates issued by, a name-constrained intermediate CA that appears in a certificate chain the victim validates; the victim must use bc-csharp before 2.7.0 to perform PKIX certificate path validation where directoryName name constraints (permittedSubtrees) are enforced. The attacker then crafts a subject DN (or directoryName subjectAltName) that places additional RDNs ahead of a copy of the permitted RDN sequence so the flawed anywhere-match accepts it. Limiting factors: the attacker cannot forge arbitrary trust without a name-constrained CA already positioned in the trusted chain, and environments that do not rely on directoryName name constraints are unaffected; no victim user interaction or victim-side privileges are required. |
| Impact | This is a genuine integrity/trust-boundary flaw rather than a high-CVSS-but-low-real-risk issue, but its exploitability is gated by a meaningful precondition. The vendor CVSS 4.0 vector (AV:N/AC:L/AT:P/PR:N/UI:N, VI:H only) scores 8.2 and correctly models the key constraint via AT:P - the attack has a specific requirement: the attacker must control, or be able to obtain certificates from, a name-constrained intermediate CA that sits in a chain the victim validates. PR:N is accurate in that no privileges on the victim/relying party are needed, but the CA-control prerequisite is the real limiting factor and is not captured by PR. There is NO EPSS score, NO CISA KEV listing, and NO public POC in the provided data, so there is no public exploit identified at time of analysis; the only exploitation evidence is the source-code diff confirming the logic bug. Signals are therefore consistent (serious correctness flaw, vendor-confirmed and patched) but there is no indication of in-the-wild use - prioritize patching for any .NET application that performs PKIX path validation with directoryName name constraints, but this is not an emergency drop-everything item absent exposure to attacker-influenced name-constrained CAs. |
| Exploit ScenarioDerived | An attacker who controls (or can request certificates from) a name-constrained intermediate CA whose permitted subtree is e.g. C=US,O=TrustedOrg crafts a leaf certificate whose subject DN prepends extra RDNs ahead of a copy of the permitted sequence (e.g. C=FR,O=Attacker,C=US,O=TrustedOrg,CN=target). Because bc-csharp searched for the constraint's first RDN at any offset instead of requiring an initial prefix, the forged certificate passes permittedSubtrees validation and is accepted by a relying party, enabling impersonation of an identity outside the CA's authorized namespace. No public POC is identified, but the patch diff fully documents the exploit construction. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 02, 2026
PKIX certificate path validation in the Bouncy Castle C
library (bc-csharp) before 2.7.0 accepts certificates whose subject distinguished name, or directoryName subjectAltName, falls outside a name-constrained intermediate CA's permitted subtrees, breaking the RFC 5280 name-constraint trust boundary. An unauthenticated attacker who controls, or can obtain certificates from, a name-constrained intermediate CA already present in a chain the victim validates can craft a DN that prepends extra RDNs ahead of a copy of the permitted RDN sequence and have it accepted by PkixNameConstraintValidator.WithinDNSubtree. Vendor-released patches are available in the 2.7.0 codebase (commits 606e9153b97a265c70ca8293d21ec859344d7de8 and 75c3c576602886180ed92a63c89419e3bd63b392), and no public exploit code has been identified at time of analysis; exploitation is gated by the precondition that a name-constrained CA must already be positioned in the validated chain, so environments that do not enforce directoryName name constraints are unaffected.
RemediationAI
Upgrade bc-csharp to the vendor-released fixed version 2.7.0 or later, which anchors directoryName name-constraint matching at index 0 so the permitted RDNSequence must be an initial prefix of the subject DN, per RFC 5280 sections 4.2.1.10 and 7.1; the upstream fixes are visible in commits 606e9153b97a265c70ca8293d21ec859344d7de8 and 75c3c576602886180ed92a63c89419e3bd63b392, and upgrade guidance is at https://github.com/bcgit/bc-csharp/wiki/CVE-2026-63577. If an immediate rebuild is not possible, ensure that the relaxed GSMA SGP.22 directoryName matching mode is not enabled, since the patched code only permits that looser anywhere-match behavior when the Org.BouncyCastle.X509.Sgp22NameConstraints property is explicitly set and defaults it to off; leaving it unset preserves strict RFC 5280 prefix semantics. As a further compensating control with a real trade-off, environments that do not need directoryName name constraints can avoid relying on them for trust decisions and instead apply their own subject-DN prefix validation against the issuing CA's permitted subtree before accepting a chain, though this duplicates PKIX logic and risks inconsistency with other validators; alternatively, restrict path building to trust anchors that do not delegate via name-constrained intermediates until the library is patched, at the cost of rejecting otherwise valid certificate chains. Note that patches in the 2.7.0 line also tighten empty-subtree handling so an empty permitted base no longer disables the permittedSubtrees restriction, so partial backports that only change the offset logic should be avoided.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The flaw is an improper certificate validation weakness (CWE-295) inside Bouncy Castle's C
PKIX implementation, specifically the directoryName name-constraint check in PkixNameConstraintValidator.WithinDNSubtree within crypto/src/pkix/PkixNameConstraintValidator.cs. RFC 5280 sections 4.2.1.10 and 7.1 require that a directoryName constraint embedded in a name-constrained CA certificate be satisfied only when the constraint's RDNSequence is an initial prefix of the subject DN's RDNSequence. The pre-2.7.0 implementation instead scanned the subject DN for a relative distinguished name equal to the constraint's first RDN anywhere in the sequence, recorded that offset, and then compared the remaining RDNs from there. Because the match was not anchored at index 0, an attacker could place arbitrary RDNs ahead of a verbatim copy of the permitted sequence (for example a subject such as C=FR, O=Attacker, C=US, O=TrustedOrg, CN=x evaluated as inside permitted subtree C=US, O=TrustedOrg) and still pass the permittedSubtrees check. The accompanying code change also hardens empty-subtree handling so that an empty permitted base cannot nullify the permittedSubtrees restriction, and adds a deliberately looser anywhere-match mode required by GSMA SGP.22 v2.5 (Remote SIM Provisioning) that is now gated behind the Org.BouncyCastle.X509.Sgp22NameConstraints property and defaults to off, leaving BC's default validation RFC 5280-strict. This vulnerability affects the certificate-validating distribution (CPE cpe:2.3:a:legion_of_the_bouncy_castle_inc.:bc-csharp), which is widely embedded in .NET applications performing X.509 path building and validation. The independently assessed vector (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N) characterizes this as a high-integrity-impact, network-reachable issue with high attack complexity and no required victim privileges or user interaction.
Know when Bc Csharp gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N
AC:H because exploitation needs both a name-constrained intermediate CA and a crafted RDN ordering; PR:N as no victim privileges are needed; impact is authentication bypass so I:H, C:N/A:N.
Primary rating from Vendor (bcorg).
CVSS VectorVendor: bcorg
DescriptionCVE.org
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.
Executive ViewAI
Organizations using the Bouncy Castle C
library (bc-csharp) before version 2.7.0 may face a breakdown in certificate trust enforcement, allowing certificates that should be rejected under name constraints to be accepted. This affects applications and services that rely on bc-csharp for PKIX path validation, particularly where name-constrained intermediate CAs are part of the trust chain. While no public exploit identified at time of analysis, leadership should prioritize remediation because the flaw can undermine certificate-based access controls and enable impersonation or unauthorized trust if exploited.
Apply vendor patch.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
Crafted small-order or out-of-range Diffie-Hellman values passed to DHAgreement.CalculateAgreement in Bouncy Castle C# (
Memory exhaustion in Bouncy Castle C# (bc-csharp) before 2.7.0 allows a remote, unauthenticated attacker to cause a deni
Memory-exhaustion denial of service in the C# DTLS implementation of Bouncy Castle (bc-csharp) before 2.7.0 lets a remot
Denial of service in Legion of the Bouncy Castle's C# cryptography library (bc-csharp) before 2.7.0 lets an unauthentica
Uncontrolled recursion in Bouncy Castle C# (bc-csharp) before 2.7.0 allows unauthenticated remote attackers to crash or
Denial of service in Legion of the Bouncy Castle Inc. bc-csharp before 2.7.0 allows unauthenticated remote attackers to
Denial of service in the Legion of the Bouncy Castle C# library (bc-csharp) affects all versions before 2.7.0, where qua
Authentication-tag forgery in Legion of the Bouncy Castle Inc. bc-csharp (Bouncy Castle C#) before 2.7.0 lets a remote,
Forged X.509 attribute certificates are accepted as valid by Legion of the Bouncy Castle Inc. bc-csharp versions before
Observable padding discrepancy in the IES/ECIES decryption path of Bouncy Castle C# (bc-csharp) before 2.7.0 lets an una
RSA PKCS#1 v1.5 key transport in the Bouncy Castle C# (bc-csharp) CMS implementation before 2.7.0 is vulnerable to a Ble
Information disclosure in Bouncy Castle C# (bc-csharp) versions before 2.7.0 allows unauthenticated remote attackers to
EUVD-2026-91228
GHSA-437r-hr8h-5f45
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB