CVE-2022-24773: Improper Verification of Cryptographic Signature in node-forge
Summary
CVE-2022-24773: 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
- node-node-forge · Debian:11
The same CVE-2022-24773 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.
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.
No signup required · Results in about 60 seconds
Background
The node-forge package is an implementation of cryptographic algorithms and utilities for Node.js. It provides a set of APIs for handling various cryptographic operations, including encryption, decryption, signing, and verification. The package is widely used in Node.js applications for secure communication and data protection. However, a vulnerability has been discovered in the package's RSA PKCS#1 v1.5 signature verification code, which fails to properly check the DigestInfo for a valid ASN.1 structure. This flaw can lead to successful verification of signatures that contain invalid structures but a valid digest.
Vulnerability Detail
The vulnerability in node-forge allows an attacker to bypass signature verification by providing a signature with an invalid structure but a valid digest. This means that an attacker can create a malicious signature that appears valid, leading to potential security breaches and unauthorized access. The impact of this vulnerability can vary depending on the specific implementation and usage of node-forge in an application. However, it has the potential to undermine the integrity and authenticity of cryptographic operations that rely on signature verification.
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 the node-forge package to the patched version as soon as possible.
Conclusion
The vulnerability in node-forge's signature verification code can allow attackers to bypass verification and potentially compromise the integrity and authenticity of cryptographic operations. It is crucial to update the node-forge package to version 1.3.0 or later to mitigate this vulnerability. For further support on vulnerability remediation, you can reach out to DevNack.com.
See every vulnerability recorded for node-forge →
FAQ
Node-forge is a cryptographic library for Node.js that provides APIs for various cryptographic operations such as encryption, decryption, signing, and verification.
The vulnerability allows an attacker to bypass signature verification, potentially leading to security breaches and unauthorized access.
To fix this vulnerability, update the node-forge package to version 1.3.0 or later.
No, there is no known workaround. Updating the package is the recommended solution.
For more information, you can refer to the advisory on the GitHub Advisory Database or contact the package maintainers.
References
Related vulnerabilities
Recent vulnerabilities recorded for node-forge.