Live threats

All CVEs / Node-fetch Project

CVE-2020-15168Node-fetch Project Node-fetch

Medium 5.3 No auth needed

Priority
47
CVSS 3.1
5.3
EPSS
1.7%
probability of exploitation in 30 days · percentile 78
Auth required
No
Published
Sep 10, 2020
Updated
Jun 17, 2026
Category
Application · Cross-platform
Weakness (CWE)
CWE-20, CWE-770
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L

What happens

node-fetch before versions 2.6.1 and 3.0.0-beta.9 did not honor the size option after following a redirect, which means that when a content size was over the limit, a FetchError would never get thrown and the process would end without failure. For most people, this fix will have a little or no impact. However, if you are relying on node-fetch to gate files above a size, the impact could be significant, for example: If you don't double-check the size of the data after fetch() has completed, your JS thread could get tied up doing work on a large file (DoS) and/or cost you money in computing.

Original NVD text.

What to do

  1. Apply the vendor's security update for Node-fetch.
  2. It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.

Affected packages

EcosystemPackageAffected versionsFixed inHow to upgrade
npm node-fetch ≥ 2.0.0 < 2.6.1 2.6.1 npm install node-fetch@2.6.1
npm node-fetch ≥ 3.0.0-beta.1 < 3.0.0-beta.9 3.0.0-beta.9 npm install node-fetch@3.0.0-beta.9

Per OSV / GitHub Advisories (GHSA-w7rc-rwvf-8q5r). Check the version in your lockfile before upgrading.

Affected products (CPE)

VendorProductVersions
node-fetch_projectnode-fetch< 2.6.1
node-fetch_projectnode-fetch3.0.0
node-fetch_projectnode-fetch3.0.0
node-fetch_projectnode-fetch3.0.0
node-fetch_projectnode-fetch3.0.0
node-fetch_projectnode-fetch3.0.0

Official sources

References

Links published by the sources. Open them with care.