Prototype Pollution Vulnerability in node-forge Package

node-node-forge Updated 02 Oct 2025

Summary

01/09/2020
N/A
Yes i
High
7.3

CVE-2020-7720: The package node-forge before 0.10.0 is vulnerable to Prototype Pollution via the util.setPath function. Affects node-node-forge across 2 version ranges.

< 0.10.0~dfsg-1 < 8018c3ea6f8e75d2df1b9ce4ec9c536db3db37e6

Fixed in 0.10.0~dfsg-1. 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 popular JavaScript library that provides tools for cryptography and secure communications. It is widely used in web applications for tasks such as generating certificates, encrypting data, and creating secure connections. However, prior to version 0.10.0, node-forge was susceptible to a prototype pollution vulnerability that could allow attackers to manipulate object prototypes, potentially leading to unauthorized access or data corruption.

Vulnerability Detail

The vulnerability, identified as CVE-2020-7720, originates from the util.setPath function in node-forge versions before 0.10.0. This function allows for prototype pollution, where an attacker can modify the prototype of an object, leading to unexpected behavior in the application. The ramifications of this vulnerability can include data leakage, unauthorized access to sensitive information, and the ability to execute arbitrary code, making it critical for developers to address this issue promptly.

How To Fix

Minimum fixed version

0.10.0~dfsg-1

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

If immediate upgrading is not feasible, consider implementing input validation to sanitize any user inputs that may be passed to the util.setPath function. This can help prevent malicious data from being processed. However, this is not a complete solution and upgrading is strongly recommended.

Conclusion

The prototype pollution vulnerability in the node-forge package poses significant risks to applications that utilize this library. It is crucial for developers to upgrade to version 0.10.0 or later to mitigate these risks. Additionally, using tools like Vulert can help monitor and alert for vulnerabilities in real-time, ensuring the security of your software.

See every vulnerability recorded for node-node-forge →

Share this vulnerability

FAQ

Prototype pollution is a security vulnerability that allows an attacker to modify an object's prototype, potentially leading to unexpected behavior and security issues in an application.

You can use Vulert's playground to check if your application is affected by this vulnerability. Simply upload your package-lock.json file to receive real-time alerts for open-source vulnerabilities.

Failing to fix this vulnerability can lead to unauthorized access, data corruption, and potential exploitation of your application by attackers.

Yes, you should upgrade to version 0.10.0 or later of node-forge to eliminate the vulnerability.

Yes, you can use Vulert's playground without signing up to check for vulnerabilities in your application.

Related vulnerabilities

Recent vulnerabilities recorded for node-node-forge.

How To Fix

Minimum fixed version

0.10.0~dfsg-1

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