Skip to main content

Bouncy Castle Java EUVDEUVD-2026-52132

| CVE-2026-14682 HIGH
Memory Allocation with Excessive Size Value (CWE-789)
2026-08-03 bcorg GHSA-4hc3-69f9-4wfx
8.7
CVSS 4.0 · Vendor: bcorg
View

Attack ChainAIDerived

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

  1. Access
    Craft minimal ASN.1 DER header declaring oversized payload length
  2. Delivery
    Send crafted bytes to application accepting untrusted BC-parsed input
  3. Exploit
    DefiniteLengthInputStream allocates full declared-size heap buffer
  4. Execution
    JVM OutOfMemoryError triggered before body read
  5. Persist
    Service thread or JVM crashes
  6. Impact
    Availability denied

Vulnerability Assessment

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

Exploitation requires that the target Java application passes attacker-controlled data to Bouncy Castle's ASN.1 parser - specifically ASN1InputStream or any higher-level consumer such as X509CertificateHolder, CMS parsers, or PKCS decoders. The vulnerability is triggered specifically during definite-length ASN.1 object materialization when no bounded size limit smaller than the declared object length is enforced, which occurs when Bouncy Castle wraps a raw InputStream (non-array, non-file-backed) where StreamUtil.findLimit falls back to Runtime.maxMemory(). The CVSS 4.0 vector AV:N/AC:L/AT:N/PR:N/UI:N reflects no authentication requirement for the attacker at the network level. Limiting factors: applications that parse only locally-generated or internally-signed cryptographic objects are not exploitable. Services that enforce a strict maximum input size before handing data to Bouncy Castle (e.g., rejecting payloads above 64 KB at the HTTP layer) are substantially protected in practice. There is no requirement for a specific non-default configuration; the flaw exists in the default ASN.1 parsing path.

Impact

The CVSS 4.0 score of 8.7 with AV:N/AC:L/AT:N/PR:N/UI:N/VA:H is consistent with the technical reality: any application passing network-supplied data to Bouncy Castle's ASN.1 parser is potentially exploitable with no authentication, user interaction, or complex preconditions required. The impact is strictly availability (VC:N/VI:N/VA:H, SC:N/SI:N/SA:N), making this a pure denial-of-service vector rather than a data-compromise risk. No EPSS data was included in the source intelligence, and the vulnerability is not listed in the CISA KEV catalog, indicating no confirmed active exploitation at time of analysis. The Amber urgency supplemental metric in the CVSS 4.0 vector signals the vendor views this as requiring timely but not immediate-emergency remediation. Real-world risk is elevated for deployments that parse untrusted ASN.1 data - certificate upload endpoints, TLS services using bctls-fips, and CMS/PKCS signature verification - but is low for environments where Bouncy Castle processes only internally trusted, pre-validated data. The breadth of affected release lines (standard, LTS, and FIPS-certified) substantially amplifies aggregate exposure across the Java ecosystem.

Exploit ScenarioDerived

An attacker submits a 5-byte crafted DER-encoded OCTET STRING header to a Java web service that passes uploads to Bouncy Castle's ASN1InputStream - for example, a certificate upload endpoint or a CMS signature verification API. The header declares a near-JVM-heap payload length (e.g., 0x7FFFFFFF bytes) with no accompanying body bytes; the unpatched parser immediately calls new byte[2_147_483_647] before reading any data, triggering a JVM OutOfMemoryError that crashes the service thread or the entire JVM. No public proof-of-concept exploit has been identified at time of analysis, but the upstream commit includes a regression test that demonstrates the precise trigger mechanism.

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

Out-of-memory denial-of-service in Bouncy Castle for Java allows remote unauthenticated attackers to crash Java applications by submitting a crafted ASN.1 definite-length object with an inflated declared size. The ASN.1 parser in DefiniteLengthInputStream.toByteArray() allocated a full heap-sized byte array before reading any body bytes, meaning a few-byte header claiming a near-JVM-heap payload was sufficient to trigger OOM. All major Bouncy Castle release lines are affected - including the FIPS-certified BC-FJA variant - and a vendor patch is available; no public exploit code or CISA KEV listing exists at time of analysis.

