CVE-2025-9341 Garbage collection can delay for AES CBC Native support, resulting in heap exhaustion

Medium 5.9 Published Updated

Attackers can cause heap exhaustion and denial of service in Bouncy Castle Java libraries via delayed garbage collection in AES CBC native support.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2025-9341?

CVE-2025-9341 is a medium-severity denial of service vulnerability in Legion of the Bouncy Castle Inc. Bouncy Castle for Java FIPS, published on 22 Aug 2025. It can only be exploited from the same machine or local network, with no action from the victim.

Official description

Uncontrolled Resource Consumption vulnerability in Legion of the Bouncy Castle Inc. Bouncy Castle for Java FIPS bc-fips on All (API modules), Legion of the Bouncy Castle Inc. Bouncy Castle for Java LTS bcprov-lts8on on All (API modules) allows Excessive Allocation. This vulnerability is associated with program files org/bouncycastle/crypto/fips/AESNativeCBC.Java, org/bouncycastle/crypto/engines/AESNativeCBC.Java.

This issue affects Bouncy Castle for Java FIPS: 2.1.0; Bouncy Castle for Java LTS: from 2.73.0 through 2.73.7.

Weakness: CWE-400

Which versions are affected by CVE-2025-9341?

4 open source packages ship an affected version, including org.bouncycastle:bc-fips and org.bouncycastle:bctls-fips.

PackageAffectedFixed in
org.bouncycastle:bc-fips MavenFrom 2.1.02.1.1
org.bouncycastle:bc-fips MavenFrom 2.1.02.1.1
org.bouncycastle:bctls-fips MavenFrom 2.73.72.73.8
org.bouncycastle:bctls-fips MavenFrom 2.73.72.73.8

How do I fix CVE-2025-9341?

Upgrade org.bouncycastle:bc-fips to 2.1.1 or later.

Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.

Is CVE-2025-9341 being exploited?

There is no known exploitation of CVE-2025-9341 in the wild and no public exploit code.

Sources

Also known as GHSA-jfcv-jv9g-2vx2.

Is CVE-2025-9341 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free