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).
Published: 2026-10-02
Score: 5.3 Medium
EPSS: n/a
KEV: No
Impact: Resource Exhaustion
Action: Apply Patch
AI Analysis

Impact

In the vulnerable Bouncy Castle for Java implementations, password‑based key derivation functions (PBKDF2, scrypt, bcrypt) were invoked with cost parameters copied directly from untrusted input, with no enforcement of upper bounds. The affected entry points include the RFC‑9579 PBMAC1 MAC calculator builders, PKCS#8 and PKCS#12 cost guards, the raw PBKDF2 JCA provider, and the bcrypt round count used when parsing OpenSSH v1 private keys. An attacker who can supply crafted key material or cryptographic parameters can force the library to perform an arbitrarily large number of iterations or allocate an unbounded amount of working memory before it rejects the attempt. This results in a denial‑of‑service due to excessive CPU time, memory pressure, or storage usage, consistent with Weak Capacity Control (CWE‑770).

Affected Systems

Bouncy Castle for Java binaries prior to version 1.86, the Long Tail Support release series before 2.73.13, and the Bouncy Castle FIPS for Java (BC‑FJA) before bcpkix‑fips 1.0.13, 2.0.13, or 2.1.13. These include the standard Java provider libraries (BC‑JAVA, BC‑LTS‑JAVA) and the FIPS provider modules.

Risk and Exploitability

The CVSS score of 5.3 indicates moderate overall severity, and the EPSS score is not available, suggesting limited public data on exploitation. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities catalog. The most likely attack surface is user‑supplied cryptographic files that are parsed by libraries such as PKCS#8, PKCS#12, or OpenSSH v1 private keys. An attacker can trigger the unbounded cost calculations locally by providing a malicious file, or remotely if the application processes client‑supplied key data. Because the flaw requires no privileged execution or code injection, its primary impact is resource exhaustion rather than confidentiality or integrity compromise.

Generated by OpenCVE AI on October 2, 2026 at 08:59 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Bouncy Castle for Java to version 1.86 or newer, Bouncy Castle LTS to 2.73.13 or newer, or Bouncy Castle FIPS to 1.0.13, 2.0.13, or 2.1.13; these releases enforce bounds on all affected KDF cost parameters.
  • Configure the org.bouncycastle.openssh.max_rounds property to limit bcrypt rounds when processing OpenSSH v1 private keys, preventing excessive memory use.
  • If an upgrade cannot be performed, validate or sanitize all externally supplied KDF parameters—iteration counts, scrypt parallelism, and bcrypt round numbers—before passing them to the Bouncy Castle API to ensure they fall within acceptable limits.

Generated by OpenCVE AI on October 2, 2026 at 08:59 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Fri, 02 Oct 2026 07:45:00 +0000

Type Values Removed Values Added
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).
Title Password-based KDF cost parameters honoured unbounded from untrusted input across the remaining PBE entry points
Weaknesses CWE-770
References
Metrics cvssV4_0

{'score': 5.3, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/U:Amber'}


Subscriptions

No data.

cve-icon MITRE

Status: PUBLISHED

Assigner: bcorg

Published:

Updated: 2026-10-02T07:27:59.519Z

Reserved: 2026-07-26T22:44:21.286Z

Link: CVE-2026-17508

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-10-02T08:17:01.490

Modified: 2026-10-02T08:17:01.490

Link: CVE-2026-17508

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-10-02T09:00:18Z

Weaknesses
  • CWE-770

    Allocation of Resources Without Limits or Throttling