CVE-2026-17508: 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, several password-based key derivation entry points ran the KDF with cost parameters taken from the untrusted input being processed, without bounding them, so a small input could dictate an arbitrary amount of work before any password or integrity check could reject it. The affected paths are the RFC 9579 PBMAC1 MAC calculator builders, which took the PBKDF2 iteration count and derived-key length straight out of PBMAC1Params (JcePBMac1CalculatorBuilder, and PKCS12PBEUtils.createPBMac1Calculator reached from PKCS12PfxPdu.isMacValid); the scrypt parallelization parameter p in the PKCS#8 and PKCS#12 cost guards, which bounded only the cost parameter N and the block size r even though the scratch buffer scales with r times p, so the configured memory ceiling could be evaded entirely; the raw JCA PBKDF2 provider (org.bouncycastle.jcajce.provider.symmetric.PBEPBKDF2); and the bcrypt round count read from an encrypted OpenSSH v1 private key's own kdfoptions. Each now bounds the parameter before deriving, in line with the caps already applied elsewhere in the tree, with the OpenSSH round count configurable through the new org.bouncycastle.openssh.max_rounds property. This completes the bounding begun in 1.85 for the PKCS#8 / PBES2 decryptors (CVE-2026-15055). This issue also affects Bouncy Castle for Java LTS before 2.73.13, and Bouncy Castle for Java FIPS (BC-FJA) before bcpkix-fips 1.0.13 (1.0.X series), 2.0.13 (2.0.X series) and 2.1.13 (2.1.X series).
AI Analysis
Technical Summary
In Bouncy Castle for Java versions prior to 1.86, and certain LTS and FIPS versions before 2.73.13, 1.0.13, 2.0.13, and 2.1.13 respectively, several password-based key derivation entry points did not properly limit cost parameters derived from untrusted input. This lack of bounding allowed an attacker to cause the KDFs to perform an arbitrary amount of work, potentially leading to denial of service via resource exhaustion. Affected components include RFC 9579 PBMAC1 MAC calculator builders, scrypt parallelization parameter p in PKCS#8 and PKCS#12 cost guards, the raw JCA PBKDF2 provider, and bcrypt round counts from encrypted OpenSSH v1 private keys. The issue completes the bounding improvements started in version 1.85 for PKCS#8 / PBES2 decryptors (CVE-2026-15055). The fix involves bounding these parameters before derivation, with the OpenSSH round count now configurable via the org.bouncycastle.openssh.max_rounds property.
Potential Impact
The vulnerability allows an attacker to specify unbounded cost parameters for password-based key derivation functions, causing excessive computational resource consumption before password or integrity verification. This can lead to denial of service conditions by exhausting CPU or memory resources. There is no indication of direct compromise or code execution, but the resource exhaustion can disrupt normal operation of applications using the affected Bouncy Castle versions.
Mitigation Recommendations
Fixed versions are available that properly bound the cost parameters before key derivation. Users should upgrade to Bouncy Castle for Java version 1.86 or later, or to LTS version 2.73.13 or later, or to the specified fixed FIPS versions (1.0.13, 2.0.13, 2.1.13). The OpenSSH bcrypt round count is now configurable via the org.bouncycastle.openssh.max_rounds property. No additional mitigation is required if using these fixed versions.
CVE-2026-17508: 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, several password-based key derivation entry points ran the KDF with cost parameters taken from the untrusted input being processed, without bounding them, so a small input could dictate an arbitrary amount of work before any password or integrity check could reject it. The affected paths are the RFC 9579 PBMAC1 MAC calculator builders, which took the PBKDF2 iteration count and derived-key length straight out of PBMAC1Params (JcePBMac1CalculatorBuilder, and PKCS12PBEUtils.createPBMac1Calculator reached from PKCS12PfxPdu.isMacValid); the scrypt parallelization parameter p in the PKCS#8 and PKCS#12 cost guards, which bounded only the cost parameter N and the block size r even though the scratch buffer scales with r times p, so the configured memory ceiling could be evaded entirely; the raw JCA PBKDF2 provider (org.bouncycastle.jcajce.provider.symmetric.PBEPBKDF2); and the bcrypt round count read from an encrypted OpenSSH v1 private key's own kdfoptions. Each now bounds the parameter before deriving, in line with the caps already applied elsewhere in the tree, with the OpenSSH round count configurable through the new org.bouncycastle.openssh.max_rounds property. This completes the bounding begun in 1.85 for the PKCS#8 / PBES2 decryptors (CVE-2026-15055). This issue also affects Bouncy Castle for Java LTS before 2.73.13, and Bouncy Castle for Java FIPS (BC-FJA) before bcpkix-fips 1.0.13 (1.0.X series), 2.0.13 (2.0.X series) and 2.1.13 (2.1.X series).
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
Legion of the Bouncy Castle Inc.
BC-FJA
pkg:github/bcpkix-lts8onpkg: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 Bouncy Castle for Java versions prior to 1.86, and certain LTS and FIPS versions before 2.73.13, 1.0.13, 2.0.13, and 2.1.13 respectively, several password-based key derivation entry points did not properly limit cost parameters derived from untrusted input. This lack of bounding allowed an attacker to cause the KDFs to perform an arbitrary amount of work, potentially leading to denial of service via resource exhaustion. Affected components include RFC 9579 PBMAC1 MAC calculator builders, scrypt parallelization parameter p in PKCS#8 and PKCS#12 cost guards, the raw JCA PBKDF2 provider, and bcrypt round counts from encrypted OpenSSH v1 private keys. The issue completes the bounding improvements started in version 1.85 for PKCS#8 / PBES2 decryptors (CVE-2026-15055). The fix involves bounding these parameters before derivation, with the OpenSSH round count now configurable via the org.bouncycastle.openssh.max_rounds property.
Potential Impact
The vulnerability allows an attacker to specify unbounded cost parameters for password-based key derivation functions, causing excessive computational resource consumption before password or integrity verification. This can lead to denial of service conditions by exhausting CPU or memory resources. There is no indication of direct compromise or code execution, but the resource exhaustion can disrupt normal operation of applications using the affected Bouncy Castle versions.
Mitigation Recommendations
Fixed versions are available that properly bound the cost parameters before key derivation. Users should upgrade to Bouncy Castle for Java version 1.86 or later, or to LTS version 2.73.13 or later, or to the specified fixed FIPS versions (1.0.13, 2.0.13, 2.1.13). The OpenSSH bcrypt round count is now configurable via the org.bouncycastle.openssh.max_rounds property. No additional mitigation is required if using these fixed versions.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- bcorg
- Date Reserved
- 2026-07-26T22:44:21.286Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 6abf6160a43b0b3b898ac6d9
Added to database: 10/02/2026, 07:46:40 UTC
Last enriched: 10/02/2026, 08:02:33 UTC
Last updated: 10/03/2026, 04:45:56 UTC
Views: 15
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.