Loading...
Skip to main content

CVE-2020-15168 — Vulnerability in node-fetch — CVE Details

LOW

The `size` option isn't honored after following a redirect in node-fetch

Published September 10, 2020Updated July 8, 2026Source: osv

What Should I Do?

Address in Next Maintenance Window

Low exploitation probability (0.11%). Schedule for your next planned update.

Summary

### Impact Node Fetch 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. ### Patches We released patched versions for both stable and beta channels: - For `v2`: 2.6.1 - For `v3`: 3.0.0-beta.9 ### Workarounds None, it is strongly recommended to update as soon as possible. ### For more information If you have any questions or comments about this advisory: * Open an issue in [node-fetch](https://github.com/node-fetch/node-fetch/issues/new?assignees=&labels=question&template=support-or-usage.md&title=Question%3A+) * Contact one of the core maintainers.

Advisory Timeline

  • First published September 10, 2020 (2223 days ago).
  • Last revised July 8, 2026 — 2127 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

npm
Update node-fetch to 2.6.1 or later
npm install node-fetch@2.6.1
npm
Update node-fetch to 3.0.0-beta.9 or later
npm install node-fetch@3.0.0-beta.9

After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.

Affected Packages (2)

Affects 1 ecosystem: npm (1).

PackageEcosystemAffectedFixed In
node-fetch
npm
All versions2.6.1
node-fetch
npm
All versions3.0.0-beta.9

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

  • CWE-20
    Improper Input ValidationMITRE
  • CWE-770
    Allocation of Resources Without LimitsMITRE

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 2.6 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
High
Privileges Required
Low
User Interaction
Required
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
Low

CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:N/I:N/A:L

Frequently Asked Questions

What is CVE-2020-15168?
The `size` option isn't honored after following a redirect in node-fetch This vulnerability has been assigned a severity rating of LOW (CVSS score: 2.6/10).
How do I check if my project is affected by CVE-2020-15168?
CVE-2020-15168 affects node-fetch. It has a 0.1% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2020-15168 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
2.6

Exploitation is difficult or impact is minor. Address in your next planned update.

EPSS Score (30-day exploit probability)
0.11%
Higher than 30% of vulnerabilities

This is a below-median EPSS score — only 30.1% of tracked vulnerabilities score at or below it, so most tracked vulnerabilities are considered more likely to be exploited than this one.

Also Known As

GHSA-w7rc-rwvf-8q5r

Related CVEs

Check if you're affected

Scan your dependencies to see if this vulnerability affects your projects.

Scan Your Dependencies