CVE-2026-12860

RSA PKCS#1 verification skips last two hash bytes in NULL-omitted path

Published Aug 3, 2026 CVSS 4.0 · 8.7 High EPSS < 1% KEV · Not listed
Description
In Bouncy Castle for Java before 1.85, RSA PKCS#1 verification skips last two hash bytes in NULL-omitted path. This issue also affects Bouncy Castle for Java LTS before 2.73.12.

Analysis

AI-generated

Technical impact

The vulnerability resides in the RSA PKCS#1 signature verification routine of Bouncy Castle for Java before version 1.85 and its LTS branch before 2.73.12. During verification of signatures using the NULL‑omitted path, the library skips the final two bytes of the hash. As a result, a crafted signature that differs only in those two bytes can be accepted as valid, effectively forging the signature. This flaw undermines integrity because forged signatures can be used to impersonate legitimate signers, potentially leading to unauthorized code execution, data tampering, or fraudulent documents. The weakness is catalogued as CWE‑347.

Affected Systems

Affected products are Bouncy Castle’s Java libraries: BC-JAVA prior to version 1.85 and BC‑LTS‑JAVA prior to 2.73.12. Applications that depend on these libraries for RSA signature verification are at risk.

Risk and Exploitability

With a CVSS score of 8.7, the flaw is classed as high severity. No EPSS score is available, and the vulnerability is not listed in CISA’s KEV catalog, indicating that publicly available exploits have not yet been documented. The likely attack vector is any application that accepts user-supplied data and verifies RSA signatures using the affected library; by supplying a subtly altered signature that only differs in the last two hash bytes, an attacker can bypass the check. The impact is that the attacker can gain integrity privileges that the signature is meant to prevent.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade the Bouncy Castle library to version 1.85 or newer for BC-JAVA, or to 2.73.12 or newer for BC-LTS-JAVA. This releases the fix that correctly processes all hash bytes during verification.
  • If an immediate upgrade is not feasible, disable the use of RSA PKCS#1 NULL‑omitted path verification in your application or switch to an alternative cryptographic library that does not have this flaw.
  • Verify that the affected cryptographic code path is no longer used by reviewing application logs or code, and restrict any legacy verification modes that rely on the NULL‑omitted path.

Generated by OpenCVE AI on August 3, 2026 at 08:47 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
First Time appeared Bouncycastle
Bouncycastle bc-java
Bouncycastle bouncy Castle For Java Lts
CPEs cpe:2.3:a:bouncycastle:bc-java:*:*:*:*:*:*:*:*
cpe:2.3:a:bouncycastle:bouncy_castle_for_java_lts:*:*:*:*:*:*:*:*
Vendors & Products Bouncycastle
Bouncycastle bc-java
Bouncycastle bouncy Castle For Java Lts
Metrics cvssV3_1

{'score': 5.3, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N'}

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

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

Type Values Removed Values Added
Description In Bouncy Castle for Java before 1.85, RSA PKCS#1 verification skips last two hash bytes in NULL-omitted path. This issue also affects Bouncy Castle for Java LTS before 2.73.12.
Title RSA PKCS#1 verification skips last two hash bytes in NULL-omitted path
Weaknesses CWE-347
References
Metrics cvssV4_0

{'score': 8.7, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N/U:Amber'}

Weaknesses
  • CWE-347

    Improper Verification of Cryptographic Signature

Sources

Status
PUBLISHED
Assigner
bcorg
Published
Updated
Aug 3, 2026, 3:10 PM
Reserved
Jun 22, 2026, 7:51 AM
Status
Analyzed
Published
Aug 3, 2026, 4:16 AM
Modified
Aug 28, 2026, 4:35 PM