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.
| Severity | HighCVSS 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
- 1Attacker crafts fileSets PKCS#12 iteration count to zero
- 2node-forge derives keyConstant key ignores the password
- 3App accepts fileMAC check passes for any password
- 4Forged content trustedAttacker-chosen contents are processed
- 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.
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 / product | Affected versions | Fixed in |
|---|---|---|
| node-forge · npm | <= 1.4.0 | 1.4.1 |
What to do
- Update node-forge to 1.4.1 or later in every project that depends on it
- Run npm ls node-forge to find transitive copies and update them too
- Until patched, reject PKCS#12 inputs whose MacData iteration count is less than 1
Timeline
- 29 Oct 2026, 19:17 UTCPublicly disclosed
- 29 Oct 2026, 19:17 UTCReported by NVD · NVD
- 29 Oct 2026, 19:21 UTCPicked up by Zero Radar
- 30 Oct 2026, 23:02 UTCGitHub Advisory reported on it · GitHub Advisory
- 30 Oct 2026, 23:02 UTCFixed version published: node-forge 1.4.1 · GitHub Advisory
Sources 2 reports, oldest first
Official vendor, government CERT or advisory database
- CVE-2026-118782NVD · 29 Oct 2026, 19:17 UTC
- Forge: PKCS#12 MAC forgery and constant-key PBE via zero iteration countGitHub Advisory · 30 Oct 2026, 23:02 UTC
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