CVE-2026-13505: CWE-772 Missing Release of Resource after Effective Lifetime in Legion of the Bouncy Castle Inc. BC-FJA
Bouncy Castle for Java FIPS (BC-FJA) versions before 1.0.2.7 (1.0.X series), 2.0.2 (2.0.X series), and 2.1.3 (2.1.X series) use Object.finalize for zeroising sensitive key material. Finalization timing and order are unspecified and rely on a single finalizer thread, which can cause delays in zeroisation and lead to sensitive key material remaining in memory longer than intended. This behavior can cause increased memory usage and potential OutOfMemoryError under load. The issue affects Java versions later than 11 where finalization is deprecated. The zeroisation mechanism has been updated to use java.lang.ref.Cleaner on Java 9 and later, avoiding reliance on finalization. Bouncy Castle for Java (bcprov) and Bouncy Castle for Java LTS are not affected as they do not use this finalizer-based zeroisation.
AI Analysis
Technical Summary
In Bouncy Castle for Java FIPS (BC-FJA) before versions 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 AES and DESede engines, SP 800-90A DRBGs, SymmetricSecretKey, and PBKD and scrypt parameter classes was zeroised using Object.finalize. Because finalization runs asynchronously on a single thread with unspecified timing and order, objects with finalizers can accumulate in the finalization queue, delaying zeroisation and causing sensitive key material to remain in heap memory longer than intended. This can contribute to OutOfMemoryError under load and defeats the purpose of zeroisation. This issue does not affect Java 8 or 11 but impacts later JVMs where finalization is deprecated. The zeroisation approach was updated to use java.lang.ref.Cleaner on Java 9 and later, eliminating dependence on finalizers. Bouncy Castle for Java (bcprov) and LTS versions are unaffected as they do not implement finalizer-based zeroisation.
Potential Impact
Sensitive cryptographic key material may remain in memory longer than intended due to delayed zeroisation, increasing the risk of key exposure in memory dumps or during memory analysis. Additionally, under high load, the accumulation of objects awaiting finalization can cause increased memory usage and potentially lead to OutOfMemoryError, impacting application stability. This issue is specific to certain versions of Bouncy Castle for Java FIPS and affects JVMs later than Java 11 where finalization is deprecated.
Mitigation Recommendations
Upgrade Bouncy Castle for Java FIPS to versions 1.0.2.7 (1.0.X series), 2.0.2 (2.0.X series), or 2.1.3 (2.1.X series) or later, where the zeroisation mechanism uses java.lang.ref.Cleaner instead of Object.finalize. No mitigation is required for Bouncy Castle for Java (bcprov) or LTS versions as they are not affected. Patch status is not explicitly confirmed in the provided data; users should verify with the vendor advisory for the latest remediation guidance.
CVE-2026-13505: CWE-772 Missing Release of Resource after Effective Lifetime in Legion of the Bouncy Castle Inc. BC-FJA
Description
Bouncy Castle for Java FIPS (BC-FJA) versions before 1.0.2.7 (1.0.X series), 2.0.2 (2.0.X series), and 2.1.3 (2.1.X series) use Object.finalize for zeroising sensitive key material. Finalization timing and order are unspecified and rely on a single finalizer thread, which can cause delays in zeroisation and lead to sensitive key material remaining in memory longer than intended. This behavior can cause increased memory usage and potential OutOfMemoryError under load. The issue affects Java versions later than 11 where finalization is deprecated. The zeroisation mechanism has been updated to use java.lang.ref.Cleaner on Java 9 and later, avoiding reliance on finalization. Bouncy Castle for Java (bcprov) and Bouncy Castle for Java LTS are not affected as they do not use this finalizer-based zeroisation.
CVSS v4.0
Score 8.7high
Affected software
pkg:maven/org.bouncycastle/bc-fjaRun on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
In Bouncy Castle for Java FIPS (BC-FJA) before versions 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 AES and DESede engines, SP 800-90A DRBGs, SymmetricSecretKey, and PBKD and scrypt parameter classes was zeroised using Object.finalize. Because finalization runs asynchronously on a single thread with unspecified timing and order, objects with finalizers can accumulate in the finalization queue, delaying zeroisation and causing sensitive key material to remain in heap memory longer than intended. This can contribute to OutOfMemoryError under load and defeats the purpose of zeroisation. This issue does not affect Java 8 or 11 but impacts later JVMs where finalization is deprecated. The zeroisation approach was updated to use java.lang.ref.Cleaner on Java 9 and later, eliminating dependence on finalizers. Bouncy Castle for Java (bcprov) and LTS versions are unaffected as they do not implement finalizer-based zeroisation.
Potential Impact
Sensitive cryptographic key material may remain in memory longer than intended due to delayed zeroisation, increasing the risk of key exposure in memory dumps or during memory analysis. Additionally, under high load, the accumulation of objects awaiting finalization can cause increased memory usage and potentially lead to OutOfMemoryError, impacting application stability. This issue is specific to certain versions of Bouncy Castle for Java FIPS and affects JVMs later than Java 11 where finalization is deprecated.
Mitigation Recommendations
Upgrade Bouncy Castle for Java FIPS to versions 1.0.2.7 (1.0.X series), 2.0.2 (2.0.X series), or 2.1.3 (2.1.X series) or later, where the zeroisation mechanism uses java.lang.ref.Cleaner instead of Object.finalize. No mitigation is required for Bouncy Castle for Java (bcprov) or LTS versions as they are not affected. Patch status is not explicitly confirmed in the provided data; users should verify with the vendor advisory for the latest remediation guidance.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-98j2-6v39-78w8
- Osv Schema Version
- 1.4.0
- Aliases
- ["CVE-2026-13505"]
- Ecosystems
- []
- Database Specific Severity
- HIGH
- Cvss Version
- 4.0
Threat ID: 6a774287bf8831d539b0692d
Added to database: 08/08/2026, 14:51:51 UTC
Last enriched: 08/08/2026, 14:57:48 UTC
Last updated: 08/09/2026, 03:40:59 UTC
Views: 3
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.