CVE-2026-118782: Forge PKCS#12 MAC validation bypass

CVE-2026-118782 · Severity: high · CVSS 7.5 · Published 2026-10-29

Forge is a JavaScript library providing cryptographic functions including certificate and key handling. Prior to version 1.4.1, the library incorrectly accepts zero or negative iteration counts in PKCS#12 password-based encryption, allowing attackers to bypass password integrity checks on encrypted certificates and keys. An attacker with a crafted PKCS#12 file can forge or modify protected content without knowing the correct password.

Technologies: Digital Bazaar Forge, node-forge (npm). Vendors: Digital Bazaar, npm.

Quick answers

Is CVE-2026-118782 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-118782 being exploited in the wild.
How severe is CVE-2026-118782?
High severity, with a CVSS score of 7.5, published 29 October 2026.
Which products and versions are affected?
Digital Bazaar Forge prior to 1.4.1; node-forge (npm) <= 1.4.0, SEMVER:introduced=0,fixed=1.4.1.
Is there a fix for CVE-2026-118782?
Yes. node-forge (npm): upgrade to 1.4.1 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-118782 attacked?
It is attacked over the network.
Am I affected by CVE-2026-118782?
Check whether you run Digital Bazaar Forge or node-forge (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • node-forge (npm): upgrade to 1.4.1 or later
    npm install node-forge@1.4.1

Technical details

The vulnerability exists in the PKCS#12 MAC and key derivation functions, specifically in pki.pbe.generatePkcs12Key() and pkcs12.pkcs12FromAsn1(). When iteration count is zero or negative, the function returns a constant key independent of the password and salt. This affects password-based encryption using pbeWithSHAAnd3-KeyTripleDES-CBC and pbewithSHAAnd40BitRC2-CBC algorithms. PBES2/PBKDF2-encrypted content is not affected. An attacker can process a crafted PKCS#12 file to bypass integrity checks via network or local access.

Affected products

  • Digital Bazaar Forge prior to 1.4.1

Identifiers

  • CVE-2026-118782
  • GHSA-jc66-7q78-782g

Timeline

  • 2026-10-29: disclosed
  • 2026-10-27: patched

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.