Advisory Database
  • Advisories
  • Dependency Scanning
  1. maven
  2. ›
  3. org.bouncycastle/bcprov-jdk18on
  4. ›
  5. CVE-2026-12860

CVE-2026-12860: RSA PKCS#1 verification skips last two hash bytes in NULL-omitted path

August 3, 2026 (updated September 16, 2026)

Affects Bouncy Castle for Java before 1.85. RSADigestSigner.verifySignature() mis-computes the comparison offset in the branch handling DigestInfo encoded without NULL AlgorithmIdentifier parameters, leaving the final two hash bytes unchecked. A signature using that encoding is accepted for any message whose digest matches in all but the last two bytes, reducing second-preimage work by a factor of 2^16. The path is reachable by default from TLS, PKIX, CMS and OpenPGP RSA verification.

References

  • github.com/bcgit/bc-java/commit/ea5970ea9b2fb91d763b904692fd21089ca3e396
  • github.com/bcgit/bc-java/wiki/CVE-2026-12860
  • nvd.nist.gov/vuln/detail/CVE-2026-12860

Code Behaviors & Features

Detect and mitigate CVE-2026-12860 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions before 1.85.0

Fixed versions

  • 1.85.0

Solution

Upgrade to version 1.85.0 or above.

Impact 5.3 MEDIUM

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N

Learn more about CVSS

Weakness

  • CWE-347: Improper Verification of Cryptographic Signature

Source file

maven/org.bouncycastle/bcprov-jdk18on/CVE-2026-12860.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:16:22 +0000.