Skip to main content

CVE-2026-71892: CWE-697 Incorrect Comparison in Legion of the Bouncy Castle Inc. BC-JAVA

0
Medium
VulnerabilityCVE-2026-71892cvecve-2026-71892cwe-697
Published: 10/03/2026 (10/03/2026, 08:30:26 UTC)
Source: CVE Database V5
Vendor/Project: Legion of the Bouncy Castle Inc.
Product: BC-JAVA

Description

CVE-2026-71892 is a medium severity vulnerability in Bouncy Castle for Java (BC-JAVA) before version 1.86 and certain FIPS versions. The issue involves an incorrect comparison in the key-size validation logic for CMS key-transport recipients when using RFC 9709 content-encryption key derivation (HKDF with SHA-256). This flaw causes the key-size validation to be bypassed, allowing acceptance of keys that do not match the expected size, even when validation is enabled. The problem affects versions 1.78 up to but not including 1.86, 2.0.7 up to but not including 2.0.13, and 2.1.0 up to but not including 2.1.13. The vulnerability does not affect messages without HKDF or recipients that do not enable validation. No known exploits are reported in the wild.

CVSS v4.0

Score 6.9medium

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
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/U:Amber

Affected software

Legion of the Bouncy Castle Inc.

BC-JAVA

Affected versions
>=1.78 <1.86

Legion of the Bouncy Castle Inc.

BC-FJA

Affected versions
>=2.0.7 <2.0.13>=2.1.0 <2.1.13
GitHub Actionsmore threats →cve
bcpkix
pkg:github/bcpkix
Affected versions
>=1.78 <1.86

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, 09:01:23 UTC

Technical Analysis

In Bouncy Castle for Java versions prior to 1.86, the opt-in key-size validation for CMS key-transport recipients using RFC 9709 content-encryption key derivation (id-alg-cek-hkdf-sha256) fails due to an incorrect comparison between a byte array and an ASN1ObjectIdentifier. This causes the validation branch to skip checking the recovered key size against the actual content-encryption algorithm, instead falling back to an outer wrapper OID that lacks a registered key size. Consequently, keys derived via HKDF that do not match the advertised content-encryption algorithm's key size are accepted silently, defeating the validation mechanism. The issue also affects Bouncy Castle for Java FIPS versions before bcpkix-fips 2.0.13 and 2.1.13. The fix involves dispatching validation based on the inner content-encryption algorithm's OID, ensuring correct key size checks. Non-HKDF messages and recipients without validation enabled are unaffected.

Potential Impact

The vulnerability allows CMS key-transport recipients using HKDF-based content-encryption key derivation to accept keys with incorrect sizes despite explicit key-size validation being enabled. This undermines the security guarantees of the key-size validation mechanism, potentially allowing cryptographic operations with keys that do not meet expected size requirements. However, messages without HKDF or recipients not enabling validation are not impacted. There are no reports of active exploitation in the wild.

Mitigation Recommendations

A fix is available in Bouncy Castle for Java versions 1.86 and later, and in BC-FJA versions 2.0.13 and later (2.0.X series) and 2.1.13 and later (2.1.X series). Users should upgrade to these fixed versions to ensure proper key-size validation. Until upgraded, enabling key-size validation on HKDF-based messages does not provide the intended security benefit. Patch status is confirmed by vendor advisory information embedded in the description. No additional mitigations are indicated.

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

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: 6ac0c0f9a43b0b3b89b059bc

Added to database: 10/03/2026, 08:46:49 UTC

Last enriched: 10/03/2026, 09:01:23 UTC

Last updated: 10/03/2026, 13:17:58 UTC

Views: 7

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