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… (CVE-2026-97873)
Bouncy Castle for Java versions before 1.86 and LTS versions before 2.73.13 contain a vulnerability in the legacy PBES1 (PKCS#5 scheme 1) and PKCS#12 password-based encryption (PBE) implementations. These implementations accept an iteration count for key derivation from untrusted input without proper bounds checking, allowing a small input to cause an arbitrary amount of computational work before verification. The issue arises because the iteration count can be negative, excessively large, or narrowed incorrectly when parsed. The vulnerability has been addressed by enforcing bounds on the iteration count and rejecting invalid values.
AI Analysis
Technical Summary
In Bouncy Castle for Java prior to version 1.86 and LTS versions before 2.73.13, the raw JCA provider's legacy PBES1 and PKCS#12 PBE families use password-based key derivation with an iteration count taken from untrusted input without bounding it. This allows a crafted small input to dictate an arbitrary amount of work before verification, potentially causing denial of service due to excessive computation. The AlgorithmParameters implementations accepted any count from encoded PKCS12PBEParams or PBEParameter, including values beyond the int range that were narrowed improperly. The vulnerability affects all Cipher, Mac, and SecretKeyFactory operations in these families, including when decrypting PKCS#12 PBE-protected private keys via javax.crypto.EncryptedPrivateKeyInfo.getKeySpec(). The fix enforces rejection of negative or over-limit iteration counts based on the org.bouncycastle.pbe.max_iteration_count property (default 10,000,000) and rejects counts beyond the int range rather than narrowing them.
Potential Impact
The vulnerability allows an attacker to supply an iteration count that causes the cryptographic operations to perform an arbitrary and potentially very large amount of computational work before completing. This can lead to denial of service conditions by exhausting CPU resources. There is no indication of confidentiality, integrity, or availability impact beyond resource exhaustion. No known exploits in the wild have been reported.
Mitigation Recommendations
A fix is available in Bouncy Castle for Java version 1.86 and LTS version 2.73.13 that enforces bounds on the iteration count used in legacy PBES1 and PKCS#12 PBE key derivations. Users should upgrade to these or later versions to mitigate the vulnerability. Until upgraded, users should be aware that untrusted inputs controlling iteration counts can cause excessive computation. Patch status is not explicitly confirmed in the input data but the description states the issue is fixed in these versions. Verify with the vendor advisory for the latest remediation guidance.
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… (CVE-2026-97873)
Description
Bouncy Castle for Java versions before 1.86 and LTS versions before 2.73.13 contain a vulnerability in the legacy PBES1 (PKCS#5 scheme 1) and PKCS#12 password-based encryption (PBE) implementations. These implementations accept an iteration count for key derivation from untrusted input without proper bounds checking, allowing a small input to cause an arbitrary amount of computational work before verification. The issue arises because the iteration count can be negative, excessively large, or narrowed incorrectly when parsed. The vulnerability has been addressed by enforcing bounds on the iteration count and rejecting invalid values.
CVSS v4.0
Affected software
pkg:maven/org.bouncycastle/bcprov-jdk15onpkg:maven/org.bouncycastle/bcpkix-jdk15onRun 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 prior to version 1.86 and LTS versions before 2.73.13, the raw JCA provider's legacy PBES1 and PKCS#12 PBE families use password-based key derivation with an iteration count taken from untrusted input without bounding it. This allows a crafted small input to dictate an arbitrary amount of work before verification, potentially causing denial of service due to excessive computation. The AlgorithmParameters implementations accepted any count from encoded PKCS12PBEParams or PBEParameter, including values beyond the int range that were narrowed improperly. The vulnerability affects all Cipher, Mac, and SecretKeyFactory operations in these families, including when decrypting PKCS#12 PBE-protected private keys via javax.crypto.EncryptedPrivateKeyInfo.getKeySpec(). The fix enforces rejection of negative or over-limit iteration counts based on the org.bouncycastle.pbe.max_iteration_count property (default 10,000,000) and rejects counts beyond the int range rather than narrowing them.
Potential Impact
The vulnerability allows an attacker to supply an iteration count that causes the cryptographic operations to perform an arbitrary and potentially very large amount of computational work before completing. This can lead to denial of service conditions by exhausting CPU resources. There is no indication of confidentiality, integrity, or availability impact beyond resource exhaustion. No known exploits in the wild have been reported.
Mitigation Recommendations
A fix is available in Bouncy Castle for Java version 1.86 and LTS version 2.73.13 that enforces bounds on the iteration count used in legacy PBES1 and PKCS#12 PBE key derivations. Users should upgrade to these or later versions to mitigate the vulnerability. Until upgraded, users should be aware that untrusted inputs controlling iteration counts can cause excessive computation. Patch status is not explicitly confirmed in the input data but the description states the issue is fixed in these versions. Verify with the vendor advisory for the latest remediation guidance.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-78x9-mjv2-rr3v
- Osv Schema Version
- 1.4.0
- Aliases
- ["CVE-2026-97873"]
- Database Specific Severity
- MODERATE
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 6ac1397da43b0b3b89d66c8c
Added to database: 10/03/2026, 17:21:01 UTC
Last enriched: 10/03/2026, 17:30:53 UTC
Last updated: 10/04/2026, 02:46:08 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.