CVE-2022-2596
Medium · 5.9CVSS
5.9
EPSS
1.3%
Published
Aug 1, 2022
CISA due date
—
Cloudanix analysis
A bug in a widely used code library for making web requests can let attackers slow down or crash the applications that rely on it.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- Moderate
- Impact
- Denial Of Service
- Component
- Library
- Class
- Denial of service
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
The vulnerability stems from an inefficient regular expression in node-fetch that is susceptible to catastrophic backtracking, allowing remote attackers to supply specially crafted input (such as URLs or response data) that consumes excessive CPU resources and results in denial of service.
Why it matters to the business
Applications relying on node-fetch for outbound requests can experience sudden slowdowns or outages, disrupting dependent services and increasing operational costs until the affected processes are restarted or mitigated.
How an attack unfolds
An attacker identifies an application using a vulnerable version of node-fetch, crafts a malicious input designed to trigger exponential regex backtracking (commonly via a crafted URL or header), and sends it through the fetch call to exhaust server CPU without authentication.
How to fix it
Upgrade node-fetch to a fixed version containing commit 28802387292baee467e042e168d92597b5bbbe3d (equivalent to 3.2.10 or later). Pin dependencies to the patched release and re-test all code paths that invoke fetch.
How to confirm the fix worked
Review package.json or lockfiles for node-fetch versions older than the fixed commit; run unit tests with known ReDoS payloads to confirm absence of excessive CPU; monitor process resource usage under load after upgrade.
Typical attack path
- Identify a target application that imports node-fetch for HTTP requests
- Craft a payload containing input that forces catastrophic backtracking in the vulnerable regex
- Deliver the payload through a fetch invocation (URL, redirect, or response handling)
- Observe sustained high CPU usage leading to service degradation or crash
How to detect it
Review application and system logs for sudden spikes in CPU utilization correlated with fetch-related requests; inspect process dumps or performance profiles for regex execution time; search web server access logs for anomalous URL patterns that could trigger backtracking.
What your security team should do
- Immediately audit all projects for use of node-fetch < 3.2.10 and schedule upgrades
- Implement input validation or timeouts around fetch calls as a temporary control
- Add dependency scanning to CI pipelines to block future vulnerable versions
- Monitor for unusual CPU spikes on servers handling outbound HTTP requests
The record
Inefficient Regular Expression Complexity in GitHub repository node-fetch/node-fetch prior to 3.2.10.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| npm | node-fetch | 3.0.0 | 3.2.10 |
| Ubuntu:20.04:LTS | node-fetch | 0 | No fix |
| Ubuntu:22.04:LTS | node-fetch | 0 | No fix |
| Ubuntu:24.04:LTS | node-fetch | 0 | No fix |
| Ubuntu:24.10 | node-fetch | 0 | No fix |
| Ubuntu:25.04 | node-fetch | 0 | No fix |
| Ubuntu:25.10 | node-fetch | 0 | No fix |
| Ubuntu:Pro:18.04:LTS | node-fetch | 0 | No fix |
| Ubuntu:Pro:20.04:LTS | node-fetch | 0 | No fix |
Related vulnerabilities
- CVE-2026-112901 Pillow is a Python imaging library. CWE-1333
- CVE-2026-106454 Twisted is an event-based framework for internet applications, supporting Python 3.6+. CWE-1333
- CVE-2026-77387 geopy is a geocoding library for Python. CWE-1333
- CVE-2026-102990 basic-ftp is an FTP client for Node.js. CWE-1333
- CVE-2026-102473 A flaw was found in dash. CWE-1333
- CVE-2026-102270 PyJWT is a Python implementation of JSON Web Token standards. CWE-1333
- CVE-2026-101906 Axios is a promise-based HTTP client for the browser and Node.js. CWE-1333
- CVE-2026-101903 Axios is a promise-based HTTP client for the browser and Node.js. CWE-1333