Zero Radar
← feed
HighVulnerabilityCVE-2026-118782updated 30 Oct 2026, 23:02 UTC

node-forge accepts zero-iteration PKCS#12 files, letting any password pass

Attackers can craft a fake certificate file (PKCS#12) that opens with any password, or decrypt a private key without knowing its password. This can let them tamper with files or read keys they should not see.

Fixed in node-forge 1.4.1 · out Official, 2 sources
SeverityHighCVSS 7.5 of 10
Being exploited?UnclearNo reports either way yet
Fix available?Yesnode-forge 1.4.1 · since 30 Oct 2026
How sure is this?Official, 2 sourcesBacked by an official source

How the attack works simplified

  1. 1Attacker crafts fileSets PKCS#12 iteration count to zero
  2. 2node-forge derives keyConstant key ignores the password
  3. 3App accepts fileMAC check passes for any password
  4. 4Forged content trustedAttacker-chosen contents are processed
  5. ResultAttacker bypasses password checks

What happened

node-forge's pkcs12FromAsn1() and PKCS#12 key derivation accept an iteration count of zero or less, causing the derived key to be constant and independent of password and salt. This breaks PKCS#12 MAC integrity checks and PKCS#12 PBE decryption of shrouded keys and encrypted contents.

Why it is dangerous: Anyone processing untrusted PKCS#12/PFX files or PKCS#8 encrypted private keys with node-forge can be tricked into accepting forged content, and attackers can decrypt password-protected private keys without the password.

Are you affected?

You are affected if your application uses node-forge 1.4.0 or earlier to parse PKCS#12/PFX files or decrypt PKCS#8 ENCRYPTED PRIVATE KEY data using the PKCS#12 PBE schemes (pbeWithSHAAnd3-KeyTripleDES-CBC or pbewithSHAAnd40BitRC2-CBC).

Package / productAffected versionsFixed in
node-forge · npm<= 1.4.01.4.1

What to do

  1. Update node-forge to 1.4.1 or later in every project that depends on it
  2. Run npm ls node-forge to find transitive copies and update them too
  3. Until patched, reject PKCS#12 inputs whose MacData iteration count is less than 1

Timeline

  1. 29 Oct 2026, 19:17 UTC
    Publicly disclosed
  2. 29 Oct 2026, 19:17 UTC
    Reported by NVD · NVD
  3. 29 Oct 2026, 19:21 UTC
    Picked up by Zero Radar
  4. 30 Oct 2026, 23:02 UTC
    GitHub Advisory reported on it · GitHub Advisory
  5. 30 Oct 2026, 23:02 UTC
    Fixed version published: node-forge 1.4.1 · GitHub Advisory

Sources 2 reports, oldest first

Official vendor, government CERT or advisory database

Technical details

ID
CVE-2026-118782 · GHSA-jc66-7q78-782g
CVSS
7.5 / 10
Disclosed
29 Oct 2026, 19:17 UTC
On Zero Radar
29 Oct 2026, 19:21 UTC (4 min after disclosure)
Last change
30 Oct 2026, 23:02 UTC

The plain-language parts and the attack diagram were written by an AI model (anthropic/claude-haiku-5.5) from the sources above. Facts like versions, exploitation and dates come from the sources themselves. How Zero Radar works

node-forge accepts zero-iteration PKCS#12 files, letting any password pass · Zero Radar