CVE-2022-0235: node-fetch - Exposure of Sensitive Information to an Unauthorized Actor

node-fetch Updated 02 Oct 2025

Summary

21/01/2022
Yes i
High
8.8

CVE-2022-0235: node-fetch forwards secure headers to untrusted sites. Affects node-fetch across 2 version ranges.

< 2.6.7 >= 3.0.0, < 3.1.1

Fixed in 2.6.7 or 3.1.1, depending on the release line you run. How to fix ↓

Also tracked for

The same CVE-2022-0235 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 Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

node-fetch is an npm package that provides a lightweight and flexible module for making HTTP requests in Node.js. It is widely used in various applications and frameworks for fetching data from remote servers. However, versions 0.0.0 to 2.6.7 and 3.0.0 to 3.1.1 of node-fetch are vulnerable to Exposure of Sensitive Information to an Unauthorized Actor.

Vulnerability Detail

The vulnerability in node-fetch allows an unauthorized actor to access sensitive information. This could lead to the exposure of sensitive data, such as API keys, authentication tokens, or user credentials. The vulnerability arises due to improper handling of sensitive information during the HTTP request process. An attacker can exploit this vulnerability by intercepting network traffic or by gaining unauthorized access to the server where the application is running. The impact of this vulnerability can be severe, potentially leading to unauthorized access, data breaches, or other malicious activities.

How To Fix

Latest published version: 3.3.2 as of 22 Oct 2026

npm install node-fetch@3.3.2

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

If you can't move to the latest

The minimum fixed version depends on the release line you run.

  • < 2.6.7 2.6.7
    npm install node-fetch@2.6.7
  • >= 3.0.0, < 3.1.1 3.1.1
    npm install node-fetch@3.1.1

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Workaround

As a temporary workaround, it is advised to avoid sending sensitive information using node-fetch until the package is updated. Instead, consider using an alternative HTTP request library that is not affected by this vulnerability.

Conclusion

The vulnerability in node-fetch exposes sensitive information to unauthorized actors, potentially leading to severe consequences such as unauthorized access or data breaches. It is crucial to upgrade to the latest version of node-fetch to mitigate this vulnerability. For further support on vulnerability remediation, contact DevNack.com.

See every vulnerability recorded for node-fetch →

Share this vulnerability

FAQ

node-fetch is an npm package that provides a lightweight and flexible module for making HTTP requests in Node.js.

The vulnerability allows an unauthorized actor to access sensitive information, potentially leading to unauthorized access, data breaches, or other malicious activities.

To fix this vulnerability, upgrade to the latest version of node-fetch by running 'npm install node-fetch@latest' in the terminal.

Versions 0.0.0 to 2.6.7 and 3.0.0 to 3.1.1 of node-fetch are affected by this vulnerability.

As a temporary workaround, avoid sending sensitive information using node-fetch until the package is updated. Consider using an alternative HTTP request library.

Related vulnerabilities

Recent vulnerabilities recorded for node-fetch.

How To Fix

Latest published version: 3.3.2 as of 22 Oct 2026

npm install node-fetch@3.3.2

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

If you can't move to the latest

The minimum fixed version depends on the release line you run.

  • < 2.6.7 2.6.7
    npm install node-fetch@2.6.7
  • >= 3.0.0, < 3.1.1 3.1.1
    npm install node-fetch@3.1.1

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. 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