Security Vulnerability Report
中文
CVE-2026-33895 CVSS 7.5 HIGH

CVE-2026-33895

Published: 2026-03-27 21:17:26
Last Modified: 2026-04-14 01:14:42

Description

Forge (also called `node-forge`) is a native implementation of Transport Layer Security in JavaScript. Prior to version 1.4.0, Ed25519 signature verification accepts forged non-canonical signatures where the scalar S is not reduced modulo the group order (`S >= L`). A valid signature and its `S + L` variant both verify in forge, while Node.js `crypto.verify` (OpenSSL-backed) rejects the `S + L` variant, as defined by the specification. This class of signature malleability has been exploited in practice to bypass authentication and authorization logic (see CVE-2026-25793, CVE-2022-35961). Applications relying on signature uniqueness (i.e., dedup by signature bytes, replay tracking, signed-object canonicalization checks) may be bypassed. Version 1.4.0 patches the issue.

CVSS Details

CVSS Score
7.5
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N

Configurations (Affected Products)

cpe:2.3:a:digitalbazaar:forge:*:*:*:*:*:node.js:*:* - VULNERABLE
node-forge < 1.4.0

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
const forge = require('node-forge'); const { Ed25519 } = require('@noble/ed25519'); // Using noble for correct math if needed // Simulate a valid signature generation (normally done by legitimate user) const privateKey = '...'; // Private key hex const message = 'Important Message'; // 1. Generate a valid signature (Conceptual) // const signature = Ed25519.sign(message, privateKey); // 2. Exploit: Create a non-canonical signature // Ed25519 signatures are (R, S). The order L is 2^252 + ... // In the vulnerable forge, S can be S + L and still verify. // Mocking the verification bypass logic function verifyBypass(vulnerableSignature) { // Imagine vulnerableSignature has S' = S + L // Vulnerable forge code: // return forge.pki.ed25519.verify({ ... signature: vulnerableSignature }); console.log('Vulnerable library accepts S+L signature: True'); } // Standard library (Node.js crypto) rejects S+L function standardVerify(vulnerableSignature) { // Node.js crypto.verify returns false for S+L console.log('Standard library rejects S+L signature: False'); } verifyBypass('forged_signature_bytes'); standardVerify('forged_signature_bytes');

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-33895", "sourceIdentifier": "[email protected]", "published": "2026-03-27T21:17:26.157", "lastModified": "2026-04-14T01:14:42.487", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "Forge (also called `node-forge`) is a native implementation of Transport Layer Security in JavaScript. Prior to version 1.4.0, Ed25519 signature verification accepts forged non-canonical signatures where the scalar S is not reduced modulo the group order (`S >= L`). A valid signature and its `S + L` variant both verify in forge, while Node.js `crypto.verify` (OpenSSL-backed) rejects the `S + L` variant, as defined by the specification. This class of signature malleability has been exploited in practice to bypass authentication and authorization logic (see CVE-2026-25793, CVE-2022-35961). Applications relying on signature uniqueness (i.e., dedup by signature bytes, replay tracking, signed-object canonicalization checks) may be bypassed. Version 1.4.0 patches the issue."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N", "baseScore": 7.5, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "HIGH", "availabilityImpact": "NONE"}, "exploitabilityScore": 3.9, "impactScore": 3.6}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-347"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:digitalbazaar:forge:*:*:*:*:*:node.js:*:*", "versionEndIncluding": "1.3.3", "matchCriteriaId": "46CBC667-ED99-4B5B-89C8-428CF52FD3FB"}]}]}], "references": [{"url": "https://datatracker.ietf.org/doc/html/rfc8032#section-8.4", "source": "[email protected]", "tags": ["Third Party Advisory"]}, {"url": "https://github.com/digitalbazaar/forge/commit/bdecf11571c9f1a487cc0fe72fe78ff6dfa96b85", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://github.com/digitalbazaar/forge/security/advisories/GHSA-q67f-28xg-22rw", "source": "[email protected]", "tags": ["Vendor Advisory"]}, {"url": "https://github.com/digitalbazaar/forge/security/advisories/GHSA-q67f-28xg-22rw", "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "tags": ["Vendor Advisory"]}]}}