Description
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.
Published: 2026-10-03
Score: 5.9 Medium
EPSS: < 1% Very Low
KEV: No
Impact: Private Key Leakage via Side-Channel
Action: Patch Immediately
AI Analysis

Impact

Bouncy Castle for Java contains a side‑channel vulnerability that can expose the HQC private key through cache‑based and timing attacks. The flaw consists of two parts: the GF(2^8) arithmetic uses secret‑dependent lookup tables, causing cache line access patterns that reflect the key material; and the fixed‑weight sampler terminates early on a collision and stores positions at secret indices, creating observable timing behavior. An attacker who can measure cache accesses or encapsulation/decapsulation timing can recover portions of the private key, mapping to CWE‑208, Information Exposure.

Affected Systems

Legion of the Bouncy Castle Inc. produces the BC-Java library. Any Java application that loads a version of BC-Java older than 1.86, and performs HQC encapsulation or decapsulation, is vulnerable. The vulnerability affects all deployments that include those operations before the 1.86 release, which removes the table‑based arithmetic and makes the sampler branch‑free.

Risk and Exploitability

The CVSS v3 score of 5.9 indicates moderate severity. EPSS is not available, so current exploit prevalence is unclear; the vulnerability is not yet listed in the CISA KEV catalog. Based on the description, it is inferred that exploitation requires an observer who can monitor cache behavior or measure execution timing, such as a local user or an attacker with shared hyper‑visor resources. Because the side channel depends on secret inputs during encapsulation and decapsulation, repeated operations are needed to accumulate enough data to reconstruct the key. Recovering private key material would represent a serious compromise of confidentiality.

Generated by OpenCVE AI on October 3, 2026 at 11:21 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Bouncy Castle to version 1.86 or later, which removes the table‑based arithmetic and makes the sampler branch‑free.
  • If upgrading is not possible, disable or replace any use of HQC key encapsulation in the application with a different algorithm.
  • Apply operating‑system or hardware mitigations against cache‑timing attacks, such as enabling KASLR, page‑granularity cache flushing, or running the application in a dedicated enclave or virtual machine.
  • If the environment supports it, perform key encapsulation on a trusted hardware module or a dedicated secure server to isolate key usage from the main application code.

Generated by OpenCVE AI on October 3, 2026 at 11:21 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Mon, 05 Oct 2026 17:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Sun, 04 Oct 2026 20:45:00 +0000

Type Values Removed Values Added
First Time appeared Legion Of The Bouncy Castle Inc.
Legion Of The Bouncy Castle Inc. bc-java
Vendors & Products Legion Of The Bouncy Castle Inc.
Legion Of The Bouncy Castle Inc. bc-java

Sat, 03 Oct 2026 09:15:00 +0000

Type Values Removed Values Added
Description 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.
Title HQC leaks private key information through secret-indexed GF(2^8) tables and a secret-dependent fixed-weight sampler
Weaknesses CWE-208
References
Metrics cvssV4_0

{'score': 5.9, 'vector': '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/U:Amber'}


Subscriptions

Legion Of The Bouncy Castle Inc. Bc-java
cve-icon MITRE

Status: PUBLISHED

Assigner: bcorg

Published:

Updated: 2026-10-05T16:00:20.062Z

Reserved: 2026-07-28T08:50:28.760Z

Link: CVE-2026-18040

cve-icon Vulnrichment

Updated: 2026-10-05T16:00:13.080Z

cve-icon NVD

Status : Awaiting Analysis

Published: 2026-10-03T09:17:04.360

Modified: 2026-10-06T14:49:40.823

Link: CVE-2026-18040

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-10-04T20:30:18Z

Weaknesses
  • CWE-208

    Observable Timing Discrepancy