Skip to content
Heist/ feed
Back to feed
HighFix available

nodejs — security advisory

Type: advisorySources: OSVAdvisory ID: ALPINE-CVE-2021-37713

The npm package "tar" (aka node-tar) before versions 4.4.18, 5.0.10, and 6.1.9 has an arbitrary file creation/overwrite and arbitrary code execution vulnerability. node-tar aims to guarantee that any file whose location would be outside of the extraction target directory is not extracted. This is, in part, accomplished by sanitizing absolute paths of entries within the archive, skipping archive entries that contain `..` path portions, and resolving the sanitized paths against the extraction target directory. This logic was insufficient on Windows systems when extracting tar files that contained a path that was not an absolute path, but specified a drive letter different from the extraction target, such as `C:some\path`. If the drive letter does not match the extraction target, for example `D:\extraction\dir`, then the result of `path.resolve(extractionDirectory, entryPath)` would resolve against the current working directory on the `C:` drive, rather than the extraction target directory. Additionally, a `..` portion of the path could occur immediately after the drive letter, such as `C:../foo`, and was not properly sanitized by the logic that checked for `..` within the normalized and split portions of the path. This only affects users of `node-tar` on Windows systems. These issues were addressed in releases 4.4.18, 5.0.10 and 6.1.9. The v3 branch of node-tar has been deprecated and did not receive patches for these issues. If you are still using a v3 release we recommend you

Products
nodejs
Affected versions
Not specified
Fixed versions
12.22.6-r0, 14.17.6-r0
CVEs
CVE-2021-37713
Confirmed fixed CVEs
Not specified
Updated in this feed
31 Oct 2026, 22:06 UTC · Revision 1

Source evidence

ALPINE-CVE-2021-37713

core-osv · Original source

Published 31 Aug 2021, 17:15 UTC

The npm package "tar" (aka node-tar) before versions 4.4.18, 5.0.10, and 6.1.9 has an arbitrary file creation/overwrite and arbitrary code execution vulnerability. node-tar aims to guarantee that any file whose location would be outside of the extraction target directory is not extracted. This is, in part, accomplished by sanitizing absolute paths of entries within the archive, skipping archive entries that contain `..` path portions, and resolving the sanitized paths against the extraction target directory. This logic was insufficient on Windows systems when extracting tar files that contained a path that was not an absolute path, but specified a drive letter different from the extraction target, such as `C:some\path`. If the drive letter does not match the extraction target, for example `D:\extraction\dir`, then the result of `path.resolve(extractionDirectory, entryPath)` would resolve against the current working directory on the `C:` drive, rather than the extraction target directory. Additionally, a `..` portion of the path could occur immediately after the drive letter, such as `C:../foo`, and was not properly sanitized by the logic that checked for `..` within the normalized and split portions of the path. This only affects users of `node-tar` on Windows systems. These issues were addressed in releases 4.4.18, 5.0.10 and 6.1.9. The v3 branch of node-tar has been deprecated and did not receive patches for these issues. If you are still using a v3 release we recommend you

osv:ALPINE-CVE-2021-37713

nodejs

Fixed versions: 12.22.6-r0

nodejs

Fixed versions: 12.22.6-r0

nodejs

Fixed versions: 14.17.6-r0

nodejs

Fixed versions: 14.17.6-r0

nodejs

Fixed versions: 14.17.6-r0

nodejs

Fixed versions: 14.17.6-r0

nodejs

Fixed versions: 14.17.6-r0

nodejs

Fixed versions: 14.17.6-r0

nodejs

Fixed versions: 14.17.6-r0

nodejs

Fixed versions: 14.17.6-r0

nodejs

Fixed versions: 14.17.6-r0

nodejs

Fixed versions: 14.17.6-r0

nodejs

Fixed versions: 14.17.6-r0

nodejs

Fixed versions: 14.17.6-r0

