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

CVE-2026-12185: BKS/UBER keystore allocates from untrusted lengths before integrity check

August 3, 2026 (updated September 16, 2026)

Affects Bouncy Castle for Java before 1.85. BcKeyStoreSpi.engineLoad() parses every keystore entry before checking the trailing HMAC, and sizes several buffers directly from length fields in the file. A BKS or UBER keystore declaring a length near 2^31 causes a multi-gigabyte allocation and OutOfMemoryError before the integrity check can reject it, stalling or killing the loading process.

References

  • github.com/bcgit/bc-java/commit/7bbd7fe5f44132e5b6140a2914435c12430eeb3d
  • github.com/bcgit/bc-java/wiki/CVE-2026-12185
  • nvd.nist.gov/vuln/detail/CVE-2026-12185

Code Behaviors & Features

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

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 1.85.0

Fixed versions

  • 1.85.0

Solution

Upgrade to version 1.85.0 or above.

Impact 8.6 HIGH

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

Learn more about CVSS

Weakness

  • CWE-789: Memory Allocation with Excessive Size Value

Source file

maven/org.bouncycastle/bcprov-jdk14/CVE-2026-12185.yml

Spotted a mistake? Edit the file on GitLab.

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

Page generated Tue, 22 Sep 2026 12:18:58 +0000.