Skip to main content

Bouncy Castle Java EUVDEUVD-2026-52137

| CVE-2026-12852 HIGH
Memory Allocation with Excessive Size Value (CWE-789)
2026-08-03 bcorg GHSA-p2mp-577q-8vh2
8.7
CVSS 4.0 · Vendor: bcorg
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Send crafted 4-byte MLS wire message
  2. Delivery
    MLSInputStream decodes oversized Varint length (0x3FFFFFFF)
  3. Exploit
    JVM allocates ~1 GiB byte array before bounds check
  4. Execution
    Repeat concurrently across connections
  5. Persist
    Heap exhausted and OutOfMemoryError thrown
  6. Impact
    Service crash and denial of service

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Memory allocation limits
Exploitation Conditions

The target application must be using bc-java's MLS submodule - specifically any code path that calls MLSInputStream.readOpaque() on data received from a network source. The CVSS vector (PR:N, UI:N) confirms no authentication or user interaction is required. The vulnerable allocation is reached before any MLS signature or MAC verification, so triggering it requires only the ability to deliver a small TCP or application-layer message to an endpoint that decodes MLS wire format. Applications using bc-java exclusively for non-MLS functions (TLS, PGP, S/MIME, CMS, PKIX) are entirely unaffected. Exploitation is limited to availability impact (heap exhaustion leading to JVM crash); no path to confidentiality or integrity compromise is present.

Impact

The CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H) and score of 8.7 accurately characterize the threat: low-complexity, unauthenticated, remotely automatable with high availability impact. There is no confidentiality or integrity impact confirmed by the vector or the commit diff, making the 'Information Disclosure' tag in the source data appear to be a tagging error - no data exfiltration path is described or evidenced anywhere in the available intelligence. EPSS data was not provided in the input, so exploitation probability cannot be quantified beyond the structural assessment. KEV status is absent, meaning active exploitation is not confirmed. The primary real-world risk moderator is MLS deployment footprint: the MLS submodule is a newer addition to bc-java and MLS is not yet broadly adopted in production Java applications, meaningfully reducing exposure relative to the CVSS score alone. Applications using bc-java only for TLS, PGP, S/MIME, or other non-MLS functions are entirely unaffected.

Exploit ScenarioDerived

An unauthenticated remote attacker sends a crafted 4-byte MLS wire message containing a Varint field encoding a declared length of 0x3FFFFFFF (approximately 1 GiB) with no subsequent data bytes. The MLSInputStream decoder allocates a 1 GiB byte array before detecting the input is shorter than declared, instantly consuming available JVM heap. Repeating this with a small number of concurrent connections exhausts the heap, triggering OutOfMemoryError and crashing the service. No public exploit code has been identified, but the attack is directly constructable from the regression test added in the fix commit.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Aug 03, 2026

Heap exhaustion via uncontrolled memory allocation in Bouncy Castle for Java's MLS wire decoder allows remote unauthenticated attackers to crash any application using the bc-java MLS module. The MLSInputStream.readOpaque() method decodes an attacker-supplied Varint length field (up to 0x3FFFFFFF, approximately 1 GiB) and allocates that buffer before verifying the input stream actually contains that many bytes; a handful of concurrent few-byte crafted messages can exhaust the JVM heap. No public exploit has been identified at time of analysis and CISA KEV listing is absent, though the attack is trivially constructable from the published patch and regression test.

RemediationAI

