Impact
The vulnerability lies in the key‑size validation of Bouncy Castle’s CMS key‑transport recipient when an RFC 9709 HKDF‑derived key is used. The library performs a comparison between an encrypted‑key byte array and an ASN1ObjectIdentifier that always evaluates to false, causing the code to fall back to an outer wrapper OID that lacks a defined key size. Because the size check is skipped, a key whose length does not match the advertised encryption algorithm is accepted even when key‑size validation is explicitly enabled. This flaw silently defeats the only mechanism the API provides for enforcing recovered key size, potentially compromising confidentiality.
Affected Systems
The affected products are Bouncy Castle for Java (BC‑JAVA) before version 1.86 and Bouncy Castle for FIPS (BC‑FJA) before bcpkix‑fips 2.0.13 and 2.1.13. Any application that imports CMS or AuthEnvelopedData and relies on the library’s key‑size validation for RFC 9709 HKDF content‑encryption keys can be impacted.
Risk and Exploitability
With a CVSS score of 6.9 the vulnerability is considered moderate. The EPSS score is < 1 % and it is not listed in the CISA KEV catalog. Based on the description, the attack vector is inferred to be a crafted CMS or AuthEnvelopedData message that contains an HKDF‑derived key whose length does not match the advertised algorithm and is delivered to a target that uses the vulnerable library with key‑size validation turned on. Once exploited, the flaw allows the recipient to process a message with an invalid key size, undermining the integrity of the cryptographic protection.
OpenCVE Enrichment