bouncycastle — security advisory
In Bouncy Castle for Java before 1.86, the opt-in key-size validation on CMS key-transport recipients, org.bouncycastle.cms.jcajce.JceKeyTransRecipient.setKeySizeValidation(true), never ran for a message using RFC 9709 content-encryption key derivation (id-alg-cek-hkdf-sha256). The branch that should have selected the actual content-encryption algorithm carried in the key derivation AlgorithmIdentifier's parameters compared the encrypted-key byte array against the id-alg-cek-hkdf-sha256 object identifier, a comparison between a byte array and an ASN1ObjectIdentifier that is false for every possible input, so the check fell through to a key-size lookup on the outer wrapper OID. That OID identifies a key-derivation construction rather than a cipher and has no registered key size, so the size comparison was skipped entirely. A key-transport EnvelopedData or AuthEnvelopedData whose transported, HKDF-derived content-encryption key did not match the key size of the advertised content-encryption algorithm was therefore accepted even with validation explicitly enabled, silently defeating the only mechanism the API offers for enforcing recovered key size. The recipient now dispatches on the content-encryption AlgorithmIdentifier's algorithm OID, so validation checks the recovered key against the inner content-encryption algorithm. Messages with a matching key size, non-HKDF messages, and recipients that do not enable validation are unaffected. This issue also affects Bouncy Castle for
- Products
- bouncycastle
- Affected versions
- 1.72-2, 1.77-1, 1.80-1, 1.80-2, 1.80-3, 1.86-1
- Fixed versions
- 1.86-1
- CVEs
- CVE-2026-71892
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 28 Oct 2026, 03:40 UTC · Revision 1
Source evidence
In Bouncy Castle for Java before 1.86, the opt-in key-size validation on CMS key-transport recipients, org.bouncycastle.cms.jcajce.JceKeyTransRecipient.setKeySizeValidation(true), never ran for a message using RFC 9709 content-encryption key derivation (id-alg-cek-hkdf-sha256). The branch that should have selected the actual content-encryption algorithm carried in the key derivation AlgorithmIdentifier's parameters compared the encrypted-key byte array against the id-alg-cek-hkdf-sha256 object identifier, a comparison between a byte array and an ASN1ObjectIdentifier that is false for every possible input, so the check fell through to a key-size lookup on the outer wrapper OID. That OID identifies a key-derivation construction rather than a cipher and has no registered key size, so the size comparison was skipped entirely. A key-transport EnvelopedData or AuthEnvelopedData whose transported, HKDF-derived content-encryption key did not match the key size of the advertised content-encryption algorithm was therefore accepted even with validation explicitly enabled, silently defeating the only mechanism the API offers for enforcing recovered key size. The recipient now dispatches on the content-encryption AlgorithmIdentifier's algorithm OID, so validation checks the recovered key against the inner content-encryption algorithm. Messages with a matching key size, non-HKDF messages, and recipients that do not enable validation are unaffected. This issue also affects Bouncy Castle for
osv:DEBIAN-CVE-2026-71892
bouncycastle
Fixed versions: Not specified
bouncycastle
Fixed versions: Not specified
bouncycastle
Fixed versions: 1.86-1
Complete source record
{
"id": "3bbb43f3f5300a19fdaccdca45401cad03bf1fde711c216fa8be4aec4f7b65ff",
"url": "https://osv.dev/vulnerability/DEBIAN-CVE-2026-71892",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "DEBIAN-CVE-2026-71892",
"summary": "In Bouncy Castle for Java before 1.86, the opt-in key-size validation on CMS key-transport recipients, org.bouncycastle.cms.jcajce.JceKeyTransRecipient.setKeySizeValidation(true), never ran for a message using RFC 9709 content-encryption key derivation (id-alg-cek-hkdf-sha256). The branch that should have selected the actual content-encryption algorithm carried in the key derivation AlgorithmIdentifier's parameters compared the encrypted-key byte array against the id-alg-cek-hkdf-sha256 object identifier, a comparison between a byte array and an ASN1ObjectIdentifier that is false for every possible input, so the check fell through to a key-size lookup on the outer wrapper OID. That OID identifies a key-derivation construction rather than a cipher and has no registered key size, so the size comparison was skipped entirely. A key-transport EnvelopedData or AuthEnvelopedData whose transported, HKDF-derived content-encryption key did not match the key size of the advertised content-encryption algorithm was therefore accepted even with validation explicitly enabled, silently defeating the only mechanism the API offers for enforcing recovered key size. The recipient now dispatches on the content-encryption AlgorithmIdentifier's algorithm OID, so validation checks the recovered key against the inner content-encryption algorithm. Messages with a matching key size, non-HKDF messages, and recipients that do not enable validation are unaffected. This issue also affects Bouncy Castle for",
"evidence": "osv:DEBIAN-CVE-2026-71892",
"products": [
{
"name": {
"value": "bouncycastle",
"evidence": "/affected/0/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "1.72-2",
"evidence": "/affected/0/versions"
},
{
"value": "1.77-1",
"evidence": "/affected/0/versions"
},
{
"value": "1.80-1",
"evidence": "/affected/0/versions"
},
{
"value": "1.80-2",
"evidence": "/affected/0/versions"
},
{
"value": "1.80-3",
"evidence": "/affected/0/versions"
},
{
"value": "1.86-1",
"evidence": "/affected/0/versions"
}
]
},
{
"name": {
"value": "bouncycastle",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "1.80-3",
"evidence": "/affected/1/versions"
},
{
"value": "1.86-1",
"evidence": "/affected/1/versions"
}
]
},
{
"name": {
"value": "bouncycastle",
"evidence": "/affected/2/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "1.86-1",
"evidence": "/affected/2/ranges"
}
],
"affected_versions": [
{
"value": "1.80-3",
"evidence": "/affected/2/versions"
}
]
}
],
"severity": "medium",
"structured": {
"id": "DEBIAN-CVE-2026-71892",
"aliases": [
"DEBIAN-CVE-2026-71892"
],
"metrics": [
{
"type": "CVSS_V4",
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:Amber"
}
],
"affected": [
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "bouncycastle",
"purl": "pkg:deb/debian/bouncycastle?arch=source&distro=bookworm",
"ecosystem": "Debian:12"
},
"versions": [
"1.72-2",
"1.77-1",
"1.80-1",
"1.80-2",
"1.80-3",
"1.86-1"
],
"database_specific": {
"source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2026-71892.json"
},
"ecosystem_specific": {
"urgency": "not yet assigned"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "bouncycastle",
"purl": "pkg:deb/debian/bouncycastle?arch=source&distro=trixie",
"ecosystem": "Debian:13"
},
"versions": [
"1.80-3",
"1.86-1"
],
"database_specific": {
"source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2026-71892.json"
},
"ecosystem_specific": {
"urgency": "not yet assigned"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
},
{
"fixed": "1.86-1"
}
]
}
],
"package": {
"name": "bouncycastle",
"purl": "pkg:deb/debian/bouncycastle?arch=source&distro=forky",
"ecosystem": "Debian:14"
},
"versions": [
"1.80-3"
],
"database_specific": {
"source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2026-71892.json"
},
"ecosystem_specific": {
"urgency": "not yet assigned"
}
}
],
"modified": "2026-10-07T09:47:32.018170489Z",
"provider": "osv",
"upstream": [
"CVE-2026-71892"
],
"references": [
"https://security-tracker.debian.org/tracker/CVE-2026-71892"
]
},
"related_cves": [
{
"value": "CVE-2026-71892",
"evidence": "/upstream"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 94652,
"published_at": "2026-10-03T09:17:05.913+00:00"
}