CVE-2020-15168
MEDIUM 5.3CVSS 3.1The `size` option isn't honored after following a redirect in node-fetch
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.
- Published
- 10 Sep 2020
- Last modified
- 8 Jul 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Modified
- Weakness
- CWE-20CWE-770
- Also known as
- GHSA-w7rc-rwvf-8q5r
- Sources
- NVDJSONOSV GHSA-w7rc-rwvf-8q5rJSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | MEDIUM 5.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L |
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | LOW 2.6 | CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:N/I:N/A:L |
| OSV | GitHub | CVSS 3.1 | LOW 2.6 | CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:N/I:N/A:L |
| NVD | nvd@nist.gov (Primary) | CVSS 2.0 | MEDIUM 5.0 | AV:N/AC:L/Au:N/C:N/I:N/A:P |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | node-fetch_project | node-fetchcpe:2.3:a:node-fetch_project:node-fetch:*:*:*:*:*:node.js:*:* |
< 2.6.1 | 2.6.1 |
| NVD | node-fetch_project | node-fetchcpe:2.3:a:node-fetch_project:node-fetch:3.0.0:beta1:*:*:*:node.js:*:* |
= 3.0.0 | |
| NVD | node-fetch_project | node-fetchcpe:2.3:a:node-fetch_project:node-fetch:3.0.0:beta5:*:*:*:node.js:*:* |
= 3.0.0 | |
| NVD | node-fetch_project | node-fetchcpe:2.3:a:node-fetch_project:node-fetch:3.0.0:beta6:*:*:*:node.js:*:* |
= 3.0.0 | |
| NVD | node-fetch_project | node-fetchcpe:2.3:a:node-fetch_project:node-fetch:3.0.0:beta7:*:*:*:node.js:*:* |
= 3.0.0 | |
| NVD | node-fetch_project | node-fetchcpe:2.3:a:node-fetch_project:node-fetch:3.0.0:beta8:*:*:*:node.js:*:* |
= 3.0.0 | |
| OSV | npm | node-fetch | >= 2.0.0, < 2.6.1 | 2.6.1 |
| OSV | npm | node-fetch | >= 3.0.0-beta.1, < 3.0.0-beta.9 | 3.0.0-beta.9 |
References
- https://github.com/node-fetch/node-fetch/security/advisories/GHSA-w7rc-rwvf-8q5r · Third Party Advisory, WEB
- https://www.npmjs.com/package/node-fetch · Product, Third Party Advisory
- https://nvd.nist.gov/vuln/detail/CVE-2020-15168 · ADVISORY
- https://github.com/node-fetch/node-fetch/commit/2358a6c2563d1730a0cdaccc197c611949f6a334 · WEB
- https://github.com/node-fetch/node-fetch/commit/eaff0094c4dfdd5b78711a8c4f1b61e33d282072 · WEB
- https://github.com/node-fetch/node-fetch · PACKAGE
History
- 25 Nov 2026 20:32 UTC · NVD: first stored (published 10 Sep 2020)
- 25 Nov 2026 20:11 UTC · OSV: first stored (published 10 Sep 2020)