Junglewise Threat Intelligence

CVE-2022-24771: node-forge RSA signature forgery in PKCS#1 v1.5 verification

CVE-2022-24771 · 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 cryptographic library used in web applications to handle digital signatures and encryption. A flaw in RSA signature verification allows attackers to forge valid signatures on arbitrary data when a low public exponent is used, potentially bypassing authentication, tampering with signed messages, or compromising data integrity without detection.

Technical details

The vulnerability is an improper verification of cryptographic signatures (CWE-347) in RSA PKCS#1 v1.5 signature verification. The code is lenient in checking the structure of the digest algorithm identifier, allowing an attacker to craft a malformed PKCS#1 encoded message that steals padding bytes and leaves unchecked portions that can be used to forge a signature. This is a variant of Bleichenbacher's RSA signature forgery attack based on implementation error. The attack requires that the target system uses a low public exponent (typically e=3 or e=65537 with short key lengths) and is reachable over the network. An attacker can forge signatures on any message without knowledge of the private key, compromising the integrity of signed data. The vulnerability was patched in node-forge version 1.3.0.

Affected products

  • Digital Bazaar node-forge < 1.3.0

Timeline

  • 2022-03-18: disclosed
  • 2022-03-18: patched: Version 1.3.0 released

References

Related threats