Intel

AIKIDO-2026-23278

p12-keystore is vulnerable to Uncontrolled Resource Consumption

Pre-CVE
Found by Aikido Intel before public disclosure or CVE publication.
Published Oct 21, 2026
October 21, 2026

45

CVE Score

Medium

Uncontrolled Resource Consumption

Are you affected? Scan for Free

TL;DR

The entry point is KeyStore::from_pkcs12() in src/keystore.rs, which parses an attacker-supplied PKCS#12 (PFX) container; the default call path builds a private-key certificate chain by repeatedly searching parsed_certs for an issuer whose subject matches the current certificate's issuer, with only a self-signed termination check. A PKCS#12 file containing a cyclic certificate chain (A issued by B, B issued by A) causes this loop to run indefinitely while appending to the certs Vec, and separately verify_mac()/decrypt() in src/codec.rs apply MAC/PBKDF2 iteration counts and scrypt cost parameters read directly from the container DER with no upper bound, letting a crafted container force excessive CPU/memory work during password verification and decryption. The fix adds a certs.contains(&issuer.cert) cycle-break in the keystore chain loop and introduces MAX_MAC_ITERATIONS/MAX_KDF_ITERATIONS/MAX_SCRYPT_MEMORY_BYTES/MAX_SCRYPT_PARALLELISM checks in codec.rs that return Error::InvalidParameters when exceeded.

How do I fix this?

Upgrade the p12-keystore package to version 0.3.2 or later.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and import PKCS#12 containers through the library's keystore parsing function.

Versions

0.1.0 - 0.3.1

Fixed in 0.3.2

Background info

p12-keystore is vulnerable to Uncontrolled Resource Consumption in versions 0.1.0 - 0.3.1.

Get secure today,
quickly and for free.

Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.

No credit card required | Scan results in 32 seconds.

Trusted by 150k+ orgs
  • Revolut
  • n8n
  • Lovable
  • Deel
  • Prove
  • Omnea