Insecure RSA PKCS#1 v1.5 Signature Verification in node-forge

node-node-forge Updated 02 Oct 2025

Summary

18/03/2022
N/A
Yes i
Medium
5.3

CVE-2022-24773: Forge (also called node-forge) is a native implementation of Transport Layer Security in JavaScript. Affects node-node-forge across 3 version ranges.

< 0.10.0~dfsg-3+deb11u1 < 3f0b49a0573ef1bb7af7f5673c0cfebf00424df1 < bb822c02df0b61211836472e29b9790cc541cdb2

Fixed in 0.10.0~dfsg-3+deb11u1. How to fix ↓

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

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

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

node-forge is a native JavaScript implementation of Transport Layer Security (TLS) and various cryptographic functions. It is widely used for secure communications and data encryption in web applications. The library provides functionalities such as certificate generation, encryption, and decryption. However, prior to version 1.3.0, it contained a critical vulnerability in its RSA PKCS#1 v1.5 signature verification process, which could allow attackers to exploit improperly structured signatures.

Vulnerability Detail

The vulnerability arises from the RSA PKCS#1 v1.5 signature verification code in node-forge, which fails to adequately check the ASN.1 structure of the DigestInfo. This oversight can lead to successful verification of signatures that, while having a valid digest, contain invalid structures. The implications of this vulnerability are significant, as it could allow an attacker to forge signatures and potentially bypass security measures, leading to unauthorized access or data manipulation.

How To Fix

Minimum fixed version

0.10.0~dfsg-3+deb11u1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade node-node-forge

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

Workaround

Currently, there are no known workarounds for this vulnerability other than upgrading to the fixed version.

Conclusion

The vulnerability in node-forge's RSA PKCS#1 v1.5 signature verification poses a significant risk, allowing for potential signature forgery. Users are strongly advised to upgrade to version 1.3.0 or later to ensure the security of their applications. Regular monitoring for vulnerabilities using tools like Vulert can help maintain the integrity of your software.

See every vulnerability recorded for node-node-forge →

Share this vulnerability

FAQ

The CVSS score of this vulnerability is 5.3, indicating a moderate level of risk.

You can use Vulert to monitor and alert for open-source vulnerabilities in your software. Simply upload your package-lock.json file to the Vulert playground at Vulert Scanner to check for vulnerabilities.

If exploited, this vulnerability could allow attackers to forge signatures, leading to unauthorized access or manipulation of sensitive data.

Yes, upgrading to node-forge version 1.3.0 or later will resolve this vulnerability.

While there are no workarounds, it is crucial to prioritize upgrading to the fixed version as soon as possible to mitigate the risk.

Related vulnerabilities

Recent vulnerabilities recorded for node-node-forge.

How To Fix

Minimum fixed version

0.10.0~dfsg-3+deb11u1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade node-node-forge

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