VU#725167: node-forge Signatur... Note

VU#725167: node-forge Signature Forgery Vulnerabilities in RSA-PKCS and ED25519 Implementations

Two critical cryptographic signature verification vulnerabilities exist in the widely used node-forge JavaScript library. These flaws allow attackers to forge RSA (PKCS#1 v1.5) and Ed25519 signatures under specific circumstances. The RSA vulnerability, CVE-2026-33894, arises from accepting non-canonical ASN.1 encodings and undersized padding during signature verification. This enables attackers to craft signatures that node-forge validates but standard libraries reject, especially with low public exponents. The Ed25519 vulnerability, CVE-2026-33895, stems from failing to enforce scalar canonicality, allowing signatures with non-canonical scalars to be accepted. This undermines signature uniqueness and enables substitution attacks. Affected versions range from 0.1.2 through 1.3.3 for RSA and 0.7.4 through 1.3.3 for Ed25519. The primary impact is the ability for attackers to bypass authentication, code-signing, or token validations. Applications using default node-forge verification APIs, including popular JOSE libraries, are potentially exposed. Exploitation is straightforward and can occur over the network. Version 1.4.0, released on 2026-04-05, fully addresses these issues by enforcing strict canonical validation for both RSA and Ed25519 signatures. Users are strongly advised to upgrade to this version to patch the vulnerabilities. If immediate upgrading is not feasible, recommended mitigations include auditing call sites and falling back to Node.js native crypto verification.