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… (CVE-2026-18040)
Bouncy Castle for Java versions before 1.86 contain side-channel vulnerabilities in the HQC implementation. These vulnerabilities arise from the use of lookup tables in GF(2^8) arithmetic and a fixed-weight support sampler that leaks secret-derived data through cache timing and branch behavior. An attacker observing cache or timing behavior during encapsulation or decapsulation could potentially recover information about the HQC private key. The vulnerabilities have been addressed by removing table lookups and making the sampler branch-free within candidate batches.
AI Analysis
Technical Summary
In Bouncy Castle for Java prior to version 1.86, the HQC cryptographic scheme leaked secret-derived data via two side channels. First, the GF(2^8) arithmetic used lookup tables indexed by secret field elements, causing cache line accesses to depend on secret data. Second, the fixed-weight support sampler leaked information by exiting duplicate scans early upon collision and storing accepted positions at secret indices, with these operations running on secret inputs during encapsulation and decapsulation. The sampler also re-expands the secret key from its seed on every decapsulation, increasing exposure. These side channels allow attackers who can observe cache behavior or decapsulation timing to gain information about the HQC private key. The issue was fixed by eliminating table lookups in field arithmetic and making the sampler branch-free within candidate batches, without changing output or randomness consumption.
Potential Impact
The side-channel vulnerabilities allow attackers with the capability to monitor cache behavior or timing during cryptographic operations to recover partial information about the HQC private key. This leakage compromises the confidentiality of the private key used in encapsulation and decapsulation, potentially undermining the security of cryptographic operations relying on HQC in affected Bouncy Castle versions.
Mitigation Recommendations
A fixed version of Bouncy Castle for Java (version 1.86 or later) addresses these side-channel leaks by removing lookup tables from GF(2^8) arithmetic and making the fixed-weight support sampler branch-free. Users should upgrade to version 1.86 or later to mitigate these vulnerabilities. No other mitigation actions are indicated.
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… (CVE-2026-18040)
Description
Bouncy Castle for Java versions before 1.86 contain side-channel vulnerabilities in the HQC implementation. These vulnerabilities arise from the use of lookup tables in GF(2^8) arithmetic and a fixed-weight support sampler that leaks secret-derived data through cache timing and branch behavior. An attacker observing cache or timing behavior during encapsulation or decapsulation could potentially recover information about the HQC private key. The vulnerabilities have been addressed by removing table lookups and making the sampler branch-free within candidate batches.
CVSS v4.0
Affected software
pkg:maven/org.bouncycastle/bcprov-jdk15onRun on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
In Bouncy Castle for Java prior to version 1.86, the HQC cryptographic scheme leaked secret-derived data via two side channels. First, the GF(2^8) arithmetic used lookup tables indexed by secret field elements, causing cache line accesses to depend on secret data. Second, the fixed-weight support sampler leaked information by exiting duplicate scans early upon collision and storing accepted positions at secret indices, with these operations running on secret inputs during encapsulation and decapsulation. The sampler also re-expands the secret key from its seed on every decapsulation, increasing exposure. These side channels allow attackers who can observe cache behavior or decapsulation timing to gain information about the HQC private key. The issue was fixed by eliminating table lookups in field arithmetic and making the sampler branch-free within candidate batches, without changing output or randomness consumption.
Potential Impact
The side-channel vulnerabilities allow attackers with the capability to monitor cache behavior or timing during cryptographic operations to recover partial information about the HQC private key. This leakage compromises the confidentiality of the private key used in encapsulation and decapsulation, potentially undermining the security of cryptographic operations relying on HQC in affected Bouncy Castle versions.
Mitigation Recommendations
A fixed version of Bouncy Castle for Java (version 1.86 or later) addresses these side-channel leaks by removing lookup tables from GF(2^8) arithmetic and making the fixed-weight support sampler branch-free. Users should upgrade to version 1.86 or later to mitigate these vulnerabilities. No other mitigation actions are indicated.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-rxw8-22c7-wgq6
- Osv Schema Version
- 1.4.0
- Aliases
- ["CVE-2026-18040"]
- Database Specific Severity
- MODERATE
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 6ac1397ba43b0b3b89d63c12
Added to database: 10/03/2026, 17:20:59 UTC
Last enriched: 10/03/2026, 17:29:44 UTC
Last updated: 10/04/2026, 02:46:03 UTC
Views: 3
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.