Skip to main content

Bouncy Castle Java CVE-2026-12816

| EUVDEUVD-2026-52135 HIGH
Improper Validation of Integrity Check Value (CWE-354)
2026-08-03 bcorg GHSA-834p-whmm-rg5r
8.7
CVSS 4.0 · Vendor: bcorg
View

Attack ChainAIDerived

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

  1. Access
    Identify application using static-key IES stream mode
  2. Delivery
    Observe one ciphertext for a known plaintext of length L
  3. Exploit
    XOR plaintext and ciphertext to recover keystream bytes 0..L
  4. Execution
    Extract MAC key K2 from bytes L..L+macKeyLen of recovered keystream
  5. Persist
    Compute valid HMAC tag over forged shorter ciphertext using recovered K2
  6. Impact
    Submit forged message with valid tag, accepted by recipient IESEngine

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A08:2025 - Software or Data Integrity Failures
ASVS 5.0
V15 - Secure Coding and Architecture Integrity verification
Exploitation Conditions

Exploitation requires all three of the following to be simultaneously true: (1) the application uses Bouncy Castle IESEngine initialized without an ephemeral sender key - specifically the static-static initialization path where V.length == 0, typically when IESParameters is constructed without an encoding vector component; (2) stream-cipher mode is selected rather than block-cipher mode within IES; and (3) the attacker can observe at least one encryption of a known plaintext under the target static key pair where the observed plaintext is at least macKeyBytes longer than the message to be forged. What limits exploitation: applications using standard ECIES with an ephemeral sender key (V.length != 0) are completely unaffected since the K2-first split was already correct in that branch; block-cipher mode is also not affected; and the known-plaintext requirement is a non-trivial operational prerequisite. The CVSS 4.0 PR:N confirms no authentication is required at the library level, but the static-key mode selection and known-plaintext constraint together meaningfully narrow the realistic attacker surface beyond what AV:N/AC:L suggests.

Impact

The CVSS 4.0 score of 8.7 with AV:N/AC:L/AT:N/PR:N/UI:N reflects that no authentication or special attacker network position is required at the library level, but the assigned AT:N understates the practical prerequisites. Exploitation requires the application to have specifically chosen static-key IES stream mode - a non-default and narrowly used configuration - AND the attacker must observe at least one known-plaintext ciphertext under the target key pair of a message longer than the MAC key length. Applications using standard ECIES with an ephemeral sender key (the recommended and most common mode) are entirely unaffected, as the V.length != 0 code path used the correct K2-first split. No CISA KEV listing is present, no EPSS data was provided, and no public exploit code exists beyond the vendor's own regression test, indicating no confirmed active exploitation. Real-world risk is meaningful only for the narrow set of deployments using static-key IES stream encryption; for the broader Bouncy Castle user base this is a low-probability, specialized attack.

Exploit ScenarioDerived

An attacker targeting a system that encrypts messages with Bouncy Castle IESEngine in static-key stream mode observes a single ciphertext C for a known plaintext M of length L (obtainable if the attacker can influence what gets encrypted, or if messages contain predictable content). By XOR-ing M and C, the attacker recovers the keystream block, which in the vulnerable layout embeds the MAC key K2 at bytes [L..L+macKeyLen]; the attacker then constructs a forged ciphertext for an arbitrary message shorter than L bytes, computes a valid HMAC tag using the recovered K2, and submits the forgery - which the recipient's IESEngine accepts as authentic. The vendor's fix commit includes a working proof-of-concept regression test (doForgeryTest in ECIESTest.java) demonstrating this end-to-end attack with a 64-bit MAC key.

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

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

Alert me

AnalysisAIv1 – Aug 03, 2026

IESEngine in Bouncy Castle for Java allows cross-message MAC forgery when stream mode is used with static key pairs, affecting bc-java before 1.85 and bc-lts-java before 2.73.12. The flaw stems from a length-dependent KDF output split: in the static-key path (no ephemeral V component), the MAC key K2 was placed at a byte offset equal to the message length after the keystream K1, so an observer of one known-plaintext encryption can recover K2 and forge valid ciphertext-plus-tag pairs for shorter messages. No public exploit beyond the vendor's own proof-of-concept regression test exists, and no CISA KEV listing is present at time of analysis.

RemediationAI

Upgrade bc-java to version 1.85 or later, or bc-lts-java to version 2.73.12 or later; the fix is in commit 6d9e4bbaee9409713ada167e5f901554cbb084ac (https://github.com/bcgit/bc-java/commit/6d9e4bbaee9409713ada167e5f901554cbb084ac). For teams that cannot patch immediately, the most effective workaround is to stop using IESEngine in static-key stream mode and instead use the standard ephemeral-sender-key initialization (ECIES mode), which uses the correct K2-first KDF split and is not affected by this flaw; note that switching mode changes ciphertext format and requires coordinated updates to both sender and receiver. If eliminating static-key mode is not immediately feasible, restrict decryption to known authenticated senders to reduce the attacker's ability to observe known-plaintext encryptions under the target key pair. The vendor's commit also adds a security warning that encrypting multiple messages under a static key pair in stream mode constitutes a many-time pad that leaks plaintext relationships, making migration to ephemeral ECIES strongly recommended regardless of patching timeline.

Affected VersionsENISA

BC-LTS-JAVA 2.73.0 <2.73.12
BC-JAVA 0 <1.85

Affected Packages

euvd bc_java fix: 1.85
euvd bc_lts_java fix: 2.73.12

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 2 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 IESEngine.java within the Bouncy Castle cryptographic library (CPE: cpe:2.3:a:legion_of_the_bouncy_castle_inc.:bc-java:*:*:*:*:*:*:*:* and cpe:2.3:a:legion_of_the_bouncy_castle_inc.:bc-lts-java:*:*:*:*:*:*:*:*). IES (Integrated Encryption Scheme) combines ECDH key agreement, a KDF, a symmetric cipher, and a MAC. In stream-cipher mode, the KDF output byte array K is split into MAC key K2 and keystream K1. The bug: when no ephemeral sender key V was present (static-static mode, V.length == 0), the code placed K1 first at bytes [0..inLen] and K2 second at bytes [inLen..inLen+macKeyLen], making K2's position a direct function of the plaintext message length. The fix unifies both code paths to always place K2 at a fixed prefix (bytes 0..macKeyLen) and K1 after it, breaking the length-dependent exposure. CWE-354 (Improper Validation of Integrity Check Value) captures the consequence: the MAC no longer provides reliable authentication because its key can be derived from observed ciphertext under the legacy layout.

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:H/VA:N/SC:N/SI:N/SA:N/U:Amber
vuln.today AI 5.9 MEDIUM

AC:H reflects the known-plaintext observation prerequisite and static-key mode requirement; I:H for MAC forgery; no confidentiality or availability impact.

3.1 AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N
4.0 AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N
SUSE 7.5 HIGH
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
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
High
Vulnerable system: Availability
None
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

DescriptionCVE.org

In Bouncy Castle for Java before 1.85, IESEngine stream-mode MAC forgery via length-dependent KDF split. This issue also affects Bouncy Castle for Java LTS before 2.73.12.

Executive ViewAI

Why It Matters

Bouncy Castle for Java (bc-java and bc-lts-java) contains a cryptographic flaw that enables attackers to forge authenticated encrypted messages after observing a single known encryption. Organizations using these libraries for message protection must upgrade immediately to maintain the integrity and authenticity guarantees of their encryption systems.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.2%
Top 95% exploitable
Prevalence
High
most widely used Java cryptography library
Data Quality
8 sources
Confidence: High
EUVD 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.2%
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