CVE-2025-9340

Cryptographic output corruption via overlapping buffers

Published Aug 22, 2025 · Updated Aug 22, 2025

Out-of-bounds write in Bouncy Castle for Java BC-FJA 2.1.0 allows attackers to produce corrupted ciphertext or plaintext. The BaseCipher implementation of Cipher.doFinal overwrites unread input when one byte array supplies both input and offset output. The condition requires in-place native AES encryption or decryption with different input and output offsets, and its bounded consequence is garbage cryptographic output.

CVSS severity0.0
None
EPSS probability0.17%
Next 30 days · Sep 16, 2026
Known exploitationUnconfirmed
Based on sourced intelligence
Hinoki checkNot available
Coverage for this vulnerability

See if you're affected

Explore vulnerability checks for your environment with Hinoki.

Book a demo

Summary

What happened

Out-of-bounds write in Bouncy Castle for Java BC-FJA 2.1.0 allows attackers to produce corrupted ciphertext or plaintext. The BaseCipher implementation of Cipher.doFinal overwrites unread input when one byte array supplies both input and offset output. The condition requires in-place native AES encryption or decryption with different input and output offsets, and its bounded consequence is garbage cryptographic output.

The record

CVE
CVE-2025-9340
Published
Aug 22, 2025
Updated
Aug 22, 2025
Vendor
Legion of the Bouncy Castle Inc.
Product
Bouncy Castle for Java
Classifications
CWE-787, T1565
Attack vector
physical
Privileges
authenticated

Timeline

How it unfolded

  1. Aug 22, 2025CVE publishedPublication date reported by the CVE source.
  2. Aug 22, 2025Record updatedLatest update available in the CVE record.

Exploitability

Present is not the same as exploitable

Compare your product and version with the public record. A matching version still requires validation against your environment.

Is a vulnerable build present?

Compare these published version ranges with your installed build and any vendor patches.

  1. Affected versionversion=BC-FJA 2.1.0 <=2.1.0

What conditions does exploitation require?

Attack vectorphysical
Required privilegesauthenticated

What is affected?

Legion of the Bouncy Castle Inc. · Bouncy Castle for Javaversion=BC-FJA 2.1.0 <=2.1.0

Published CVSS scores

0.0Legion of the Bouncy Castle Inc.CVSS:4.0/AV:P/AC:L/AT:P/PR:L/UI:A/VC:N/VI:N/VA:N/SC:N/SI:N/SA:N/S:N/R:U/RE:M/U:Green

CVSS describes severity. EPSS estimates exploitation probability.

Attacks

What attackers are doing with it

Daily unique IPs observed by Shadowserver honeypots for known exploited vulnerabilities (KEVs). Missing observations do not establish an absence of attacks.

Daily unique IPsNo honeypot observations are available for this CVE in the selected window.

No observations available

Sep 10, 2026Sep 16, 2026
Latest reporting daySep 16, 2026
Latest daily unique IPsUnavailable
Prior 30-day averageUnavailable
SourceShadowserver honeypots (KEV)
Vectorphysical
Privilegesauthenticated
Known exploitationUnconfirmed
Public exploitUnconfirmed

Weakness, pattern, technique

CWE-787Out-of-bounds Write
T1565Data Manipulation

Public exploit references

No public exploit references are available in this record.

Labels summarize the accepted research assessment. They do not indicate a test against your environment.

Technologies

Your stack

See the directory against your own environment.

Your stack

Check the software in your environment

Book a demo to see how Hinoki identifies affected software and validates exploitability in your environment.

Book a demo