CVE-2026-71892
Description
A flaw was found in Bouncy Castle. A remote attacker can bypass cryptographic key-size validation by sending a crafted Cryptographic Message Syntax (CMS) message that uses key derivation. Due to an incorrect algorithm identifier comparison in the recipient handling logic, key-size verification is skipped even when explicitly enabled. This allows an attacker to supply encryption keys with unexpected or weaker key lengths, defeating security controls designed to enforce key sizes.
Statement
A flaw was found in Bouncy Castle's CMS implementation when validating key sizes on key-transport recipients. When processing messages utilizing RFC 9709 content-encryption key derivation (HKDF), an improper comparison between an ASN1ObjectIdentifier and a byte array causes key-size verification to be silently skipped even if explicitly enabled via setKeySizeValidation(true). A remote attacker can supply a crafted CMS message with unexpected or weaker key lengths, bypassing application cryptographic policy controls and degrading the integrity and confidentiality guarantees of encrypted content.
Mitigation
Validate decrypted content-encryption key lengths directly within application logic after recipient processing, or reject CMS envelopes utilizing RFC 9709 HKDF key derivation.
Common Vulnerability Scoring System (CVSS) Score Details
Info alert:Important note
CVSS scores for open source components depend on vendor-specific factors (e.g. version or build chain). Therefore, Red Hat's score and impact rating can be different from NVD and other vendors. Red Hat remains the authoritative CVE Naming Authority (CNA) source for its products and services (see Red Hat classifications).
The following CVSS metrics and score provided are preliminary and subject to review.
CVSS v3 Score Breakdown
| Red Hat | NVD | cve.org | |
|---|---|---|---|
| Base Score | 6.5 | N/A | N/A |
| Attack Vector | Network | N/A | N/A |
| Attack Complexity | Low | N/A | N/A |
| Privileges Required | None | N/A | N/A |
| User Interaction | None | N/A | N/A |
| Scope | Unchanged | N/A | N/A |
| Confidentiality | Low | N/A | N/A |
| Integrity Impact | Low | N/A | N/A |
| Availability Impact | None | N/A | N/A |
Vector
Red Hat: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N
Understanding the Weakness (CWE)
Other
Technical Impact: Varies by Context
Frequently Asked Questions
Not sure what something means? Check out our Security Glossary.
Want to get errata notifications? Sign up here.