Skip to main content
EPSS 0.1%top 99%

CVE-2026-18040: CWE-208 Observable Timing Discrepancy in Legion of the Bouncy Castle Inc. BC-JAVA

0
Medium
VulnerabilityCVE-2026-18040cvecve-2026-18040cwe-208
Published: 10/03/2026 (10/03/2026, 08:55:06 UTC)
Source: CVE Database V5
Vendor/Project: Legion of the Bouncy Castle Inc.
Product: BC-JAVA

Description

CVE-2026-18040 is a medium severity vulnerability in Bouncy Castle for Java versions 1.73 up to but not including 1.86. It involves observable timing and cache side channels in the HQC cryptographic implementation, which leak secret-derived data during encapsulation and decapsulation. The flaw arises from lookup tables used in GF(2^8) arithmetic and a fixed-weight support sampler that reveals secret indices through timing differences. These side channels can allow an attacker with the ability to observe cache behavior or timing to gain information about the private key. The vulnerability has been addressed by removing table lookups and making the sampler branch-free, preserving output and randomness consumption.

CVSS v4.0

Score 5.9medium

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
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

Affected software

Legion of the Bouncy Castle Inc.

BC-JAVA

Affected versions
>=1.73 <1.86
GitHub Actionsmore threats →cve
bcprov
pkg:github/bcprov
Affected versions
>=1.73 <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, 14:55:13 UTC

Technical Analysis

In Bouncy Castle for Java versions >=1.73 and <1.86, the HQC cryptographic scheme leaks secret-derived data via two side channels: (1) GF(2^8) arithmetic uses lookup tables indexed by secret field elements, causing cache line access patterns dependent on secret data; (2) the fixed-weight support sampler exits its duplicate scan early upon collision and stores accepted positions at secret indices, causing timing discrepancies. Both operations run on secret inputs during encapsulation and decapsulation, with the sampler re-expanding the secret key from its seed on every decapsulation. An attacker able to observe cache behavior or decapsulation timing can thus recover information about the HQC private key. The fix replaces table-based arithmetic with table-free methods and makes the sampler branch-free within candidate batches, eliminating these side channels without changing output or randomness consumption.

Potential Impact

The vulnerability allows attackers who can observe 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, potentially weakening the security guarantees of the cryptographic scheme. However, exploitation requires local observation capabilities (local vector attack) and high attack complexity, reflected in the medium CVSS score of 5.9.

Mitigation Recommendations

A fixed version of Bouncy Castle for Java is available starting from version 1.86, which removes the vulnerable table lookups and timing branches. Users should upgrade to version 1.86 or later to mitigate this vulnerability. No additional mitigation is required once upgraded. Since this is not a cloud service, remediation depends on user upgrade.

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

Technical Details

Data Version
5.2
Assigner Short Name
bcorg
Date Reserved
2026-07-28T08:50:28.760Z
Cvss Version
4.0
State
PUBLISHED

Threat ID: 6ac11721a43b0b3b89cacf54

Added to database: 10/03/2026, 14:54:25 UTC

Last enriched: 10/03/2026, 14:55:13 UTC

Last updated: 10/04/2026, 05:45:56 UTC

Views: 12

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