CVE-2026-71889: CWE-295 Improper Certificate Validation in Legion of the Bouncy Castle Inc. BC-JAVA
In Bouncy Castle for Java before 1.86, neither copy of PKIXCertPathReviewer - org.bouncycastle.pkix.jcajce.PKIXCertPathReviewer nor the legacy org.bouncycastle.x509.PKIXCertPathReviewer - applied X.509 name constraints to the end-entity certificate. checkNameConstraints walked the path with a loop bound of index greater than zero, which is the bound the CA-only steps require, but index zero is the target certificate under the standard CertPath ordering, so the permitted and excluded subtree checks of RFC 5280 sec. 6.1.3 (b) and (c) never ran against the leaf's subject DN or its subjectAltName. A chain whose leaf violated a NameConstraints extension imposed by its own issuing CA therefore reported isValidCertPath() true with an empty error list, while CertPathValidator.getInstance("PKIX", "BC"), which shares no code with the reviewer, rejected the identical chain against the identical trust anchor. An application using the reviewer to make the trust decision rather than for diagnostics alongside a real validation accepted a certificate the constrained CA was never authorised to issue. Both copies now check every certificate in the path including the target, waive the sec. 4.2.1.10 self-issued exemption for the final certificate as sec. 6.1.3 requires, and skip the sec. 6.1.4 (g) constraint-accumulation step for the target. This issue also affects Bouncy Castle for Java LTS before 2.73.13, which carries only the org.bouncycastle.pkix.jcajce copy of the reviewer. It also affects Bouncy Castle for Java FIPS (BC-FJA) before bcpkix-fips 1.0.13 (1.0.X series), 2.0.13 (2.0.X series) and 2.1.13 (2.1.X series).
AI Analysis
Technical Summary
The vulnerability in BC-JAVA before version 1.86 and specific LTS and FIPS versions stems from the PKIXCertPathReviewer classes not applying X.509 name constraints to the leaf certificate in a certificate chain. The checkNameConstraints method iterated over the certificate path starting from index greater than zero, skipping the leaf certificate at index zero, thus omitting permitted and excluded subtree checks mandated by RFC 5280 section 6.1.3 (b) and (c). Consequently, certificate chains with leaf certificates violating name constraints were incorrectly validated as valid by the reviewer, although the standard CertPathValidator rejected them. The fix involves updating the reviewer to check every certificate including the leaf, properly applying the constraints and exemptions as per RFC 5280 requirements.
Potential Impact
Applications relying solely on the PKIXCertPathReviewer for trust decisions could accept certificates that violate name constraints imposed by their issuing CAs, potentially allowing unauthorized certificates to be trusted. This undermines the integrity of certificate validation and could lead to security breaches where constrained CAs issue certificates outside their authorized scope. However, the standard CertPathValidator implementation was not affected and correctly rejected such invalid chains.
Mitigation Recommendations
A fix is available in BC-JAVA version 1.86 and later, as well as in LTS version 2.73.13 and FIPS versions bcpkix-fips 1.0.13, 2.0.13, and 2.1.13. Users should upgrade to these fixed versions to ensure proper name constraint validation. Until upgraded, applications should avoid using PKIXCertPathReviewer alone for trust decisions and instead rely on the standard CertPathValidator for certificate path validation.
CVE-2026-71889: CWE-295 Improper Certificate Validation in Legion of the Bouncy Castle Inc. BC-JAVA
Description
In Bouncy Castle for Java before 1.86, neither copy of PKIXCertPathReviewer - org.bouncycastle.pkix.jcajce.PKIXCertPathReviewer nor the legacy org.bouncycastle.x509.PKIXCertPathReviewer - applied X.509 name constraints to the end-entity certificate. checkNameConstraints walked the path with a loop bound of index greater than zero, which is the bound the CA-only steps require, but index zero is the target certificate under the standard CertPath ordering, so the permitted and excluded subtree checks of RFC 5280 sec. 6.1.3 (b) and (c) never ran against the leaf's subject DN or its subjectAltName. A chain whose leaf violated a NameConstraints extension imposed by its own issuing CA therefore reported isValidCertPath() true with an empty error list, while CertPathValidator.getInstance("PKIX", "BC"), which shares no code with the reviewer, rejected the identical chain against the identical trust anchor. An application using the reviewer to make the trust decision rather than for diagnostics alongside a real validation accepted a certificate the constrained CA was never authorised to issue. Both copies now check every certificate in the path including the target, waive the sec. 4.2.1.10 self-issued exemption for the final certificate as sec. 6.1.3 requires, and skip the sec. 6.1.4 (g) constraint-accumulation step for the target. This issue also affects Bouncy Castle for Java LTS before 2.73.13, which carries only the org.bouncycastle.pkix.jcajce copy of the reviewer. It also affects Bouncy Castle for Java FIPS (BC-FJA) before bcpkix-fips 1.0.13 (1.0.X series), 2.0.13 (2.0.X series) and 2.1.13 (2.1.X series).
CVSS v4.0
Score 8.7high
Affected software
Legion of the Bouncy Castle Inc.
BC-JAVA
Legion of the Bouncy Castle Inc.
BC-LTS-JAVA
Legion of the Bouncy Castle Inc.
BC-FJA
pkg:github/bcpkix-lts8onRun 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-JAVA before version 1.86 and specific LTS and FIPS versions stems from the PKIXCertPathReviewer classes not applying X.509 name constraints to the leaf certificate in a certificate chain. The checkNameConstraints method iterated over the certificate path starting from index greater than zero, skipping the leaf certificate at index zero, thus omitting permitted and excluded subtree checks mandated by RFC 5280 section 6.1.3 (b) and (c). Consequently, certificate chains with leaf certificates violating name constraints were incorrectly validated as valid by the reviewer, although the standard CertPathValidator rejected them. The fix involves updating the reviewer to check every certificate including the leaf, properly applying the constraints and exemptions as per RFC 5280 requirements.
Potential Impact
Applications relying solely on the PKIXCertPathReviewer for trust decisions could accept certificates that violate name constraints imposed by their issuing CAs, potentially allowing unauthorized certificates to be trusted. This undermines the integrity of certificate validation and could lead to security breaches where constrained CAs issue certificates outside their authorized scope. However, the standard CertPathValidator implementation was not affected and correctly rejected such invalid chains.
Mitigation Recommendations
A fix is available in BC-JAVA version 1.86 and later, as well as in LTS version 2.73.13 and FIPS versions bcpkix-fips 1.0.13, 2.0.13, and 2.1.13. Users should upgrade to these fixed versions to ensure proper name constraint validation. Until upgraded, applications should avoid using PKIXCertPathReviewer alone for trust decisions and instead rely on the standard CertPathValidator for certificate path validation.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- bcorg
- Date Reserved
- 2026-08-08T00:06:07.401Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 6ac0c0f9a43b0b3b89b059bb
Added to database: 10/03/2026, 08:46:49 UTC
Last enriched: 10/03/2026, 09:01:02 UTC
Last updated: 10/04/2026, 04: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.