Junglewise Threat Intelligence

CVE-2022-24773: Digital Bazaar node-forge signature forgery in RSA PKCS#1 v1.5

CVE-2022-24773 · Severity: low · CVSS 3.1 · Published 2022-03-18

Technologies: node-forge (npm), Digital Bazaar Forge. Vendors: npm, Digital Bazaar.

Executive brief

node-forge is a widely used library for implementing secure communications and cryptography in JavaScript applications. A vulnerability in its signature verification process could allow an attacker to bypass security checks by providing a specially crafted digital signature. This could lead to unauthorized actions or the acceptance of fraudulent data as authentic, potentially compromising the integrity of the application.

Technical details

The RSA PKCS#1 v1.5 signature verification implementation in node-forge prior to version 1.3.0 is lenient when checking the DigestInfo ASN.1 structure. Specifically, it fails to strictly validate the structure and does not check for trailing garbage bytes after the DigestInfo. An attacker can exploit this leniency to forge signatures, particularly when a low public exponent is used, by crafting a structure that contains a valid digest but invalid ASN.1 formatting. This is a variation of the Bleichenbacher signature forgery attack. The issue was fixed in version 1.3.0 by making the DER parsing more strict and adding a validator for the RSASSA-PKCS-v1_5 DigestInfo structure.

Affected products

  • Digital Bazaar node-forge < 1.3.0

Timeline

  • 2022-03-17: patched: Fixed in version 1.3.0
  • 2022-03-18: disclosed: GitHub Advisory published

References

Related threats