# CVE-2026-13505: Zeroisation of sensitive key material on garbage collection relies on finalization

> Attackers can cause memory exhaustion and retain sensitive keys in memory by exploiting deprecated finalization mechanisms in the Bouncy Castle FIPS Java library.

- **Severity:** High 8.7 (`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`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 8 Aug 2026
- **Updated:** 10 Aug 2026
- **Also known as:** CLEANSTART-2026-KE90192, ECHO-d092-28e1-ed95, GHSA-98j2-6v39-78w8, MINI-2v35-4r5j-mhjh, MINI-3q8g-m33m-j66h, MINI-435g-9xr7-xv6x, MINI-43vj-4xrc-cgwq, MINI-59h2-349c-qj36, MINI-6r6q-5pc8-2g74, MINI-74wq-vjcv-qrc6, MINI-992h-pfvj-4fw2, MINI-c9xp-q275-pccx, MINI-hxmj-7v8w-hmxm, MINI-j5p8-qqjr-hf53, MINI-mf46-5fq8-qv3c, MINI-q935-hxrc-jrp3, MINI-rg2q-m7wv-xxrx, MINI-w5gh-26f2-4q34, ROOT-APP-MAVEN-CVE-2026-13505, UBUNTU-CVE-2026-13505

## What is CVE-2026-13505?

CVE-2026-13505 is a high-severity denial of service vulnerability in Legion of the Bouncy Castle Inc. BC-FJA, published on 8 Aug 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

In 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), sensitive key material held by the AES and DESede engines, the SP 800-90A DRBGs, SymmetricSecretKey and the PBKD and scrypt parameter classes was zeroised on garbage collection by overriding Object.finalize. Finalization runs at an unspecified time and in an unspecified order and is serviced by a single finalizer thread, so where objects carrying a finalizer are allocated faster than that thread retires them the pending-finalization queue grows without bound: disposal falls arbitrarily far behind, which can contribute to an OutOfMemoryError under load, and the key material those objects hold stays resident in the heap for as long as they are queued, defeating the purpose of the zeroisation. The behaviour was not a problem on Java 8 or Java 11; it is later JVMs, on which finalization has been deprecated and progressively de-emphasised, where it becomes one. Disposal of these classes now runs from a java.lang.ref.Cleaner registered in the multi-release jdk1.9 overlay, so on Java 9 and later it no longer depends on the finalizer being scheduled. Bouncy Castle for Java (bcprov) and Bouncy Castle for Java LTS are not affected, as neither implements the finalizer-based zeroisation scheme.

Weakness: CWE-772 (Missing Release of Resource after Effective Lifetime)

## Which versions are affected by CVE-2026-13505?

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


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `org.bouncycastle:bc-fips` | Maven | All versions | 1.0.2.7 |
| `org.bouncycastle:bc-fips` | Maven | All versions | 1.0.2.7 |
| `org.bouncycastle:bc-fips` | Maven | From 2.0.0 | 2.0.2 |
| `org.bouncycastle:bc-fips` | Maven | From 2.0.0 | 2.0.2 |
| `org.bouncycastle:bc-fips` | Maven | From 2.1.0 | 2.1.3 |
| `org.bouncycastle:bc-fips` | Maven | From 2.1.0 | 2.1.3 |

## How do I fix CVE-2026-13505?

Upgrade org.bouncycastle:bc-fips to a fixed version for your release line: 1.0.2.7, 2.0.2 or 2.1.3.

## Is CVE-2026-13505 being exploited?

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

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-13505 and fix it if it is affected.

What it is: CVE-2026-13505 is a high-severity denial of service vulnerability in Legion of the Bouncy Castle Inc. BC-FJA, published on 8 Aug 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2026-13505 in the wild and no public exploit code.

Affected packages and fixed versions:
- org.bouncycastle:bc-fips (Maven): affected all versions; fixed in 1.0.2.7
- org.bouncycastle:bc-fips (Maven): affected all versions; fixed in 1.0.2.7
- org.bouncycastle:bc-fips (Maven): affected from 2.0.0; fixed in 2.0.2
- org.bouncycastle:bc-fips (Maven): affected from 2.0.0; fixed in 2.0.2
- org.bouncycastle:bc-fips (Maven): affected from 2.1.0; fixed in 2.1.3
- org.bouncycastle:bc-fips (Maven): affected from 2.1.0; fixed in 2.1.3

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-13505/ (Markdown: https://insights.sbomify.com/CVE-2026-13505/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-13505
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-13505
- OSV: https://osv.dev/vulnerability/CVE-2026-13505

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-13505/
Summaries are generated and may contain mistakes; the official description above is the record.