Complete source record
{
  "id": "3f3b27226d7aabf283a06e1c81dea1ee2813a0bdc3c452432c5f2cb13ee214bd",
  "url": "https://osv.dev/vulnerability/ALPINE-CVE-2021-37713",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "ALPINE-CVE-2021-37713",
    "summary": "The npm package \"tar\" (aka node-tar) before versions 4.4.18, 5.0.10, and 6.1.9 has an arbitrary file creation/overwrite and arbitrary code execution vulnerability. node-tar aims to guarantee that any file whose location would be outside of the extraction target directory is not extracted. This is, in part, accomplished by sanitizing absolute paths of entries within the archive, skipping archive entries that contain `..` path portions, and resolving the sanitized paths against the extraction target directory. This logic was insufficient on Windows systems when extracting tar files that contained a path that was not an absolute path, but specified a drive letter different from the extraction target, such as `C:some\\path`. If the drive letter does not match the extraction target, for example `D:\\extraction\\dir`, then the result of `path.resolve(extractionDirectory, entryPath)` would resolve against the current working directory on the `C:` drive, rather than the extraction target directory. Additionally, a `..` portion of the path could occur immediately after the drive letter, such as `C:../foo`, and was not properly sanitized by the logic that checked for `..` within the normalized and split portions of the path. This only affects users of `node-tar` on Windows systems. These issues were addressed in releases 4.4.18, 5.0.10 and 6.1.9. The v3 branch of node-tar has been deprecated and did not receive patches for these issues. If you are still using a v3 release we recommend you",
    "evidence": "osv:ALPINE-CVE-2021-37713",
    "products": [
      {
        "name": {
          "value": "nodejs",
          "evidence": "/affected/0/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "12.22.6-r0",
            "evidence": "/affected/0/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "nodejs",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "12.22.6-r0",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "nodejs",
          "evidence": "/affected/2/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "14.17.6-r0",
            "evidence": "/affected/2/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "nodejs",
          "evidence": "/affected/3/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "14.17.6-r0",
            "evidence": "/affected/3/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "nodejs",
          "evidence": "/affected/4/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "14.17.6-r0",
            "evidence": "/affected/4/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "nodejs",
          "evidence": "/affected/5/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "14.17.6-r0",
            "evidence": "/affected/5/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "nodejs",
          "evidence": "/affected/6/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "14.17.6-r0",
            "evidence": "/affected/6/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "nodejs",
          "evidence": "/affected/7/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "14.17.6-r0",
            "evidence": "/affected/7/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "nodejs",
          "evidence": "/affected/8/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "14.17.6-r0",
            "evidence": "/affected/8/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "nodejs",
          "evidence": "/affected/9/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "14.17.6-r0",
            "evidence": "/affected/9/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "nodejs",
          "evidence": "/affected/10/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "14.17.6-r0",
            "evidence": "/affected/10/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "nodejs",
          "evidence": "/affected/11/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "14.17.6-r0",
            "evidence": "/affected/11/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "nodejs",
          "evidence": "/affected/12/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "14.17.6-r0",
            "evidence": "/affected/12/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "nodejs",
          "evidence": "/affected/13/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "14.17.6-r0",
            "evidence": "/affected/13/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "high",
    "structured": {
      "id": "ALPINE-CVE-2021-37713",
      "aliases": [
        "ALPINE-CVE-2021-37713"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "12.22.6-r0"
                }
              ]
            }
          ],
          "package": {
            "name": "nodejs",
            "purl": "pkg:apk/alpine/nodejs?arch=source",
            "ecosystem": "Alpine:v3.11"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-37713.json"
          },
          "ecosystem_specific": {}
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "12.22.6-r0"
                }
              ]
            }
          ],
          "package": {
            "name": "nodejs",
            "purl": "pkg:apk/alpine/nodejs?arch=source",
            "ecosystem": "Alpine:v3.12"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-37713.json"
          },
          "ecosystem_specific": {}
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "14.17.6-r0"
                }
              ]
            }
          ],
          "package": {
            "name": "nodejs",
            "purl": "pkg:apk/alpine/nodejs?arch=source",
            "ecosystem": "Alpine:v3.13"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-37713.json"
          },
          "ecosystem_specific": {}
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "14.17.6-r0"
                }
              ]
            }
          ],
          "package": {
            "name": "nodejs",
            "purl": "pkg:apk/alpine/nodejs?arch=source",
            "ecosystem": "Alpine:v3.14"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-37713.json"
          },
          "ecosystem_specific": {}
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "14.17.6-r0"
                }
              ]
            }
          ],
          "package": {
            "name": "nodejs",
            "purl": "pkg:apk/alpine/nodejs?arch=source",
            "ecosystem": "Alpine:v3.15"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-37713.json"
          },
          "ecosystem_specific": {}
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "14.17.6-r0"
                }
              ]
            }
          ],
          "package": {
            "name": "nodejs",
            "purl": "pkg:apk/alpine/nodejs?arch=source",
            "ecosystem": "Alpine:v3.16"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-37713.json"
          },
          "ecosystem_specific": {}
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "14.17.6-r0"
                }
              ]
            }
          ],
          "package": {
            "name": "nodejs",
            "purl": "pkg:apk/alpine/nodejs?arch=source",
            "ecosystem": "Alpine:v3.17"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-37713.json"
          },
          "ecosystem_specific": {}
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "14.17.6-r0"
                }
              ]
            }
          ],
          "package": {
            "name": "nodejs",
            "purl": "pkg:apk/alpine/nodejs?arch=source",
            "ecosystem": "Alpine:v3.18"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-37713.json"
          },
          "ecosystem_specific": {}
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "14.17.6-r0"
                }
              ]
            }
          ],
          "package": {
            "name": "nodejs",
            "purl": "pkg:apk/alpine/nodejs?arch=source",
            "ecosystem": "Alpine:v3.19"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-37713.json"
          },
          "ecosystem_specific": {}
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "14.17.6-r0"
                }
              ]
            }
          ],
          "package": {
            "name": "nodejs",
            "purl": "pkg:apk/alpine/nodejs?arch=source",
            "ecosystem": "Alpine:v3.20"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-37713.json"
          },
          "ecosystem_specific": {}
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "14.17.6-r0"
                }
              ]
            }
          ],
          "package": {
            "name": "nodejs",
            "purl": "pkg:apk/alpine/nodejs?arch=source",
            "ecosystem": "Alpine:v3.21"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-37713.json"
          },
          "ecosystem_specific": {}
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "14.17.6-r0"
                }
              ]
            }
          ],
          "package": {
            "name": "nodejs",
            "purl": "pkg:apk/alpine/nodejs?arch=source",
            "ecosystem": "Alpine:v3.22"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-37713.json"
          },
          "ecosystem_specific": {}
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "14.17.6-r0"
                }
              ]
            }
          ],
          "package": {
            "name": "nodejs",
            "purl": "pkg:apk/alpine/nodejs?arch=source",
            "ecosystem": "Alpine:v3.23"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-37713.json"
          },
          "ecosystem_specific": {}
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "14.17.6-r0"
                }
              ]
            }
          ],
          "package": {
            "name": "nodejs",
            "purl": "pkg:apk/alpine/nodejs?arch=source",
            "ecosystem": "Alpine:v3.24"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-37713.json"
          },
          "ecosystem_specific": {}
        }
      ],
      "modified": "2026-10-23T17:17:56.204750672Z",
      "provider": "osv",
      "upstream": [
        "CVE-2021-37713"
      ],
      "references": [
        "https://security.alpinelinux.org/vuln/CVE-2021-37713"
      ]
    },
    "related_cves": [
      {
        "value": "CVE-2021-37713",
        "evidence": "/upstream"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 415517,
  "published_at": "2021-08-31T17:15:08.087+00:00"
}