CVE-2026-12185

BKS/UBER keystore allocates from untrusted lengths before integrity check

Published Aug 3, 2026 CVSS 4.0 · 7.1 High EPSS < 1% KEV · Not listed
Description
In Bouncy Castle for Java before 1.85, BKS/UBER keystore allocates from untrusted lengths before integrity check. This issue also affects Bouncy Castle for Java LTS before 2.73.12.

Analysis

AI-generated

Technical impact

The vulnerability occurs in the BKS/UBER keystore implementation of Bouncy Castle for Java. Prior to version 1.85, an attacker can supply a carefully crafted keystore file whose length fields are not trusted before an integrity check occurs. This allows the library to allocate memory based on an untrusted length, potentially leading to buffer overflows, corruption of internal state, or application crashes. The flaw can disrupt confidentiality, integrity, or availability of the runtime environment if the tampered keystore is processed.

Affected Systems

Affected products are Bouncy Castle Java libraries. For the standard distribution, versions older than 1.85 are vulnerable. For the long‑term support branch, versions older than 2.73.12 are compromised. Systems that embed either distribution and load BKS or UBER keystore files without validating payloads are at risk.

Risk and Exploitability

The CVSS score of 7.1 reflects a high likelihood of successful exploitation in environments where an attacker can inject malicious keystore files. The EPSS score is currently unavailable, and the vulnerability is not listed in the CISA KEV catalog, suggesting it has not yet been widely exploited in the wild. Nonetheless, because the flaw can be triggered by any keystore consumer, the attack vector is likely local or remote code execution through a malformed file. Administrators should evaluate whether they process untrusted keystore inputs before applying the mitigations.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Bouncy Castle Java to version 1.85 or newer.
  • Upgrade the long‑term support release to 2.73.12 or newer.
  • If upgrading is not immediately possible, ensure that any keystore files are processed only after strict validation of their length and integrity before allocating memory.

Generated by OpenCVE AI on August 3, 2026 at 09:08 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': 8.6, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:H'}

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, BKS/UBER keystore allocates from untrusted lengths before integrity check. This issue also affects Bouncy Castle for Java LTS before 2.73.12.
Title BKS/UBER keystore allocates from untrusted lengths before integrity check
Weaknesses CWE-789
References
Metrics cvssV4_0

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

Weaknesses
  • CWE-789

    Memory Allocation with Excessive Size Value

Sources

Status
PUBLISHED
Assigner
bcorg
Published
Updated
Aug 4, 2026, 1:54 AM
Reserved
Jun 14, 2026, 12:39 AM
Status
Analyzed
Published
Aug 3, 2026, 1:16 AM
Modified
Aug 28, 2026, 2:42 PM