Incorrect Comparison Affecting org.bouncycastle:bcpkix-fips package, versions [2.0.7,2.0.13)[2.1.0,2.1.13)


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.17% (7th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-JAVA-ORGBOUNCYCASTLE-20536917
  • published6 Oct 2026
  • disclosed3 Oct 2026
  • creditYu Bao

Introduced: 3 Oct 2026

NewCVE-2026-71892  (opens in a new tab)
CWE-697  (opens in a new tab)

How to fix?

Upgrade org.bouncycastle:bcpkix-fips to version 2.0.13, 2.1.13 or higher.

Overview

Affected versions of this package are vulnerable to Incorrect Comparison through the JceKeyTransRecipient key transport path in pkix/src/main/java/org/bouncycastle/cms/jcajce/JceKeyTransRecipient.java. An attacker can bypass the opt-in key-size check and have an EnvelopedData or AuthEnvelopedData message accepted by supplying an RFC 9709 HKDF-based content-encryption key transport where the transported key size does not match the advertised content-encryption algorithm. When setKeySizeValidation(true) is enabled, the recipient processes the CMS message but the validation branch never reaches the actual content-encryption algorithm for this HKDF case, so the mismatched recovered key is accepted instead of being rejected. This leaves applications that rely on key-size validation to enforce CMS recipient policy exposed to silently accepted messages with the wrong key size.

CVSS Base Scores

version 4.0
version 3.1