Vulnerability · Published Oct 3, 2026 · Assigned by bcorg

CVE-2026-97873Legacy PBES1 and PKCS#12 PBE iteration count honoured unbounded in the raw JCA provider

Medium 5.3

In plain English

A medium-severity resource allocation without limits in BC-JAVA from Legion of the Bouncy Castle Inc.. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.3% (higher than 18% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 4.0)5.3Medium
Exploit odds (30 days)0.3%top 81.8% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official 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.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Debian:12bouncycastleno fix listedDEBIAN-CVE-2026-97873
Debian:13bouncycastleno fix listedDEBIAN-CVE-2026-97873
Debian:14bouncycastle1.86-1DEBIAN-CVE-2026-97873
Ubuntu:26.04:LTSbouncycastleno fix listedUBUNTU-CVE-2026-97873
Ubuntu:26.10bouncycastleno fix listedUBUNTU-CVE-2026-97873

Affected products (as reported)

VendorProductVersions
Legion of the Bouncy Castle Inc. BC-JAVA 0 – before 1.86
Legion of the Bouncy Castle Inc. BC-LTS-JAVA 2.73.0 – before 2.73.13

Weakness: CWE-770 · 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

References