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 (1.69%). Schedule for your next planned update.

Does your project use an affected node-fetch version?

Paste your package-lock.json to check it for CVE-2020-15168 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.

Check my package-lock.json

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
  • Contact one of the core maintainers.

Advisory Timeline

  • First published September 10, 2020 (2268 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, scan your dependencies again to confirm the vulnerability is resolved.

Affected Packages (2)

Affects 1 ecosystem: npm (1).

PackageFixed In
node-fetch npm · Affected: All versions2.6.1
node-fetch npm · Affected: 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 1.7% 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 the impact is minor.

EPSS Score (30-day exploit probability)
1.69%
EPSS percentile: 77.5

This places it in the top quartile of EPSS-scored vulnerabilities — 77.5% of tracked vulnerabilities score at or below it, so it is more likely to be exploited than most of the tracked corpus.

Also Known As

GHSA-w7rc-rwvf-8q5r

Related CVEs

  • CVE-2022-0235
    HIGH

    node-fetch forwards secure headers to untrusted sites

  • CVE-2026-94486
    LOW

    Next.js has information disclosure in development server's Model Context Protocol endpoint

  • CVE-2026-77063
    LOW

    multer vulnerable to file size limit bypass via async fileFilter race condition

Check your own dependencies

Free, with no signup for up to 10 packages.

Check my package-lock.json