RemediationAI

The primary fix is to upgrade to a patched release: bc-java 1.85 or later, bc-lts-java 2.73.12 or later, bc-fips 1.0.2.7 for the 1.0.X series or 2.0.2 for the 2.0.X series or 2.1.3 for the 2.1.X series, and bctls-fips 1.0.24 or later. The source-level fix is available in upstream commit 37094e504ef50cf9ce4e0fb9e5105d495ff5c2d2 (https://github.com/bcgit/bc-java/commit/37094e504ef50cf9ce4e0fb9e5105d495ff5c2d2); however, the exact released Maven Central artifact versions have not been independently verified beyond the vendor advisory at https://github.com/bcgit/bc-java/wiki/CVE-2026-14682. As a compensating control where immediate patching is not feasible, restrict which data sources can supply ASN.1 objects to Bouncy Castle: reject inputs exceeding a conservative size threshold (e.g., 1 MB) at the application boundary before they reach the parser, or limit ASN.1 parsing to data from internally trusted sources only. Note that size-limiting mitigations do not eliminate the flaw - they raise the cost for an attacker - and any trusted data path that ultimately processes attacker-influenced content remains exploitable.

Affected VersionsENISA

BC-JAVA 0 <1.85
BC-FJA 2.0.0 <2.0.2
BC-FJA 1.0.0 <1.0.2.7
BC-FJA 2.1.0 <2.1.3
BC-FJA 1.0.0 <1.0.24
BC-LTS-JAVA 2.73.0 <2.73.12

Affected Packages

euvd bc_fja fix: 1.0.2.7, 1.0.24, 2.0.2, 2.1.3
euvd bc_java fix: 1.85
euvd bc_lts_java fix: 2.73.12

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 3 packages 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 resides in DefiniteLengthInputStream.toByteArray() within Bouncy Castle's ASN.1 parsing subsystem (org.bouncycastle.asn1), which implements DER/BER definite-length encoding used by X.509 certificates, CMS/PKCS structures, and TLS handshake messages. CWE-789 (Uncontrolled Memory Allocation) describes the root cause precisely: the code executed new byte[(int)_remaining] where _remaining is the attacker-controlled declared length extracted from the ASN.1 header, triggering a JVM heap allocation for the full declared size before reading a single body byte. On raw InputStream wrappers where no explicit size limit is configured, StreamUtil.findLimit falls back to Runtime.maxMemory(), allowing a crafted short header to drive a near-heap-sized allocation. The fix in commit 37094e504ef50cf9ce4e0fb9e5105d495ff5c2d2 changes DefiniteLengthInputStream.toByteArray() to delegate to Streams.readLenBytesFully(), which now grows its buffer incrementally starting at a bounded initial size (doubling toward len only as bytes actually arrive), eliminating the up-front allocation entirely. CPE strings confirm the affected products span bc-java, bc-lts-java, and bc-fja from Legion of the Bouncy Castle Inc.

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-exploitable with no authentication (PR:N), low complexity, pure availability impact from OOM crash, scope unchanged within the JVM.

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, Possible OOM from unbounded up-front allocation on a definite-length read. This issue also affects Bouncy Castle for Java LTS before 2.73.12, and Bouncy Castle for Java FIPS (BC-FJA) before bc-fips 1.0.2.7 (1.0.X series), 2.0.2 (2.0.X series) and 2.1.3 (2.1.X series), and before bctls-fips 1.0.24.

Executive ViewAI

Why It Matters

Bouncy Castle for Java (a widely-used cryptography library) is vulnerable to remote denial-of-service attacks that can crash Java applications. All major versions are affected, requiring immediate patching to maintain application availability and prevent business disruption.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.3%
Top 82% exploitable
Prevalence
High
widely used Java cryptography library, dominant in FIPS-regulated Java deployments
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