CVE-2022-24772: Improper Verification of Cryptographic Signature in node-forge

node-forge Updated 02 Oct 2025

Summary

18/03/2022
Yes i
High
7.5

CVE-2022-24772: Improper Verification of Cryptographic Signature in node-forge. Affects node-forge versions < 1.3.0. Fixed in 1.3.0. How to fix ↓

Also tracked for

The same CVE-2022-24772 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The package under scrutiny is node-forge, an open-source cryptographic library for JavaScript. It provides a comprehensive set of tools for creating and manipulating cryptographic objects, including RSA key generation, encryption, and decryption. The vulnerability in node-forge arises from improper verification of cryptographic signatures using RSA PKCS#1 v1.5. This flaw allows padding bytes to be removed and garbage data added, enabling the forging of signatures when a low public exponent is being used.

Vulnerability Detail

The vulnerability in node-forge stems from a failure to properly check for tailing garbage bytes after decoding a DigestInfo ASN.1 structure during RSA PKCS#1 v1.5 signature verification. This oversight allows an attacker to manipulate the signature by removing padding bytes and adding arbitrary data. The impact of this vulnerability is significant, as it can lead to the forging of signatures when a low public exponent is utilized. This could potentially undermine the integrity and authenticity of cryptographic operations relying on node-forge. The vulnerability has been assigned a CVSS score of 7.5, indicating a high severity level.

How To Fix

Latest published version: 1.4.0 as of 22 Oct 2026

npm install node-forge@1.4.0

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

1.3.0

This is the first release that contains the fix.

npm install node-forge@1.3.0

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

There is no known workaround for this vulnerability. It is essential to update node-forge to the patched version to mitigate the risk of signature forgery.

Conclusion

The vulnerability in node-forge's improper verification of cryptographic signatures poses a significant risk to the integrity and authenticity of cryptographic operations. It is crucial to update the package to version 1.3.0 or later to mitigate this vulnerability. For further support and assistance with vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for node-forge →

Share this vulnerability

FAQ

Node-forge is an open-source cryptographic library for JavaScript that provides various tools for creating and manipulating cryptographic objects.

RSA PKCS#1 v1.5 is a widely used cryptographic standard for RSA encryption and signature schemes.

The vulnerability allows an attacker to forge signatures when a low public exponent is used, compromising the integrity and authenticity of cryptographic operations.

To fix this vulnerability, update node-forge to version 1.3.0 or later using the command: npm install node-forge@1.3.0

No, there is no known workaround. Updating to the patched version is the recommended solution.

Related vulnerabilities

Recent vulnerabilities recorded for node-forge.

How To Fix

Latest published version: 1.4.0 as of 22 Oct 2026

npm install node-forge@1.4.0

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

1.3.0

This is the first release that contains the fix.

npm install node-forge@1.3.0

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback