Skip to main content
EPSS 0.1%top 99%

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)

0
Medium
Published: 10/03/2026 (10/03/2026, 09:31:18 UTC)
Source: GCVE Database

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

Attack Vector
Local
Attack Complexity
High
Attack Requirements
Present
Privileges Required
None
User Interaction
None
Vuln. Confidentiality
High
Vuln. Integrity
None
Vuln. Availability
None
Subsq. Confidentiality
None
Subsq. Integrity
None
Subsq. Availability
None
Scope
X
CVSS:4.0/AV:L/AC:H/AT:P/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:Amber

Affected software

org.bouncycastle/bcprov-jdk15on
pkg:maven/org.bouncycastle/bcprov-jdk15on
Affected versions
<1.86

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 10/03/2026, 17:29:44 UTC

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.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

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 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses