CVE-2026-97873: CWE-770 Allocation of Resources Without Limits or Throttling in Legion of the Bouncy Castle Inc. BC-JAVA
In Bouncy Castle for Java before 1.86, the raw JCA provider's legacy PBES1 (PKCS#5 scheme 1) and PKCS#12 PBE families ran their password-based key derivation with an iteration count taken from untrusted input without bounding it, so a small input could dictate an arbitrary amount of work before anything could be verified. The AlgorithmParameters implementations (PKCS12PBE and its object identifier aliases, and PBKDF1) accepted any count from an encoded PKCS12PBEParams or PBEParameter, narrowing a value beyond the int range with intValue(), and every Cipher, Mac and SecretKeyFactory in these families derived with whatever count it was given, including one decoded by another provider's AlgorithmParameters, as when javax.crypto.EncryptedPrivateKeyInfo.getKeySpec() decrypts a PKCS#12 PBE-protected private key with BC. Both the parameter parse and the derivations now reject a negative or over-limit count under the org.bouncycastle.pbe.max_iteration_count property (default 10,000,000) that already bounded PBKDF2 (CVE-2026-17508), and the parse rejects a count beyond the int range rather than narrowing it. This issue also affects Bouncy Castle for Java LTS before 2.73.13.
AI Analysis
Technical Summary
In BC-JAVA versions prior to 1.86 and 2.73.13, the legacy PBES1 (PKCS#5 scheme 1) and PKCS#12 password-based encryption (PBE) families accept an iteration count parameter from untrusted input without enforcing upper bounds. The iteration count is parsed from AlgorithmParameters implementations (PKCS12PBE, PBKDF1) and can be narrowed incorrectly beyond the integer range, leading to arbitrary amounts of work during password-based key derivation. This lack of throttling can cause resource exhaustion. The fix introduces validation to reject negative or excessively large iteration counts beyond the limit set by the org.bouncycastle.pbe.max_iteration_count property (default 10,000,000), and prevents narrowing beyond the int range during parameter parsing. This vulnerability also affects the LTS branch before version 2.73.13.
Potential Impact
An attacker can supply a crafted iteration count parameter that causes the key derivation process to consume excessive CPU resources, potentially leading to denial of service conditions. The vulnerability does not directly disclose sensitive information or allow privilege escalation but can degrade service availability due to resource exhaustion.
Mitigation Recommendations
A fix is available in Bouncy Castle for Java versions 1.86 and 2.73.13 and later, which enforce iteration count limits and reject invalid parameters. Users should upgrade to these fixed versions to mitigate the vulnerability. No additional vendor advisory or patch links were provided, so patch status is based on the version information in the description. Until upgraded, users should avoid processing untrusted inputs with legacy PBES1 and PKCS#12 PBE schemes or configure the org.bouncycastle.pbe.max_iteration_count property to a safe lower value if possible.
CVE-2026-97873: CWE-770 Allocation of Resources Without Limits or Throttling in Legion of the Bouncy Castle Inc. BC-JAVA
Description
In Bouncy Castle for Java before 1.86, the raw JCA provider's legacy PBES1 (PKCS#5 scheme 1) and PKCS#12 PBE families ran their password-based key derivation with an iteration count taken from untrusted input without bounding it, so a small input could dictate an arbitrary amount of work before anything could be verified. The AlgorithmParameters implementations (PKCS12PBE and its object identifier aliases, and PBKDF1) accepted any count from an encoded PKCS12PBEParams or PBEParameter, narrowing a value beyond the int range with intValue(), and every Cipher, Mac and SecretKeyFactory in these families derived with whatever count it was given, including one decoded by another provider's AlgorithmParameters, as when javax.crypto.EncryptedPrivateKeyInfo.getKeySpec() decrypts a PKCS#12 PBE-protected private key with BC. Both the parameter parse and the derivations now reject a negative or over-limit count under the org.bouncycastle.pbe.max_iteration_count property (default 10,000,000) that already bounded PBKDF2 (CVE-2026-17508), and the parse rejects a count beyond the int range rather than narrowing it. This issue also affects Bouncy Castle for Java LTS before 2.73.13.
CVSS v4.0
Score 5.3medium
Affected software
Legion of the Bouncy Castle Inc.
BC-JAVA
Legion of the Bouncy Castle Inc.
BC-LTS-JAVA
pkg:github/bcprov-lts8onRun 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 BC-JAVA versions prior to 1.86 and 2.73.13, the legacy PBES1 (PKCS#5 scheme 1) and PKCS#12 password-based encryption (PBE) families accept an iteration count parameter from untrusted input without enforcing upper bounds. The iteration count is parsed from AlgorithmParameters implementations (PKCS12PBE, PBKDF1) and can be narrowed incorrectly beyond the integer range, leading to arbitrary amounts of work during password-based key derivation. This lack of throttling can cause resource exhaustion. The fix introduces validation to reject negative or excessively large iteration counts beyond the limit set by the org.bouncycastle.pbe.max_iteration_count property (default 10,000,000), and prevents narrowing beyond the int range during parameter parsing. This vulnerability also affects the LTS branch before version 2.73.13.
Potential Impact
An attacker can supply a crafted iteration count parameter that causes the key derivation process to consume excessive CPU resources, potentially leading to denial of service conditions. The vulnerability does not directly disclose sensitive information or allow privilege escalation but can degrade service availability due to resource exhaustion.
Mitigation Recommendations
A fix is available in Bouncy Castle for Java versions 1.86 and 2.73.13 and later, which enforce iteration count limits and reject invalid parameters. Users should upgrade to these fixed versions to mitigate the vulnerability. No additional vendor advisory or patch links were provided, so patch status is based on the version information in the description. Until upgraded, users should avoid processing untrusted inputs with legacy PBES1 and PKCS#12 PBE schemes or configure the org.bouncycastle.pbe.max_iteration_count property to a safe lower value if possible.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- bcorg
- Date Reserved
- 2026-09-25T08:41:02.479Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 6ac0bd68a43b0b3b89ad2026
Added to database: 10/03/2026, 08:31:36 UTC
Last enriched: 10/03/2026, 08:46:09 UTC
Last updated: 10/04/2026, 03:45:56 UTC
Views: 17
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.