Skip to main content
Vulnerability Database/CVE-2026-18036

CVE-2026-18036: Bouncy Castle NTRU Information Disclosure

CVE-2026-18036 is a timing-based information disclosure vulnerability in Bouncy Castle for Java affecting NTRU cryptographic operations. Attackers can exploit timing differences to recover private key data. This article covers technical details, affected versions, security impact, and mitigation strategies.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-18036 Overview

CVE-2026-18036 is a timing side-channel vulnerability [CWE-208] in the Bouncy Castle cryptographic library for Java before version 1.86. The flaw affects the NTRU post-quantum key encapsulation implementation. Three helper methods reduced secret values using the Java % operator instead of the division-free routines specified by the NTRU reference implementation. The resulting integer division instructions execute with latency dependent on secret operands. An attacker who can measure execution timing of key generation, encapsulation, or decapsulation can recover information about the NTRU private key.

Critical Impact

Remote attackers capable of timing cryptographic operations can extract private key material from NTRU operations, undermining the confidentiality guarantees of the post-quantum key exchange.

Affected Products

  • Bouncy Castle for Java versions prior to 1.86
  • org.bouncycastle.pqc.math.ntru.Polynomial (methods modQ and mod3)
  • org.bouncycastle.pqc.crypto.ntru.NTRUSampling (method mod3)

Discovery Timeline

  • 2026-10-02 - CVE CVE-2026-18036 published to NVD
  • 2026-10-02 - Last updated in NVD database

Technical Details for CVE-2026-18036

Vulnerability Analysis

The vulnerability stems from classifying NTRU reduction helpers as data-independent when they were implemented with the Java modulo operator. Polynomial.modQ divided by a variable divisor, which the Java compiler cannot strength-reduce into a constant-time multiply. Each call therefore emitted an idiv instruction whose latency correlates with the dividend derived from the private key during decapsulation.

Polynomial.mod3 and NTRUSampling.mod3 divided the secret key polynomials f and g during key generation. The same helpers processed message polynomials r and m during encapsulation and coefficients recovered during decapsulation. An observer who can measure the timing of these operations gains a signal correlated with secret coefficients.

The side channel is network-reachable in protocols that expose NTRU decapsulation to remote parties. Exploitation requires high attack complexity and the ability to collect precise timing measurements across many operations.

Root Cause

The NTRU reference implementation prescribes division-free reductions precisely to resist timing analysis. Bouncy Castle's Java port substituted the % operator in three helpers. For modQ the divisor is variable, defeating compiler strength reduction. For mod3 the Java Virtual Machine emits integer division whose cycle count depends on operand magnitudes, leaking information about secret polynomial coefficients.

Attack Vector

An attacker measures elapsed time of NTRU key generation, encapsulation, or decapsulation calls. By correlating timing variance with the magnitude of secret operands across many operations, the attacker recovers bits of the private key polynomial. Remote exploitation is feasible against services that expose NTRU-based key exchange over the network.

java
// Patched implementation of NTRUSampling.mod3 (division-free fold-and-select)
private static int mod3(int a)
{
    int r = (a >>> 8) + (a & 0xff);
    r = (r >>> 4) + (r & 0x0f);
    r = (r >>> 2) + (r & 0x03);
    r = (r >>> 2) + (r & 0x03);

    int t = r - 3;
    int c = t >> 31;

    return (c & r) ^ (~c & t);
}

Source: Bouncy Castle commit 9c9ad88. The patch replaces a % 3 with a constant-time fold-and-select. modQ now masks with q - 1, which is exact because q is always a power of two.

Detection Methods for CVE-2026-18036

Indicators of Compromise

  • No file-based indicators exist for successful exploitation because timing side-channel attacks leave no artifacts on the target host.
  • Unusually high volumes of NTRU decapsulation requests from a single source may indicate active key extraction attempts.
  • Repeated connections with precise, uniform request patterns targeting post-quantum key exchange endpoints warrant investigation.

Detection Strategies

  • Inventory Java applications and dependencies to identify Bouncy Castle versions below 1.86 using software composition analysis.
  • Scan Maven and Gradle lockfiles for bcprov-jdk* artifacts and flag versions that predate the fix.
  • Monitor runtime class loading to detect org.bouncycastle.pqc.crypto.ntru usage in production code paths.

Monitoring Recommendations

  • Log and alert on anomalous request rates against TLS endpoints or APIs that negotiate NTRU-based key exchange.
  • Correlate repeated short-lived connections with latency measurements against hosts performing cryptographic operations.
  • Track dependency manifests in CI pipelines and fail builds that pin vulnerable Bouncy Castle releases.

How to Mitigate CVE-2026-18036

Immediate Actions Required

  • Upgrade Bouncy Castle for Java to version 1.86 or later across all applications and services.
  • Audit application dependency trees for transitive inclusions of bcprov-jdk* artifacts below the fixed version.
  • Rotate any NTRU key pairs that were used in environments where remote parties could measure decapsulation timing.

Patch Information

The fix is published in Bouncy Castle commit 9c9ad88b6003bb6230d2434bd892cc1e95b294e4. Polynomial.modQ now uses bitwise masking against q - 1, which is exact because q is always a power of two. Polynomial.mod3 and NTRUSampling.mod3 adopt the reference implementation's division-free fold-and-select routine. Numeric results are unchanged. Additional context is available on the Bouncy Castle CVE-2026-18036 advisory.

Workarounds

  • Disable NTRU-based cipher suites and key exchange mechanisms until the library can be upgraded.
  • Restrict network exposure of services that perform NTRU decapsulation to trusted, authenticated clients only.
  • Introduce rate limiting on endpoints that trigger NTRU cryptographic operations to raise the cost of timing data collection.
bash
# Verify installed Bouncy Castle version in a Maven project
mvn dependency:tree | grep bcprov

# Update to the fixed release in pom.xml
# <dependency>
#   <groupId>org.bouncycastle</groupId>
#   <artifactId>bcprov-jdk18on</artifactId>
#   <version>1.86</version>
# </dependency>

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.