Legacy PBES1 and PKCS#12 PBE iteration count honoured unbounded in the raw JCA provider
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.
CVE-2026-97873
Primary source · Revision 1
Imported from structured advisory data. Source references identify upstream records or fields; verify affected versions and your deployed configuration.
Security context
Source reference: cve:CVE-2026-97873
BC-JAVA
Source reference: /containers/cna/affected/0/product
- Affected versions
- Not stated in this record
- Fixed versions
- Not stated in this record
- Prerequisites
- Not stated in this record
BC-LTS-JAVA
Source reference: /containers/cna/affected/1/product
- Affected versions
- Not stated in this record
- Fixed versions
- Not stated in this record
- Prerequisites
- Not stated in this record
Structured affected-version data
Original package identities and version rules from this source.
[
{
"repo": "https://github.com/bcgit/bc-java",
"vendor": "Legion of the Bouncy Castle Inc.",
"modules": [
"prov"
],
"product": "BC-JAVA",
"versions": [
{
"status": "affected",
"version": "0",
"lessThan": "1.86",
"versionType": "maven"
}
],
"platforms": [
"all"
],
"packageURL": "pkg:maven/org.bouncycastle/bcprov-jdk18on",
"packageName": "bcprov",
"programFiles": [
"PBE",
"PBEPKCS12",
"PBEPBKDF1",
"PBESecretKeyFactory",
"BaseBlockCipher",
"BaseStreamCipher",
"BaseWrapCipher",
"BaseMac"
],
"collectionURL": "https://www.bouncycastle.org/download/bouncy-castle-java/",
"defaultStatus": "unaffected"
},
{
"repo": "https://github.com/bcgit/bc-lts-java",
"vendor": "Legion of the Bouncy Castle Inc.",
"modules": [
"prov"
],
"product": "BC-LTS-JAVA",
"versions": [
{
"status": "affected",
"version": "2.73.0",
"lessThan": "2.73.13",
"versionType": "maven"
}
],
"platforms": [
"all"
],
"packageURL": "pkg:maven/org.bouncycastle/bcprov-lts8on",
"packageName": "bcprov-lts8on",
"programFiles": [
"PBE",
"PBEPKCS12",
"PBEPBKDF1",
"PBESecretKeyFactory",
"BaseBlockCipher",
"BaseStreamCipher",
"BaseWrapCipher",
"BaseMac"
],
"collectionURL": "https://www.bouncycastle.org/download/bouncy-castle-java-lts/",
"defaultStatus": "unaffected"
}
]- Related CVEs
- CVE-2026-97873
Source reference:
/cveMetadata/cveId
Publisher severity
medium
Source reference: /containers/cna/metrics
- Event
- #8804 · Revision 1
- Added to Heist Feed
- Publisher date