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 HatNVDcve.org
Base Score6.5N/AN/A
Attack VectorNetworkN/AN/A
Attack ComplexityLowN/AN/A
Privileges RequiredNoneN/AN/A
User InteractionNoneN/AN/A
ScopeUnchangedN/AN/A
ConfidentialityLowN/AN/A
Integrity ImpactLowN/AN/A
Availability ImpactNoneN/AN/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

Want to get errata notifications? Sign up here.