Upgrade Bouncy Castle for Java to version 1.85 or later, which incorporates the bounds check that validates the declared opaque length against the bytes actually remaining in the input stream before any buffer allocation (patch commit: https://github.com/bcgit/bc-java/commit/a747038bb5bbd5e29fb2b7607ab38af1fd8d1790). The vendor advisory is at https://github.com/bcgit/bc-java/wiki/CVE-2026-12852. If an immediate upgrade is not feasible, apply network-layer rate limiting and enforce a strict maximum inbound message size before bytes reach the MLS decoder, which prevents the large Varint value from being presented to the vulnerable code path; note this requires a proxy or application-level size gate and cannot be implemented via JVM flags alone. Setting a JVM heap ceiling (-Xmx) will not prevent the DoS but will reduce time-to-OOM and may improve process restart behaviour. Applications not using the bc-java MLS module require no remediation.

Affected VersionsENISA

BC-JAVA 1.73 <1.85

Affected Packages

euvd bc_java fix: 1.85

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The vulnerability is in the MLS (RFC 9420, Messaging Layer Security) wire format decoder within the mls submodule of bc-java (CPE: cpe:2.3:a:legion_of_the_bouncy_castle_inc.:bc-java:*). MLS wire messages encode variable-length opaque fields using a Varint prefix. Before the fix, MLSInputStream.readOpaque() decoded the Varint length and immediately invoked new byte[size] without first checking that the stream contained at least that many remaining bytes. CWE-789 (Uncontrolled Memory Allocation) precisely describes this flaw: attacker-controlled data flows directly into an allocation call without an upper-bound constraint derived from actual input size. Critically, the affected message types - PublicMessage, KeyPackage, Welcome, and PrivateMessage - carry opaque fields in their opening bytes and are processed entirely before any signature or MAC verification, meaning the allocation path is reachable by any unauthenticated network peer.

Know when Java gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (bcorg) PRIMARY 8.7 HIGH
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
vuln.today AI 7.5 HIGH

Network-reachable with no auth on unauthenticated MLS structures; availability-only impact via heap exhaustion; no scope change or confidentiality impact evidenced.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
SUSE 7.5 HIGH
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Red Hat 7.5 HIGH

Primary rating from Vendor (bcorg).

CVSS VectorVendor: bcorg

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
None
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

DescriptionCVE.org

In Bouncy Castle for Java before 1.85, MLS wire decoder allocates attacker-declared opaque length before bounds check.

Executive ViewAI

Why It Matters

A vulnerability in Bouncy Castle for Java enables remote attackers to crash applications without authentication, affecting any organization using this widely-deployed cryptographic library. Production services relying on this software face availability risk from low-effort network-based attacks.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.3%
Top 82% exploitable
Prevalence
Medium
widely-used Java crypto library, but MLS submodule adoption is nascent
Data Quality
8 sources
Confidence: High
EUVD 🇯🇵JVN NVD CVE.org EPSS Vulnrichment Vendor GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
Yes
Human Impact
High
Technical Impact
Partial

Priority Score

44
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +44
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

More in Java

View all
CVE-2012-4681 CRITICAL POC
9.8 Aug 28

Oracle Java SE 7 Update 6 and earlier contains multiple sandbox bypass vulnerabilities via the ClassFinder and forName m

CVE-2015-7450 CRITICAL POC
9.8 Jan 02

Remote code execution in IBM Sterling B2B Integrator, Sterling Integrator, and Tivoli Common Reporting allows unauthenti

CVE-2013-2465 CRITICAL POC
9.8 Jun 18

Java Runtime Environment sandbox bypass via incorrect image channel verification in 2D component allows remote unauthent

CVE-2011-3544 CRITICAL POC
9.8 Oct 19

Oracle Java SE JDK/JRE 7 and 6 Update 27 and earlier allows remote code execution with complete system compromise throug

CVE-2010-1871 HIGH POC
8.8 Aug 05

JBoss Seam 2 in Red Hat JBoss EAP 4.3.0 fails to sanitize JBoss Expression Language inputs, allowing remote attackers to

CVE-2012-1723 CRITICAL POC
9.8 Jun 16

Unspecified vulnerability in the Java Runtime Environment (JRE) component in Oracle Java SE 7 update 4 and earlier, 6 up

CVE-2013-0422 CRITICAL POC
9.8 Jan 10

Multiple vulnerabilities in Oracle Java 7 before Update 11 allow remote attackers to execute arbitrary code by (1) using

CVE-2012-0507 CRITICAL POC
9.8 Jun 07

Unspecified vulnerability in the Java Runtime Environment (JRE) component in Oracle Java SE 7 Update 2 and earlier, 6 Up

CVE-2015-4852 CRITICAL POC
9.8 Nov 18

The WLS Security component in Oracle WebLogic Server 10.3.6.0, 12.1.2.0, 12.1.3.0, and 12.2.1.0 allows remote attackers

CVE-2012-5076 CRITICAL POC
9.8 Oct 16

Unspecified vulnerability in the Java Runtime Environment (JRE) component in Oracle Java SE 7 Update 7 and earlier allow

CVE-2017-3066 CRITICAL POC
9.8 Apr 27

Remote unauthenticated attackers can execute arbitrary code on Adobe ColdFusion servers through Java deserialization fla

CVE-2012-0391 CRITICAL POC
9.8 Jan 08

The ExceptionDelegator component in Apache Struts before 2.2.3.1 interprets parameter values as OGNL expressions during

Vendor StatusVendor

SUSE

Severity: Important
Product Status
openSUSE Leap 16.0 Fixed
openSUSE Tumbleweed Fixed
SUSE Linux Enterprise High Performance Computing 15 SP4-ESPOS Affected
SUSE Linux Enterprise High Performance Computing 15 SP4-LTSS Affected
SUSE Linux Enterprise High Performance Computing 15 SP5-ESPOS Affected

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy