CVE-2026-18036: CWE-208 Observable Timing Discrepancy in Legion of the Bouncy Castle Inc. BC-JAVA
In Bouncy Castle for Java before 1.86, NTRU reduced secret values with the % operator in three helpers whose reference implementations are deliberately division-free, so each reduction was carried out by an integer division whose latency depends on the secret operand. Polynomial.modQ divided by a variable divisor, which a compiler cannot strength-reduce to a multiply the way it can a constant one, so it emitted a division on every call including on the decapsulation path where the dividend derives from the private key; Polynomial.mod3 and NTRUSampling.mod3 divided the secret key polynomials f and g during key generation, the message polynomials r and m during encapsulation, and coefficients recovered during decapsulation. An attacker able to measure that timing can recover information about the NTRU private key. modQ now masks, which is exact because q is always a power of two, and mod3 uses the reference implementation's division-free fold and select; the results are unchanged.
AI Analysis
Technical Summary
In Bouncy Castle for Java before version 1.86, the NTRU implementation reduced secret values using the modulo operator (%) in three helper functions. These helpers used integer division whose latency depends on secret operands, leaking timing information. Specifically, Polynomial.modQ performed division by a variable divisor, preventing compiler optimization to constant-time multiplication, and Polynomial.mod3 and NTRUSampling.mod3 divided secret key polynomials and message polynomials during cryptographic operations. An attacker capable of measuring timing differences could potentially recover information about the NTRU private key. The fix replaces these divisions with masking (for modQ, since q is a power of two) and division-free fold and select operations (for mod3), preserving the original results without timing leaks.
Potential Impact
The timing side-channel vulnerability allows an attacker with the ability to measure operation latency to gain information about the NTRU private key. This compromises the confidentiality of the private key used in cryptographic operations, potentially undermining the security of key encapsulation and decapsulation processes.
Mitigation Recommendations
A fix is available in Bouncy Castle for Java version 1.86 and later, which replaces timing-dependent division operations with constant-time masking and division-free implementations. Users should upgrade to version 1.86 or later to mitigate this vulnerability. Patch status is confirmed by the versioning information in the description. No additional mitigations are indicated.
CVE-2026-18036: CWE-208 Observable Timing Discrepancy in Legion of the Bouncy Castle Inc. BC-JAVA
Description
In Bouncy Castle for Java before 1.86, NTRU reduced secret values with the % operator in three helpers whose reference implementations are deliberately division-free, so each reduction was carried out by an integer division whose latency depends on the secret operand. Polynomial.modQ divided by a variable divisor, which a compiler cannot strength-reduce to a multiply the way it can a constant one, so it emitted a division on every call including on the decapsulation path where the dividend derives from the private key; Polynomial.mod3 and NTRUSampling.mod3 divided the secret key polynomials f and g during key generation, the message polynomials r and m during encapsulation, and coefficients recovered during decapsulation. An attacker able to measure that timing can recover information about the NTRU private key. modQ now masks, which is exact because q is always a power of two, and mod3 uses the reference implementation's division-free fold and select; the results are unchanged.
CVSS v4.0
Score 8.2high
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 before version 1.86, the NTRU implementation reduced secret values using the modulo operator (%) in three helper functions. These helpers used integer division whose latency depends on secret operands, leaking timing information. Specifically, Polynomial.modQ performed division by a variable divisor, preventing compiler optimization to constant-time multiplication, and Polynomial.mod3 and NTRUSampling.mod3 divided secret key polynomials and message polynomials during cryptographic operations. An attacker capable of measuring timing differences could potentially recover information about the NTRU private key. The fix replaces these divisions with masking (for modQ, since q is a power of two) and division-free fold and select operations (for mod3), preserving the original results without timing leaks.
Potential Impact
The timing side-channel vulnerability allows an attacker with the ability to measure operation latency to gain information about the NTRU private key. This compromises the confidentiality of the private key used in cryptographic operations, potentially undermining the security of key encapsulation and decapsulation processes.
Mitigation Recommendations
A fix is available in Bouncy Castle for Java version 1.86 and later, which replaces timing-dependent division operations with constant-time masking and division-free implementations. Users should upgrade to version 1.86 or later to mitigate this vulnerability. Patch status is confirmed by the versioning information in the description. No additional mitigations are indicated.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-frjj-v5w4-68pc
- Osv Schema Version
- 1.4.0
- Aliases
- ["CVE-2026-18036"]
- Database Specific Severity
- HIGH
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 6abfeeb7a43b0b3b89e560a5
Added to database: 10/02/2026, 17:49:43 UTC
Last enriched: 10/02/2026, 18:21:27 UTC
Last updated: 10/03/2026, 04:45:56 UTC
Views: 8
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.