CVE-2026-12852

MLS wire decoder allocates attacker-declared opaque length before bounds check

Published Aug 3, 2026 CVSS 4.0 · 8.7 High EPSS < 1% KEV · Not listed
Description
In Bouncy Castle for Java before 1.85, MLS wire decoder allocates attacker-declared opaque length before bounds check.

Analysis

AI-generated

Technical impact

The Bouncy Castle MLS wire decoder allocates a buffer whose size is declared in a message without first checking that the declared length is within the bounds of the remaining data. This out‑of‑bounds allocation can overwrite memory that the Java virtual machine or the application relies on, resulting in a crash, denial of service, or, if the attacker can control the overwritten area, arbitrary code execution. The vulnerability is classified as CWE‑789 (Buffer or Integer Overread) and can also lead to broader memory corruption (CWE‑1284).

Affected Systems

Legion of the Bouncy Castle Inc. – BC‑JAVA, before release 1.85.

Risk and Exploitability

The CVSS score of 8.7 indicates high severity. The EPSS score of < 1% conveys a very low but nonzero likelihood of exploitation. The vulnerability is not listed in the CISA KEV catalog, so no widespread exploitation is documented. Based on the description, it is inferred that an attacker can trigger the flaw by sending a crafted MLS wire message to any Java application that uses the vulnerable decoder, and the attack vector is likely remote. No additional conditions are required to exploit the vulnerability.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Update Bouncy Castle to version 1.85 or later, which removes the out‑of‑bounds allocation bug.
  • If an immediate upgrade is not possible, configure the application to reject or sanitize MLS wire messages that specify excessively large opaque lengths before they are parsed by the decoder.
  • Add application‑level validation to ensure that declared lengths do not exceed the size of the remaining payload data before memory is allocated.

Generated by OpenCVE AI on August 13, 2026 at 11:36 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
CPEs cpe:2.3:a:bouncycastle:bc-java:*:*:*:*:*:*:*:*
Vendors & Products Bouncycastle
Bouncycastle bc-java
Type Values Removed Values Added
Weaknesses CWE-1284
References
Metrics threat_severity

None

cvssV3_1

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

threat_severity

Important

Type Values Removed Values Added
Metrics ssvc

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

Type Values Removed Values Added
First Time appeared Legion Of The Bouncy Castle Inc.
Legion Of The Bouncy Castle Inc. bc-java
Vendors & Products Legion Of The Bouncy Castle Inc.
Legion Of The Bouncy Castle Inc. bc-java
Type Values Removed Values Added
Description In Bouncy Castle for Java before 1.85, MLS wire decoder allocates attacker-declared opaque length before bounds check.
Title MLS wire decoder allocates attacker-declared opaque length before bounds check
Weaknesses CWE-789
References
Metrics cvssV4_0

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

Weaknesses
  • CWE-1284

    Improper Validation of Specified Quantity in Input

  • CWE-789

    Memory Allocation with Excessive Size Value

Sources

Status
PUBLISHED
Assigner
bcorg
Published
Updated
Aug 3, 2026, 3:11 PM
Reserved
Jun 22, 2026, 3:41 AM
Status
Analyzed
Published
Aug 3, 2026, 4:16 AM
Modified
Oct 23, 2026, 10:10 PM
Severity
Important
Public date
Aug 3, 2026, 2:55 AM