{"cve":"CVE-2026-13505","nvd":{"published":"2026-08-08T02:17:16.520","modified":"2026-10-23T20:10:00.160","status":"Awaiting Analysis","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.","cvss_v4":{"vector":"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","score":8.7},"cvss_v3":null,"cwes":["CWE-772"],"references":["https://github.com/bcgit/bc-java/wiki/CVE%E2%80%902026%E2%80%9013505"],"products":[],"source":"nvd","synced_at":"2026-10-24T16:53:34.184483516+00:00"},"epss":{"cve":"CVE-2026-13505","score":0.00428,"percentile":0.3676,"date":"2026-10-25"},"kev":null,"osv":[{"id":"GHSA-98j2-6v39-78w8","url":"https://osv.dev/vulnerability/GHSA-98j2-6v39-78w8","summary":"Bouncy Castle: Zeroisation of sensitive key material on garbage collection relies on finalization.","modified":"2026-09-18T17:45:06.587772805Z","packages":[{"ecosystem":"Maven","name":"org.bouncycastle:bc-fips","purl":"pkg:maven/org.bouncycastle/bc-fips","ranges":["<1.0.2.7"],"fixed":["1.0.2.7"]},{"ecosystem":"Maven","name":"org.bouncycastle:bc-fips","purl":"pkg:maven/org.bouncycastle/bc-fips","ranges":[">=2.0.0 <2.0.2"],"fixed":["2.0.2"]},{"ecosystem":"Maven","name":"org.bouncycastle:bc-fips","purl":"pkg:maven/org.bouncycastle/bc-fips","ranges":[">=2.1.0 <2.1.3"],"fixed":["2.1.3"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}