Node FetchApplication · Node Fetch Project

CVE-2020-15168

MEDIUM · 5.3 CVSS v3.1 Published 2020-09-10
Fix available
A fix is available. Upgrade to 2.6.1 or later.
See remediation →
62/100
Remediation priority · Elevated
Remotely reachable No privileges Zero-click

Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.

NVD · unedited
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.

Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.

dbcve analysis · moderate confidence

node-fetch versions before 2.6.1 and 3.0.0-beta.9 failed to enforce the size limit option after following HTTP redirects, allowing unlimited data downloads when a redirect occurred, potentially causing resource exhaustion or unexpected costs.

MitigationUpgrade node-fetch to version 2.6.1 or later (or 3.0.0-beta.9+) to enforce size limits correctly across redirects, and audit existing code that relies on size limits for additional protection.

Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.

Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.

NVD · CPE data
Node FetchApplication
Affected:< 2.6.1= 3.0.0

CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.

From the vector
Attack vector
Network
Complexity
Low
Privileges
None
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
Low

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

Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.

dbcve checks

Work through these to decide whether this CVE applies to you.

  1. Identify node-fetch version
    Run 'npm list node-fetch' or check package.json dependencies to see the installed version of node-fetch
    Affected if Version is below 2.6.1 or exactly 3.0.0 (including 3.0.0-beta.1 through 3.0.0-beta.8)
  2. Check for size limit usage
    Search code for 'max' or 'size' option passed to fetch calls (e.g., fetch(url, { max: ... }) or fetch(url, { size: ... }))
    Affected if Code uses max/size limits in fetch options and the version is vulnerable
  3. Check redirect behavior
    Search code for fetch calls with 'follow' option set (default is 1 redirect, but may be higher) or check if external APIs being called are known to redirect
    Affected if Fetch calls follow HTTP redirects (follow option > 0) and size limit is configured
  4. Verify redirect + size limit combination
    Code inspection: find any fetch calls that both follow redirects (follow > 0) AND specify a size/max limit option
    Affected if Both redirect following and size limiting are used together in the same fetch call on a vulnerable version

You are affected if you use node-fetch versions below 2.6.1 (or exactly 3.0.0) and your code both follows HTTP redirects and relies on a size limit option to bound response sizes.

Generated from the published advisory. Verify against your own configuration.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.

From vendor data
Upgrade available Upgrade to 2.6.1 or later
Fixed in 2.6.1
Interim mitigation

Upgrade node-fetch to version 2.6.1 or later (or 3.0.0-beta.9+) to enforce size limits correctly across redirects, and audit existing code that relies on size limits for additional protection.

Fix this in Node Fetch Scoped from the published advisory
  • Consultation4.0 h
  • Implementation6.0 h
  • Testing4.0 h
  • Review / QA2.0 h
16.0 hours of engineering $2,840
Get the upgrade done

An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $4,544.

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2020-15168 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.

References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.

Primary sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2020-15168 in production — separate from our analysis above.

No notes yet

Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.

What this is

A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.

What belongs here
  • Verified mitigations, workarounds, and config changes
  • Version or environment caveats, and links to real fixes
  • No weaponised exploit code, or anything meant to cause harm
  • No spam, self-promotion, credentials, or personal data