Skip to content
RedCVE

CVE-2026-71892Legion OF The Bouncy Castle Inc BC-JAVA incorrect comparison

CVSS score

6.9

Medium

CVSS 4.0 from 91579145-5d7b-4cc5-b925-a0262ff19630

Exploit probability (EPSS)

0.17%

0.17% chance of exploitation in the next 30 days, higher than 6.77% of all CVEs.

CISA KEV

Not in KEV

No confirmed exploitation reported by CISA so far.

Official description

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 Java FIPS (BC-FJA) before bcpkix-fips 2.0.13 (2.0.X series) and 2.1.13 (2.1.X series).

Source: NVD · CNA: 91579145-5d7b-4cc5-b925-a0262ff19630

How to fix it, step by step

  1. Check whether you're affected

    Find every system running Legion of the Bouncy Castle Inc. BC-JAVA, Legion of the Bouncy Castle Inc. BC-FJA and compare its version with the affected versions.

  2. Update to a fixed version

    • Update BC-FJA to 2.0.13, 2.1.13 or later, on the branch you run.
    • Update BC-JAVA to 1.86 or later.
  3. Confirm the fix

    Check that every affected system now reports a fixed version, and recheck the vendor's advisory: fixes are sometimes revised.

Was this useful?

How it can be exploited

Attack vector
Network
Attack complexity
Low
Attack requirements
None
Privileges required
None
User interaction
None
Confidentiality
Low
Integrity
Low
Availability
None

Values in red make the vulnerability easier to exploit or more damaging. 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 products

Affected productsVersions
Legion of the Bouncy Castle Inc. BC-JAVA≥ 1.78, < 1.86
Legion of the Bouncy Castle Inc. BC-FJA≥ 2.0.7, < 2.0.13 · ≥ 2.1.0, < 2.1.13

Weakness

Timeline

  1. Published:
  2. Last modified:

Frequently asked questions

Is CVE-2026-71892 being exploited?

There is no confirmed exploitation in CISA's KEV catalog so far. Its EPSS score estimates a 0.2% probability of exploitation in the next 30 days.

What is the CVSS score of CVE-2026-71892?

CVE-2026-71892 has a CVSS 4.0 base score of 6.9 (medium).

Which versions are affected?

Legion OF The Bouncy Castle Inc BC-JAVA (≥ 1.78, < 1.86), Legion OF The Bouncy Castle Inc BC-FJA (≥ 2.0.7, < 2.0.13; ≥ 2.1.0, < 2.1.13)

Is there a patch for CVE-2026-71892?

The official record links to vendor advisories or patches; see “What to do” above.

References

Data: NVD, CVE.org (cvelistV5), CISA KEV and FIRST EPSS. Summary written by RedCVE with AI assistance from the official data.