CVE-2022-24771: 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-24771: 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-24771 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 Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

The node-forge package is an implementation of cryptographic algorithms and utilities for JavaScript. It provides a set of APIs for working with RSA keys, certificates, and other cryptographic operations. This vulnerability affects versions prior to 1.3.0 of the node-forge package. The vulnerability lies in the RSA PKCS#1 v1.5 signature verification code, which is lenient in checking the digest algorithm structure. This leniency allows an attacker to craft a structure that steals padding bytes and utilizes an unchecked portion of the PKCS#1 encoded message to forge a signature, particularly when a low public exponent is being used.

Vulnerability Detail

The vulnerability in node-forge allows an attacker to forge a signature by exploiting the lenient verification of the digest algorithm structure. By crafting a specific structure, the attacker can steal padding bytes and manipulate the PKCS#1 encoded message to create a forged signature. This vulnerability can be particularly impactful when a low public exponent is used. The consequences of successful exploitation include the ability to bypass signature verification, leading to potential unauthorized access, data tampering, or impersonation attacks.

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 are no known workarounds for this vulnerability. It is essential to upgrade to the patched version of the node-forge package to mitigate the risk.

Conclusion

The vulnerability in node-forge allows an attacker to forge signatures by exploiting lenient verification of the digest algorithm structure. To mitigate this risk, it is crucial to upgrade to version 1.3.0 or later of the node-forge package. This version includes the necessary patches to address the vulnerability. If you have any further questions or need assistance with vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for node-forge →

Share this vulnerability

FAQ

The vulnerability allows an attacker to forge a signature, potentially leading to unauthorized access, data tampering, or impersonation attacks.

Versions prior to 1.3.0 of the node-forge package are affected.

To fix this vulnerability, upgrade to version 1.3.0 or later of the node-forge package.

No, there are no known workarounds for this vulnerability.

For more information, you can refer to the advisory in the forge GitHub repository or contact the forge team directly.

Related vulnerabilities

Recent vulnerabilities recorded for node-forge.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

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