Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessObtain target PKCS#12/PFX file
-
DeliverySubstitute attacker certificate and private key
-
ExploitSet MacData.iterations to zero (DER 02 01 00)
-
ExecutionCompute HMAC-SHA1 with constant key 0x03×20
-
ImpactVictim app reports MAC verified under any password
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A08:2025 - Software or Data Integrity Failures
ASVS 5.0
V15 - Secure Coding and Architecture Integrity verification
|
| Exploitation Conditions | Exploitation requires that the application import PKCS#12/PFX files or PKCS#8 ENCRYPTED PRIVATE KEY input from an untrusted source via forge.pkcs12.pkcs12FromAsn1() or forge.pki.decryptPrivateKeyInfo(), and rely on password-based MAC verification or successful PBE decryption to establish that the file was produced by someone who knows the password; this is the default API and call pattern, so no non-default configuration is needed. The flaw is reached specifically through the PKCS#12 MAC path and the PKCS#12 PBE schemes pbeWithSHAAnd3-KeyTripleDES-CBC and pbewithSHAAnd40BitRC2-CBC (including shrouded key bags and encrypted SafeContents). Limiting factors: content protected with PBES2/PBKDF2 is NOT affected; the attacker gains no knowledge of the password or the original private key; and the attack only matters where PKCS#12 input comes from an untrusted party - applications that only load their own trusted keystores are not meaningfully exposed. No password, decryption oracle, or user interaction is required, only one offline HMAC computation. |
| Impact | This is a genuine integrity-bypass issue with a confirmed, working PoC, but its real-world urgency is scoped by how the library is used. The vendor CVSS 3.1 vector (AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N = 7.5 High) reflects a network-reachable, low-complexity, no-privilege, no-interaction attack whose only impact is integrity (C:N/A:N) - the attacker forges a valid MAC / decrypts PBE content so a tampered PKCS#12 verifies under any password, but does not learn the password or original key. No EPSS score and no CISA KEV entry were provided in the input, so there is no signal of mass or active exploitation; the vuln.today Decision label is 'this_week' (not act_now/emergency), consistent with a serious but not actively-exploited flaw. The AV:N rating should be read carefully: the mechanism is actually malicious PKCS#12/PFX or PKCS#8 data being imported, so 'network' applies only where the application ingests such files from untrusted remote sources - the practical risk concentrates on apps that import PKCS#12/PFX or encrypted private keys from untrusted parties and trust MAC/decryption success as proof of authenticity. Signals are consistent rather than conflicting (vendor CVSS 3.1 and 4.0 both rate High; PoC is real; no KEV/EPSS to contradict), so this is a legitimate patch priority for affected consumers rather than a high-CVSS-but-hollow finding, but it is not a drop-everything emergency absent exploitation data. |
| Exploit ScenarioDerived | An application uses node-forge to import PKCS#12/PFX files or PKCS#8 encrypted private keys supplied by untrusted parties and treats a successful password-based MAC check (or successful decryption) as proof the file came from someone who knows the password. An attacker who does not know the password replaces the file's contents with their own certificate and private key, sets MacData.iterations to 0, and computes a valid HMAC-SHA1 using the fixed constant key (0x03 repeated 20 times), so forge.pkcs12.pkcs12FromAsn1() reports the file as verified under whatever password the application supplies. Working exploit code exists: a PoC is published in the GHSA advisory and committed to the repository under tests/pocs/, requiring only a single offline HMAC and no oracle, password, or user interaction. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 29, 2026
PKCS#12 MAC forgery and constant-key password-based decryption in node-forge 1.4.0 and earlier let anyone who does not know a PFX password tamper with a PKCS#12 file - swapping in attacker-chosen certificates or an unencrypted private key - and have forge.pkcs12.pkcs12FromAsn1() report the MAC as verified under whatever password the application supplies. The root cause is that a MacData iteration count of zero or less is accepted from the input, collapsing the RFC 7292 Appendix B.2 key derivation to a public constant (0x03 repeated); the same KDF is used by the pbeWithSHAAnd3-KeyTripleDES-CBC and pbewithSHAAnd40BitRC2-CBC schemes, so shrouded key bags, encrypted SafeContents and PKCS#8 ENCRYPTED PRIVATE KEY input handled via forge.pki.decryptPrivateKeyInfo() likewise decrypt with any password. The vendor advisory ships a working proof-of-concept and the fix commit adds it to tests/pocs/; no CISA KEV listing exists and exploitation is limited to applications that import PKCS#12 or encrypted PKCS#8 material from untrusted parties and rely on MAC verification or successful decryption as proof of password knowledge. With CVSS 3.1 scored 7.5 (AV:N/AC:L/PR:N/UI:N, integrity-only impact) this is a genuine integrity bypass but not an emergency for deployments that only load their own trusted keystores; it should be remediated this week given the public PoC.
RemediationAI
Vendor-released patch: node-forge 1.4.1. Upgrade the npm dependency to 1.4.1 or later (patch commit d9584aa56824972858366d5187b3d29e46bf3656, advisory https://github.com/digitalbazaar/forge/security/advisories/GHSA-jc66-7q78-782g, release https://github.com/digitalbazaar/forge/releases/tag/v1.4.1); 1.4.1 rejects iteration counts below 1 with 'PKCS#12 MAC iteration count must be >= 1.' and 'PKCS#12 key derivation iteration count must be >= 1.', covering MAC verification, both PKCS#12 PBE schemes and direct forge.pkcs12.generateKey() callers. If an immediate upgrade is not possible, the vendor's only stated workaround is to reject inputs whose MacData.iterations is present and less than 1 before calling forge.pkcs12.pkcs12FromAsn1(); for encrypted private keys using the PKCS#12 PBE schemes the vendor notes there is no simple workaround other than inspecting the pkcs-12PbeParams iteration count before decryption or upgrading - both options require custom pre-parse ASN.1 inspection, add parsing complexity that can itself diverge from forge's parser, and do not cover every call path into the shared KDF. Because the integrity value derives from a constant, non-cryptographic validation of the MAC or of decryption success cannot be substituted. Applications whose PKCS#12 input is exclusively self-generated can treat this as lower priority, but should still take the update as part of the next scheduled dependency refresh, consistent with the this_week priority label and the public proof-of-concept.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 2 packages in npm, euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
node-forge is a pure-JavaScript implementation of TLS and related PKI primitives, so it re-implements PKCS#12 (RFC 7292) parsing and key derivation in lib/pkcs12.js and lib/pbe.js. The weakness is CWE-354 (Improper Validation of Integrity Check Value), with CWE-1284 (Improper Validation of Specified Quantity in Input) as the mechanism: MacData is defined as iterations INTEGER DEFAULT 1 and RFC 8018 requires INTEGER (1..MAX) for the analogous PBKDF parameter, but forge passed the attacker-supplied MacData.iterations straight into pki.pbe.generatePkcs12Key() without a lower bound. The RFC 7292 Appendix B.2 KDF runs its hash loop 'iter' times; at zero iterations no hashing occurs and the function returns the diversifier ID byte repeated (0x03 x 20 for an HMAC-SHA1 MAC key), independent of password and salt, so a single offline HMAC is enough to forge a MAC over arbitrary AuthenticatedSafe content. The same KDF backs pki.pbe.getCipherForPKCS12PBE() for pbeWithSHAAnd3-KeyTripleDES-CBC and pbewithSHAAnd40BitRC2-CBC, whose pkcs-12PbeParams iterations are also read from the input; at zero iterations the key and IV degrade to constants (0x01 and 0x02 repeated), reachable from shrouded key bags, encrypted SafeContents in pkcs12FromAsn1(), and forge.pki.decryptPrivateKeyInfo() for ENCRYPTED PRIVATE KEY PEM input. PBES2/PBKDF2-encrypted content is explicitly unaffected. The upstream fix adds bounds checks in both lib/pkcs12.js (MAC verification) and lib/pbe.js (KDF entry point), covering the MAC path, both PKCS#12 PBE schemes and direct forge.pkcs12.generateKey() callers; it is related to but distinct from CVE-2025-12816 / GHSA-5gfm-wpxj-wjgq, which involved an ASN.1 validator desynchronization that caused MacData to be skipped entirely.
Know when Forge gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
Attacker needs no credentials and only an offline HMAC (PR:N/AC:L); impact is integrity bypass of the authenticity check (I:H) with no password/key disclosure (C:N) and no availability effect (A:N).
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
2DescriptionCVE.org
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.
Blast Radius
ecosystem impact- 6 npm packages depend on node-forge (3 direct, 3 indirect)
Ecosystem-wide dependent count for version 1.4.1.
Articles & Coverage 1
Technical POC Analysis
CWE-354 (Improper Validation of Integrity Check Value), with a secondary CWE-1284 (Improper Validation of Specified Quantity).
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Executive ViewAI
CVE-2026-118782 in node-forge (versions ≤1.4.0) allows an attacker to tamper with PKCS#12 files without knowing the password, potentially injecting malicious certificates or private keys. This affects any application that imports PKCS#12 files using the vulnerable library, compromising the integrity of cryptographic materials and undermining trust in certificate-based authentication and encryption.
Apply vendor patch.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.
An interpretation-conflict (CWE-436) vulnerability in node-forge versions 1.3.1 and earlier enables unauthenticated atta
The package node-forge before 0.10.0 is vulnerable to Prototype Pollution via the util.setPath function. Rated high seve
RSA PKCS#1 v1.5 signature forgery in node-forge through v1.4.0 enables unauthenticated network attackers to craft signat
Forge (also called `node-forge`) is a native implementation of Transport Layer Security in JavaScript. Rated high severi
Regular expression denial of service in node-forge's pem.decode() allows remote, unauthenticated attackers to block the
Denial of service in node-forge (Forge) 1.3.2 through 1.4.0 lets remote, unauthenticated attackers exhaust CPU time and
Denial of service in node-forge's JavaScript TLS implementation: a connection created with forge.tls.createConnection()
Call stack exhaustion in node-forge's TLS record processing (all versions through 1.4.0) allows a remote peer to crash o
Forge (also called `node-forge`) is a native implementation of Transport Layer Security in JavaScript. Rated high severi
Forge (also called `node-forge`) is a native implementation of Transport Layer Security in JavaScript. Rated high severi
Certificate chain validation in node-forge (Forge) through version 1.4.0 can be bypassed because the parser maps the dep
Forge (also called `node-forge`) is a native implementation of Transport Layer Security in JavaScript. Rated medium seve
EUVD-2026-113341
GHSA-jc66-7q78-782g
NVD
CVE.org
EPSS
Exploit-DB