PKIXCertPathReviewer does not apply X.509 name constraints to the target certificate
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
CVE-2026-71889
Primary source · Revision 1
Imported from structured advisory data. Source references identify upstream records or fields; verify affected versions and your deployed configuration.
Security context
Source reference: cve:CVE-2026-71889
BC-JAVA
Source reference: /containers/cna/affected/0/product
- Affected versions
- Not stated in this record
- Fixed versions
- Not stated in this record
- Prerequisites
- Not stated in this record
BC-JAVA
Source reference: /containers/cna/affected/1/product
- Affected versions
- Not stated in this record
- Fixed versions
- Not stated in this record
- Prerequisites
- Not stated in this record
BC-LTS-JAVA
Source reference: /containers/cna/affected/2/product
- Affected versions
- Not stated in this record
- Fixed versions
- Not stated in this record
- Prerequisites
- Not stated in this record
BC-FJA
Source reference: /containers/cna/affected/3/product
- Affected versions
- Not stated in this record
- Fixed versions
- Not stated in this record
- Prerequisites
- Not stated in this record
Structured affected-version data
Original package identities and version rules from this source.
[
{
"repo": "https://github.com/bcgit/bc-java",
"vendor": "Legion of the Bouncy Castle Inc.",
"modules": [
"pkix"
],
"product": "BC-JAVA",
"versions": [
{
"status": "affected",
"version": "0",
"lessThan": "1.86",
"versionType": "maven"
}
],
"platforms": [
"all"
],
"packageURL": "pkg:maven/org.bouncycastle/bcpkix-jdk18on",
"packageName": "bcpkix",
"programFiles": [
"PKIXCertPathReviewer"
],
"collectionURL": "https://www.bouncycastle.org/download/bouncy-castle-java/",
"defaultStatus": "unaffected"
},
{
"repo": "https://github.com/bcgit/bc-java",
"vendor": "Legion of the Bouncy Castle Inc.",
"modules": [
"prov"
],
"product": "BC-JAVA",
"versions": [
{
"status": "affected",
"version": "0",
"lessThan": "1.86",
"versionType": "maven"
}
],
"platforms": [
"all"
],
"packageURL": "pkg:maven/org.bouncycastle/bcprov-jdk18on",
"packageName": "bcprov",
"programFiles": [
"PKIXCertPathReviewer"
],
"collectionURL": "https://www.bouncycastle.org/download/bouncy-castle-java/",
"defaultStatus": "unaffected"
},
{
"repo": "https://github.com/bcgit/bc-lts-java",
"vendor": "Legion of the Bouncy Castle Inc.",
"modules": [
"pkix"
],
"product": "BC-LTS-JAVA",
"versions": [
{
"status": "affected",
"version": "2.73.0",
"lessThan": "2.73.13",
"versionType": "maven"
}
],
"platforms": [
"all"
],
"packageURL": "pkg:maven/org.bouncycastle/bcpkix-lts8on",
"packageName": "bcpkix-lts8on",
"programFiles": [
"PKIXCertPathReviewer"
],
"collectionURL": "https://www.bouncycastle.org/download/bouncy-castle-java-lts/",
"defaultStatus": "unaffected"
},
{
"vendor": "Legion of the Bouncy Castle Inc.",
"product": "BC-FJA",
"versions": [
{
"status": "affected",
"version": "1.0.4",
"lessThan": "1.0.13",
"versionType": "maven"
},
{
"status": "affected",
"version": "2.0.0",
"lessThan": "2.0.13",
"versionType": "maven"
},
{
"status": "affected",
"version": "2.1.0",
"lessThan": "2.1.13",
"versionType": "maven"
}
],
"platforms": [
"all"
],
"packageURL": "pkg:maven/org.bouncycastle/bcpkix-fips",
"packageName": "bcpkix-fips",
"collectionURL": "https://www.bouncycastle.org/download/bouncy-castle-java-fips/",
"defaultStatus": "unaffected"
}
]- Related CVEs
- CVE-2026-71889
Source reference:
/cveMetadata/cveId
Publisher severity
high
Source reference: /containers/cna/metrics
- Event
- #8802 · Revision 1
- Added to Heist Feed
- Publisher date