Search covers the description text, product and vendor names and weakness types (also partial words).

CVE-2021-37701
npmjs tar

Score8.6 High
CVSS 3.1
Exploit probability (EPSS)1.8%
within the next 30 days
CategoryAccess control & privilege
Published31 August 2021
Last modified: 17 June 2026

In short

This vulnerability can be exploited with local access to the device, without logging in, if a user clicks a link, opens a file or similar.

A successful attack has high impact: reading confidential data, modifying data, crashing the system or making it unavailable.

The impact can spread beyond the vulnerable component.

Weakness type: Path traversal.

✨ AI commentary

After a short ad, a plain-language commentary on this vulnerability is shown. AI can make mistakes; base decisions on the official sources.

Official description

The npm package "tar" (aka node-tar) before versions 4.4.16, 5.0.8, and 6.1.7 has an arbitrary file creation/overwrite and arbitrary code execution vulnerability. node-tar aims to guarantee that any file whose location would be modified by a symbolic link is not extracted. This is, in part, achieved by ensuring that extracted directories are not symlinks. Additionally, in order to prevent unnecessary stat calls to determine whether a given path is a directory, paths are cached when directories are created. This logic was insufficient when extracting tar files that contained both a directory and a symlink with the same name as the directory, where the symlink and directory names in the archive entry used backslashes as a path separator on posix systems. The cache checking logic used both `\` and `/` characters as path separators, however `\` is a valid filename character on posix systems. By first creating a directory, and then replacing that directory with a symlink, it was thus possible to bypass node-tar symlink checks on directories, essentially allowing an untrusted tar file to symlink into an arbitrary location and subsequently extracting arbitrary files into that location, thus allowing arbitrary file creation and overwrite. Additionally, a similar confusion could arise on case-insensitive filesystems. If a tar archive contained a directory at `FOO`, followed by a symbolic link named `foo`, then on case-insensitive file systems, the creation of the symbolic link would remove the directory from the filesystem, but _not_ from the internal directory cache, as it would not be treated as a cache hit. A subsequent file entry within the `FOO` directory would then be placed in the target of the symbolic link, thinking that the directory had already been created. These issues were addressed in releases 4.4.16, 5.0.8 and 6.1.7. 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 update to a more recent version of node-tar. If this is not possible, a workaround is available in the referenced GHSA-9r2w-394v-53qc.

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

Weakness: CWE-22 – Path traversal, CWE-59

Affected products

VendorProductVersions
npmjstar<4.4.16
npmjstar>=5.0.0 <5.0.8
npmjstar>=6.0.0 <6.1.7
debiandebian linux10.0
debiandebian linux11.0
oraclegraalvm20.3.3
oraclegraalvm21.2.0
siemenssinec infrastructure network services<1.0.1.1

Sources

Latest in the same category

  • CVE-2026-140257 Medium 5.5
    A vulnerability was determined in Campcodes Online Hotel Reservation System 1.0. This impacts an unknown function of the file admin/edit_query_room.php of the component Admin Panel. This manipulation of the argument…
    Access control & privilege · 1 December 2026
  • CVE-2026-140256 Medium 5.5
    A vulnerability was found in Pharmacy POS Pharmacy System 1.0. This affects the function pq of the file main/deletecustomer.php. The manipulation of the argument ID results in missing authorization. It is possible to…
    Access control & privilege · 1 December 2026
  • CVE-2026-110478 High 7.7
    In Teltonika Networks RUTOS devices a vulnerability exists that may allow a remote attacker to achieve root-level code execution via crafted SMS messages. This issue affects RUT: from 7.13.0 through 7.26.0; RUTX: from…
    Access control & privilege · 1 December 2026
  • CVE-2026-140132 Low 2
    A vulnerability was found in engigu baihu-panel up to 1.6.2. Affected is the function restoreScriptsDir of the file internal/services/backup_service.go of the component backup-restore. Performing a manipulation results…
    Access control & privilege · 1 December 2026
  • CVE-2026-140131 Low 2.1
    A vulnerability has been found in marcpope borgbackupserver up to 2.99.7. This impacts the function restoreOrphan of the file src/Controllers/RepositoryController.php. Such manipulation of the argument repo_name leads…
    Access control & privilege · 1 December 2026
  • CVE-2026-140130 Low 2.1
    A flaw has been found in jobic10 student-management-using-django up to 066dcaeffc52fe52e9279d93e2a00c15909544ae. This affects the function get_students/save_attendance/get_student_attendance/update_attendance of the…
    Access control & privilege · 1 December 2026