Skip to content
Heist/ feed
Back to feed
Medium

Security advisory

Type: advisorySources: OSVCVE: CVE-2020-15168

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.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2020-15168
Confirmed fixed CVEs
Not specified
Updated in this feed
31 Oct 2026, 10:52 UTC · Revision 1

Source evidence

CVE-2020-15168

core-osv · Original source

Published 10 Sept 2020, 19:15 UTC

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.

osv:CVE-2020-15168
Complete source record
{
  "id": "076a99d7b3bbb1999cabde84940a9fc04235943a28040129979065e4877a677c",
  "url": "https://osv.dev/vulnerability/CVE-2020-15168",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "CVE-2020-15168",
    "summary": "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.",
    "evidence": "osv:CVE-2020-15168",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2020-15168",
      "aliases": [
        "CVE-2020-15168",
        "GHSA-w7rc-rwvf-8q5r"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/node-fetch/node-fetch",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "b5e2e41b2b50bf2997720d6125accaf0dd68c0ab"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:node-fetch_project:node-fetch:*:*:*:*:*:node.js:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "2.6.1"
                      }
                    ],
                    "source": "CPE_RANGE"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v2.6.0",
            "v2.5.0",
            "v2.4.1",
            "v2.4.0",
            "v2.3.0",
            "v2.2.1",
            "v2.2.0",
            "v2.1.2",
            "v2.1.1",
            "v2.1.0",
            "v2.0.0",
            "v2.0.0-alpha.9",
            "v2.0.0-alpha.8",
            "v2.0.0-alpha.7",
            "v2.0.0-alpha.6",
            "v2.0.0-alpha.5",
            "v1.6.3",
            "v2.0.0-alpha.3",
            "v2.0.0-alpha.1",
            "v1.6.2",
            "v1.6.1",
            "v1.6.0",
            "v1.5.3",
            "v1.5.2",
            "v1.5.1",
            "v1.5.0",
            "v1.4.1",
            "v1.4.0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2020-15168.json"
          }
        }
      ],
      "modified": "2026-10-20T10:51:52.700929648Z",
      "provider": "osv",
      "references": [
        "https://github.com/node-fetch/node-fetch/security/advisories/GHSA-w7rc-rwvf-8q5r",
        "https://www.npmjs.com/package/node-fetch"
      ],
      "provider_metadata": {
        "unresolved_ranges": [
          {
            "cpes": [
              "cpe:2.3:a:node-fetch_project:node-fetch:3.0.0:beta1:*:*:*:node.js:*:*",
              "cpe:2.3:a:node-fetch_project:node-fetch:3.0.0:beta5:*:*:*:node.js:*:*",
              "cpe:2.3:a:node-fetch_project:node-fetch:3.0.0:beta6:*:*:*:node.js:*:*",
              "cpe:2.3:a:node-fetch_project:node-fetch:3.0.0:beta7:*:*:*:node.js:*:*",
              "cpe:2.3:a:node-fetch_project:node-fetch:3.0.0:beta8:*:*:*:node.js:*:*"
            ],
            "vendor_product": "node-fetch_project:node-fetch",
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "3.0.0-beta1"
                  },
                  {
                    "last_affected": "3.0.0-beta1"
                  },
                  {
                    "introduced": "3.0.0-beta5"
                  },
                  {
                    "last_affected": "3.0.0-beta5"
                  },
                  {
                    "introduced": "3.0.0-beta6"
                  },
                  {
                    "last_affected": "3.0.0-beta6"
                  },
                  {
                    "introduced": "3.0.0-beta7"
                  },
                  {
                    "last_affected": "3.0.0-beta7"
                  },
                  {
                    "introduced": "3.0.0-beta8"
                  },
                  {
                    "last_affected": "3.0.0-beta8"
                  }
                ],
                "source": "CPE_STRING"
              }
            ]
          }
        ]
      }
    },
    "related_cves": [
      {
        "value": "CVE-2020-15168",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 383070,
  "published_at": "2020-09-10T19:15:13.49+00:00"
}