Skip to main content
EPSS 0.2%top 94%

In Bouncy Castle for Java before 1.86, the opt-in key-size validation on CMS key-transport recipients,… (CVE-2026-71892)

0
Medium
Published: 10/03/2026 (10/03/2026, 09:31:18 UTC)
Source: GCVE Database

Description

A vulnerability in Bouncy Castle for Java before version 1.86 affects the opt-in key-size validation for CMS key-transport recipients when using RFC 9709 content-encryption key derivation (id-alg-cek-hkdf-sha256). The validation logic incorrectly compares incompatible data types, causing the key-size check to be skipped. This allows acceptance of EnvelopedData or AuthEnvelopedData messages with mismatched key sizes despite validation being enabled. The issue also impacts Bouncy Castle for Java FIPS before versions 2.0.13 and 2.1.13. Non-HKDF messages and recipients without validation enabled are unaffected.

CVSS v4.0

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vuln. Confidentiality
Low
Vuln. Integrity
Low
Vuln. Availability
None
Subsq. Confidentiality
None
Subsq. Integrity
None
Subsq. Availability
None
Scope
X
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 software

org.bouncycastle/bcprov-jdk15on
pkg:maven/org.bouncycastle/bcprov-jdk15on
Affected versions
<1.86
org.bouncycastle/bc-fips
pkg:maven/org.bouncycastle/bc-fips
Affected versions
<2.0.13<2.1.13

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 10/03/2026, 17:29:39 UTC

Technical Analysis

In Bouncy Castle for Java versions prior to 1.86, the key-size validation mechanism for CMS key-transport recipients using RFC 9709 HKDF content-encryption key derivation fails due to a logic error. Specifically, the code compares the encrypted-key byte array against an ASN1ObjectIdentifier, which always evaluates to false, causing the validation to fall back to checking the outer wrapper OID. Since this OID represents a key-derivation construction without a registered key size, the key-size validation is effectively bypassed. Consequently, messages with HKDF-derived content-encryption keys that do not match the advertised key size are accepted even when validation is enabled. The fix involves dispatching based on the inner content-encryption algorithm's OID, ensuring proper key-size validation. This vulnerability also affects Bouncy Castle for Java FIPS versions before bcpkix-fips 2.0.13 and 2.1.13.

Potential Impact

The vulnerability allows CMS key-transport recipients to accept encrypted messages with mismatched key sizes when using HKDF key derivation, even if key-size validation is explicitly enabled. This silently defeats the only mechanism provided by the API to enforce recovered key size, potentially weakening cryptographic assurances. Messages without HKDF key derivation or recipients without validation enabled are not impacted. There is no indication of known exploits in the wild.

Mitigation Recommendations

A fix is available in Bouncy Castle for Java version 1.86 and in Bouncy Castle for Java FIPS versions 2.0.13 and 2.1.13. Users should upgrade to these versions or later to ensure proper key-size validation when using CMS key-transport recipients with HKDF key derivation. No additional mitigation is necessary if upgrading is performed.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Gcve Source
db.gcve.eu
Osv Id
GHSA-x42w-4gqh-qrvm
Osv Schema Version
1.4.0
Aliases
["CVE-2026-71892"]
Database Specific Severity
MODERATE
Cvss Version
4.0
State
PUBLISHED

Threat ID: 6ac1397ba43b0b3b89d63c0f

Added to database: 10/03/2026, 17:20:59 UTC

Last enriched: 10/03/2026, 17:29:39 UTC

Last updated: 10/04/2026, 02:46:06 UTC

Views: 3

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses