CVE-2026-85393: node-forge RSA PKCS#1 V1.5 Signature Forgery Vulnerability
HIGHCVE-2026-85393 is a HIGH (CVSS 7.5) rsa pkcs#1 v1.5 signature forgery vulnerability (CWE-347: Improper Verification of Cryptographic Signature) affecting node-forge libraries in the npm ecosystem. The issue involves rsa pkcs#1 v1.5 signature forgery via extra elements in nested digestalgorithm. Remediation is available by upgrading affected packages to version 1.4.1.
CVE-2026-85393 at a Glance
Security Impact
CVSS: 7.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N).
How to Fix CVE-2026-85393
To remediate this vulnerability, upgrade all affected node-forge dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install node-forge@1.4.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls node-forge
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2026-85393, inspect your project dependencies using npm:
npm ls node-forge
Analyze the terminal output to locate any version of node-forge in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.4.1), your application is affected.
Note: The npm ls node-forge command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-347: Improper Verification of Cryptographic Signature, where the product does not verify, or incorrectly verifies, the cryptographic signature for data. In node-forge, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-85393 Affected node-forge Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
node-forge
|
npm |
< 1.4.1
|
1.4.1
|
References
Frequently Asked Questions
What is CVE-2026-85393?
Which node-forge versions are affected?
What version fixes CVE-2026-85393?
Is node-forge affected?
What is the CVSS score of CVE-2026-85393?
What CWE is associated with CVE-2026-85393?
How can I check npm dependencies for CVE-2026-85393?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-2g46-22mc-6gwp",
"modified" : "2026-12-01T17:53:12Z",
"published" : "2026-12-01T17:53:12Z",
"aliases" : [ "CVE-2026-85393" ],
"summary" : "node-forge: RSA PKCS#1 v1.5 signature forgery via extra elements in nested DigestAlgorithm",
"details" : "### Summary\nRSASSA-PKCS1-v1_5 signature verification (`publicKey.verify()` with the default scheme, also used by X.509 certificate and PKCS#7 verification) ignored extra elements inside the nested DigestAlgorithm SEQUENCE of the DigestInfo. For RSA keys with a low public exponent (e=3) this allows signatures to be forged for an arbitrary message without the private key. This is an incomplete fix of CVE-2026-33894. Fixed in node-forge 1.4.1.\n\n### Details\nIn `lib/rsa.js`, `key.verify()` with the default `RSASSA-PKCS1-V1_5` scheme removes the padding, parses the recovered DigestInfo with `asn1.fromDer()` and checks it with `asn1.validate()` against `digestInfoValidator`. The fix for CVE-2026-33894 (GHSA-ppp5-5v6c-4jwp) added a check on the element count of the outer DigestInfo SEQUENCE only. `asn1.validate()` ignores extra children of the nested DigestAlgorithm SEQUENCE, so elements placed after the OID and NULL parameters were neither validated nor counted. They give an attacker a block of freely chosen bytes inside an accepted DigestInfo, enough to construct a signature that verifies for an arbitrary message without the private key when the public exponent is small (Bleichenbacher-style forgery).\n\nRFC 8017 section 8.2.2 verifies a signature by encoding the expected EMSA-PKCS1-v1_5 message and comparing it with the recovered one; section 9.2 defines the DigestInfo encoding.\n\nThe fix adds `_encodeDigestInfo()`, which DER-encodes the expected DigestInfo from the digest algorithm OID and the digest (with and without NULL parameters). Verification now requires the recovered DigestInfo to match one of these encodings byte for byte. This also fixes the related non-canonical encoding issue GHSA-6qrw-m8cv-hcxf.\n\n#### Patches\nFixed in node-forge 1.4.1. Verification now re-encodes the expected DigestInfo and requires a byte-for-byte match (RFC 8017 section 8.2.2).\n\n#### Workarounds\nDo not use RSA keys with a low public exponent (e=3) for signature verification.\n\n#### Resources\n- https://github.com/digitalbazaar/forge/issues/1149\n- https://www.rfc-editor.org/rfc/rfc8017#section-8.2.2\n- https://www.rfc-editor.org/rfc/rfc8017#section-9.2\n- CVE-2026-33894 / https://github.com/digitalbazaar/forge/security/advisories/GHSA-ppp5-5v6c-4jwp (incomplete fix)\n- https://github.com/advisories/GHSA-86w9-cpqp-85rv (global advisory for CVE-2026-85393)\n- https://github.com/advisories/GHSA-6qrw-m8cv-hcxf (related, same fix)\n- Fix based on https://github.com/digitalbazaar/forge/pull/1159, https://github.com/digitalbazaar/forge/pull/1160, https://github.com/digitalbazaar/forge/pull/1161 and https://github.com/digitalbazaar/forge/pull/1162\n\n#### Severity\nCVSS 3.1: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N (7.5, High)\nCVSS 4.0 (informational): CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N (8.2)\nBoth versions rate this High. The severity rating follows CVSS 3.1.\n\n### Proof of concept\nThe forged signature's EMSA-PKCS1-v1_5 block (signature^e mod n, 2048-bit key, SHA-256) has this shape:\n\n 00 01 FF FF FF FF FF FF FF FF 00\n 30 81 F2 DigestInfo SEQUENCE\n 30 81 CD DigestAlgorithm SEQUENCE\n 06 09 60 86 48 01 65 03 04 02 01 sha256 OID\n 05 00 NULL parameters\n 04 81 BD <189 bytes> extra element (attacker-chosen bytes)\n 04 20 <SHA-256(m)> digest\n\nBefore 1.4.1 the extra element was ignored and `publicKey.verify(digest, signature)` returned true. For an e=3 key, the 189 free bytes are enough to find a signature whose cube has this form for any message, without the private key. With 1.4.1, verification throws \"ASN.1 object does not contain a valid RSASSA-PKCS1-v1_5 DigestInfo value.\"\n\nRegression tests in tests/unit/rsa.js: \"should reject forged nested DigestAlgorithm signature\" (a keyless e=3 forgery vector) and, under \"canonical DigestInfo checks\", \"should reject DigestInfo with extra DigestAlgorithm element\". Standalone PoC: tests/pocs/ghsa-2g46-22mc-6gwp.js. Both are included in the 1.4.1 release.\n\n### Impact\nApplications that verify RSASSA-PKCS1-v1_5 signatures with node-forge: `publicKey.verify()` with the default scheme, and X.509 certificate and PKCS#7 signature verification, which use it. If the verifying RSA public key has a low public exponent (e=3), an attacker can forge a signature for an arbitrary message that verifies as valid, without the private key. Only keys with a small public exponent such as e=3 are practically affected.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "node-forge"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.4.1"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 1.4.0"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/digitalbazaar/forge/security/advisories/GHSA-2g46-22mc-6gwp"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-85393"
}, {
"type" : "WEB",
"url" : "https://github.com/digitalbazaar/forge/issues/1149"
}, {
"type" : "WEB",
"url" : "https://github.com/digitalbazaar/forge/pull/1152"
}, {
"type" : "WEB",
"url" : "https://github.com/digitalbazaar/forge/pull/1163"
}, {
"type" : "WEB",
"url" : "https://github.com/digitalbazaar/forge/commit/2bce9d477a2ff436e86ff9694ae999f1552aa2bb"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/digitalbazaar/forge"
}, {
"type" : "WEB",
"url" : "https://github.com/digitalbazaar/forge/blob/v1.4.0/lib/asn1.js"
}, {
"type" : "WEB",
"url" : "https://github.com/digitalbazaar/forge/blob/v1.4.0/lib/rsa.js"
}, {
"type" : "WEB",
"url" : "https://www.vulncheck.com/advisories/node-forge-through-1.4.0-rsa-pkcs-1-1.5-signature-forgery-via-nested-digestalgorithm-padding"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-347" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-12-01T17:53:12Z",
"nvd_published_at" : null
}
}