Skip to main content

Bouncy Castle bc-csharp CVE-2026-63577

| EUVDEUVD-2026-91228 HIGH
Improper Certificate Validation (CWE-295)
2026-10-02 bcorg GHSA-437r-hr8h-5f45
8.2
CVSS 4.0 · Vendor: bcorg
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Obtain name-constrained intermediate CA cert
  2. Delivery
    Craft leaf DN prepending RDNs before permitted sequence
  3. Exploit
    Present chain to bc-csharp PKIX validation
  4. Execution
    Name-constraint prefix check bypassed
  5. Impact
    Forged 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.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

bc-csharp 0 <2.7.0

Affected Packages

euvd bc_csharp fix: 2.7.0

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

Vendor (bcorg) PRIMARY 8.2 HIGH
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
vuln.today AI 5.9 MEDIUM

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.

3.1 AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N
4.0 AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N

Primary rating from Vendor (bcorg).

CVSS VectorVendor: bcorg

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
High
Vulnerable system: Availability
None
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

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

Why It Matters

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.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.2%
Top 87% exploitable
Prevalence
Medium
widely-used .NET crypto library, but name-constraint path validation is a niche usage
Data Quality
6 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GitHub VulDB

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.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact
High
Technical Impact
Partial

Priority Score

41
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +41
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

CVE-2026-63569 CRITICAL
9.1 Oct 02

Crafted small-order or out-of-range Diffie-Hellman values passed to DHAgreement.CalculateAgreement in Bouncy Castle C# (

CVE-2026-103603 HIGH
8.7 Oct 02

Memory exhaustion in Bouncy Castle C# (bc-csharp) before 2.7.0 allows a remote, unauthenticated attacker to cause a deni

CVE-2026-63566 HIGH
8.7 Oct 02

Memory-exhaustion denial of service in the C# DTLS implementation of Bouncy Castle (bc-csharp) before 2.7.0 lets a remot

CVE-2026-63568 HIGH
8.7 Oct 02

Denial of service in Legion of the Bouncy Castle's C# cryptography library (bc-csharp) before 2.7.0 lets an unauthentica

CVE-2026-103600 HIGH
8.7 Oct 02

Uncontrolled recursion in Bouncy Castle C# (bc-csharp) before 2.7.0 allows unauthenticated remote attackers to crash or

CVE-2026-63574 HIGH
8.7 Oct 02

Denial of service in Legion of the Bouncy Castle Inc. bc-csharp before 2.7.0 allows unauthenticated remote attackers to

CVE-2026-103604 HIGH
8.7 Oct 02

Denial of service in the Legion of the Bouncy Castle C# library (bc-csharp) affects all versions before 2.7.0, where qua

CVE-2026-16000 HIGH
8.7 Oct 02

Authentication-tag forgery in Legion of the Bouncy Castle Inc. bc-csharp (Bouncy Castle C#) before 2.7.0 lets a remote,

CVE-2026-63571 HIGH
8.7 Oct 02

Forged X.509 attribute certificates are accepted as valid by Legion of the Bouncy Castle Inc. bc-csharp versions before

CVE-2026-63567 HIGH
8.2 Oct 02

Observable padding discrepancy in the IES/ECIES decryption path of Bouncy Castle C# (bc-csharp) before 2.7.0 lets an una

CVE-2026-63573 HIGH
8.2 Oct 02

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

CVE-2026-103601 HIGH
8.2 Oct 02

Information disclosure in Bouncy Castle C# (bc-csharp) versions before 2.7.0 allows unauthenticated remote attackers to

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy