Forge: RSA PKCS#1 v1.5 signature forgery via non-canonical DigestInfo encoding
No exploitation in the wild has been reported. EPSS puts the chance of exploitation in the next 30 days at 0%. Fixed in node-forge 1.4.1.
Forge, also called node-forge, is a native implementation of Transport Layer Security in JavaScript. Prior to 1.4.1, publicKey.verify() with the default RSASSA-PKCS1-V1_5 scheme in lib/rsa.js parses the recovered DigestInfo with the lenient BER parser asn1.fromDer() and validates its structure with digestInfoValidator without requiring canonical DER bytes. Non-minimal or indefinite lengths, malformed parameter values, and non-canonical object identifier encodings with padded subidentifiers or trailing bytes can leave attacker-controlled data inside an accepted DigestInfo. When the verifying RSA public key uses a low exponent such as e=3, an attacker can use that encoding slack to forge a signature without the private key. The same path is used by X.509 certificate and PKCS#7 signature verification. This issue is fixed in version 1.4.1.
Affected
Vendors, products and packages with version ranges
| Vendor | Product | Versions | Fixed |
|---|---|---|---|
| digitalbazaar | <1.4.1 | ||
| npm: node-forge | <1.4.1, <=1.4.0 | 1.4.1 |
Timeline
Every event on this vulnerability
Related
Other vulnerabilities in node-forge (npm), strongest first
Embed
A live severity badge for an advisory, README or ticket