CVE-2026-18040
MediumCVSS 5.9Exploitation Probability (EPSS)
Low risk1th percentile - higher than 1% of all known CVEs
Summary
In Bouncy Castle for Java before 1.86, the HQC implementation leaked secret-derived data through two side channels: GF(2^8) arithmetic used lookup tables indexed by field elements, and the fixed-weight support sampler stopped scanning on collision and stored positions at a secret index. An attacker observing cache behavior or decapsulation timing can recover information about the HQC private key.
Risk Assessment
An attacker with local cache access or timing measurement could recover the HQC private key, undermining the confidentiality of communications protected by this algorithm.
Recommendation
Update Bouncy Castle for Java to version 1.86 or later, which eliminates the side channel via table-free arithmetic and a branch-free sampler.
Other vulnerabilities in Bouncy Castle for Java
See all- CVE-2026-97873Medium
In Bouncy Castle for Java before 1.86 (and LTS before 2.73.13), the legacy PBES1 and PKCS#12 PBE families used an unbounded iteration count from untrusted input, allowing a small input to dictate arbitrary work. The fix rejects negative or over-limit counts (default 10,000,000) via the org.bouncycastle.pbe.max_iteration_count property.
- CVE-2026-71890High
In Bouncy Castle for Java before 1.86, validation of an MLS (RFC 9420) external commit's proposal list failed to verify that the removed leaf actually belonged to the joiner. This missing check allowed any party holding the group's public GroupInfo to send a commit with a Remove proposal naming any member, causing that member to be evicted and their slot in the ratchet tree to be taken over. The fix requires the removed leaf's credential to match the joiner's own new leaf credential on both the sending and receiving side.
- CVE-2026-71888High
In Bouncy Castle for Java before 1.86, the streaming CMS AuthenticatedData parser accepted messages where digestAlgorithm and authAttrs disagreed about whether authenticated attributes were present. The parser chose based on digestAlgorithm alone, so it could verify the content MAC and then return attributes via getAuthAttrs() as though they had been authenticated, even though the MAC never covered them. This also affects LTS before 2.73.13 and FIPS releases (BC-FJA) before the corresponding bcpkix-fips and bcutil-fips versions.
- CVE-2026-71887High
In Bouncy Castle for Java before 1.86, the high-level OpenPGP API accepted a data signature made by a signing subkey whose Subkey Binding signature carried no embedded Primary Key Binding (cross-certification) signature when that binding omitted a Key Flags subpacket. isSigningKey() inherited SIGN_DATA from the primary key via getKeyFlags() and getApplyingSubpacket(), while verifyEmbeddedPrimaryKeyBinding() read only the binding signature's own hashed subpackets and treated the subkey as non-signing, so the same subkey was both signing-capable and exempt from cross-certification.
- CVE-2026-18036High
A side-channel vulnerability exists in the NTRU implementation of Bouncy Castle for Java before version 1.86. The reduction of secret values using the % operator in three helper functions causes execution time to depend on the secret operand (division by a variable), potentially allowing an attacker to recover information about the NTRU private key through timing measurements.
- CVE-2026-17507High
In the MLS implementation (RFC 9420) of Bouncy Castle for Java before 1.86, the uint32 leaf_index is stored as a signed int, allowing a wire value with the top bit set to decode as a negative number. Incorrect comparison in GroupKeySet.SecretTree.hasLeaf and Group.validateRemove allows bypassing membership checks, potentially leading to a DoS attack via unbounded growth of the node list and JVM heap exhaustion.
- CVE-2023-33201Medium
Bouncy Castle for Java before version 1.74 is affected by an LDAP injection vulnerability. This vulnerability affects applications that use an LDAP CertStore from Bouncy Castle to validate X.509 certificates, where the certificate's Subject Name is inserted into an LDAP search filter without proper escaping.
Original NVD description (English source)
In Bouncy Castle for Java before 1.86, HQC leaked secret-derived data through two side channels: its GF(2^8) arithmetic used lookup tables indexed by field elements, making the cache line touched a function of the operand, and its fixed-weight support sampler left its duplicate scan as soon as a collision was found and stored accepted positions at a secret index. Both run on secret inputs during encapsulation and decapsulation, and the sampler re-expands the secret key from its seed on every decapsulation, so an attacker able to observe cache behaviour or decapsulation timing can recover information about the HQC private key. The field arithmetic is now table-free and the sampler branch-free within a batch of candidates, with output and randomness consumption unchanged.
Vulnerability data from NVD (NIST) · CISA KEV · EPSS

