CVE-2020-15168Node-fetch Project Node-fetch
Medium 5.3 No auth needed
Follow: this CVE · Node-fetch Project · Node-fetch Project Node-fetch We alert you by email or Slack (account required).
- 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
- 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.
What to do
- Apply the vendor's security update for Node-fetch.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How 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)
| Vendor | Product | Versions |
|---|---|---|
| node-fetch_project | node-fetch | < 2.6.1 |
| node-fetch_project | node-fetch | 3.0.0 |
| node-fetch_project | node-fetch | 3.0.0 |
| node-fetch_project | node-fetch | 3.0.0 |
| node-fetch_project | node-fetch | 3.0.0 |
| node-fetch_project | node-fetch | 3.0.0 |
Official sources
References
Links published by the sources. Open them with care.
- github.com Third Party Advisory
- www.npmjs.com Product Third Party Advisory