CVE-2021-37701

mediumPriorität · verfolgen · 35EPSS 0.033 · 88. PerzentilDEEURUUS
grimoire priorityP3 · Track
Exploitable?
—
no known exploitation
Likely / severe?
3.29% (88th) EPSS
CVSS 4.4 · medium
Is it mine?
38 products
Prüfe deine Angriffsfläche
Who says so?
8 sources
cnnvd · enisa_euvd · fstec_bdu · cert_bund

EPSS · bewertet 2026-10-27

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.

01

Behebungen

Hersteller-Fix, Mitigation oder Workaround, wie von den Quellen veröffentlicht.

Ein Hersteller-Fix ist verfügbar.

02

cvss

Technischer Schweregrad, 0–10. Eine Zeile je Quelle.

8.6
010

Basiswert 0–10 · höher = schwerwiegender · Vektor überfahren zum Auflösen⚠ Quellen uneinig · medium–high · 4.4–8.6

v2.04.4mediumAV:L/AC:M/Au:N/C:P/I:P/A:Pprimary · NVD / NIST USAusnutzbarkeit 3.4 · Auswirkung 6.4
v3.18.6highCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:Hprimary · NVD / NIST USAusnutzbarkeit 1.8 · Auswirkung 6
v3.18.6highCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H/E:P/RL:O/RC:Csecondary · CISA US
v3.18.6highAV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:Hsecondary · FSTEC (BDU) RU
v3.18.2highCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:Nsecondary · ENISA EU
v3.18.2highCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:Nsecondary · security-advisories@github.comAusnutzbarkeit 1.8 · Auswirkung 5.8
v3.18.2highCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:Nsecondary · OSV
v3.18.6highCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H/E:P/RL:O/RC:Csecondary · Siemens ProductCERT DE
v3.18.6highCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:Hsecondary · Festo PSIRT DE
v3.17.9highCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H/E:Usecondary · CVSS-BT (t0sche)
03

schwächen

Die CWE-Schwächeklassen, zu denen dies gehört.

04

betroffene Produkte (38)

Betroffene Produkte und Versionsbereiche.

20 von 38 angezeigt
05

Advisories (10)

Hersteller- und Ökosystem-Meldungen dazu.

  • FSA-202302Festo: Several vulnerabilities in FactoryViews2023-07-10csaf · festo_psirtDE

    FactoryViews bundles many third-party applications which are used in background processes to provide the software's features. From time to time, vulnerabilities in these bundled applications are discovered. These are typically fixed in newer versions of FactoryViews by updating the bundled applications. FactoryViews versions up to and including 1.5.2 contain around 200 such vulnerabilities listed in this advisory.Version 1.6.0 is a security rollup release which includes updates to all bundled applications and fixes these vulnerabilities. At this time, FactoryViews Lite cannot be updated beyond version 1.1. FactoryViews 1.7 unifies the non-Lite and Lite versions and fixes these vulnerabilities for users of FactoryViews Lite.

  • SSA-389290SSA-389290: Third-Party Component Vulnerabilities in SINEC INS2022-03-08csaf · siemens_psirtDE

    71 vulnerabilities in third-party components as Node.js, cURL, SQLite, CivetWeb and DNS(ISC BIND) could allow an attacker to interfere with the affected product in various ways. Siemens has released an update for SINEC INS and recommends to update to the latest versions.

  • WID-SEC-W-2022-0092Node.js: Mehrere Schwachstellen ermöglichen Manipulation von DateienDeutsch2021-08-31csaf · cert_bundDE

    Ein entfernter, anonymer Angreifer kann mehrere Schwachstellen in Node.js ausnutzen, um Dateien zu manipulieren.

  • WID-SEC-W-2022-1603IBM Tivoli Netcool/OMNIbus: Mehrere SchwachstellenDeutsch2022-10-03csaf · cert_bundDE

    Ein entfernter, anonymer Angreifer kann mehrere Schwachstellen in IBM Tivoli Netcool/OMNIbus ausnutzen, um beliebigen Programmcode auszuführen, Informationen offenzulegen, Dateien zu manipulieren oder einen Denial of Service Zustand herbeizuführen.

  • WID-SEC-W-2023-0809IBM QRadar SIEM: Mehrere SchwachstellenDeutsch2023-03-30csaf · cert_bundDE

    Ein entfernter, anonymer Angreifer kann mehrere Schwachstellen in IBM QRadar SIEM ausnutzen, um beliebigen Programmcode auszuführen, Informationen offenzulegen, Informationen falsch darzustellen, einen Denial of Service Zustand herbeizuführen, Sicherheitsvorkehrungen zu umgehen, einen Cross-Site-Scripting-Angriff durchzuführen oder unbekannte Auswirkungen zu verursachen.

  • WID-SEC-W-2023-0856IBM QRadar SIEM: Mehrere SchwachstellenDeutsch2022-05-31csaf · cert_bundDE

    Ein entfernter, anonymer Angreifer kann mehrere Schwachstellen in IBM QRadar SIEM ausnutzen, um die Vertraulichkeit, Integrität und Verfügbarkeit zu gefährden.

  • WID-SEC-W-2023-0857IBM QRadar SIEM: Mehrere SchwachstellenDeutsch2022-05-24csaf · cert_bundDE

    Ein lokaler Angreifer kann mehrere Schwachstellen in IBM QRadar SIEM ausnutzen, um beliebigen Programmcode auszuführen, einen Denial of Service Zustand herbeizuführen, Dateien manipulieren oder Sicherheitsvorkehrungen zu umgehen.

  • WID-SEC-W-2024-1591Juniper JUNOS: Mehrere SchwachstellenDeutsch2024-07-10csaf · cert_bundDE

    Ein Angreifer kann mehrere Schwachstellen in Juniper JUNOS ausnutzen, um einen Denial of Service zu verursachen, Informationen offenzulegen, Privilegien zu erweitern und Sicherheitsmechanismen inklusive zu umgehen.

  • GHSA-9r2w-394v-53qcArbitrary File Creation/Overwrite via insufficient symlink protection due to directory cache poisoning using symbolic links2021-08-31ghsa · osvUS

    ### Impact Arbitrary File Creation, Arbitrary File Overwrite, Arbitrary Code Execution `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 below. ### Patches 4.4.16 || 5.0.8 || 6.1.7 ### Workarounds Users may work around this vulnerability without upgrading by creating a custom filter method which prevents the extraction of symbolic links. ```js const tar = require('tar') tar.x({ file: 'archive.tgz', filter: (file, entry) => { if (entry.type === 'SymbolicLink') { return false } else { return true } } }) ``` Users are encouraged to upgrade to the latest patched versions, rather than attempt to sanitize tar input themselves. ### Fix The problem is addressed in the following ways: 1. All paths are normalized to use `/` as a path separator, replacing `\` with `/` on Windows systems, and leaving `\` intact in the path on posix systems. This is performed in depth, at every level of the program where paths are consumed. 2. Directory cache pruning is performed case-insensitively. This _may_ result in undue cache misses on case-sensitive file systems, but the performance impact is negligible. #### Caveat Note that this means that the `entry` objects exposed in various parts of tar's API will now always use `/` as a path separator, even on Windows systems. This is not expected to cause problems, as `/` is a valid path separator on Windows systems, but _may_ result in issues if `entry.path` is compared against a path string coming from some other API such as `fs.realpath()` or `path.resolve()`. Users are encouraged to always normalize paths using a well-tested method such as `path.resolve()` before comparing paths to one another.

  • ICSA-22-069-09Siemens SINEC INS2022-03-08icsa · cisa_csaf_otUS

    71 vulnerabilities in third-party components as Node.js, cURL, SQLite, CivetWeb and DNS(ISC BIND) could allow an attacker to interfere with the affected product in various ways. Siemens has released an update for SINEC INS and recommends to update to the latest versions.

06

auch bekannt als (4)

Weitere Namen und Kennungen dieser Entität.

07

quellen

Welche Quellen diesen Datensatz belegen und wann.

09

Referenzen (45)

Externe Belege — Patches, Meldungen, Analysen.

scry

Angreifer nutzen Schwachstellen wie diese gegen im Internet exponierte Dienste aus. Sehen Sie mit einem kostenlosen Passiv-Scan, was exponiert ist.

Kostenloser Scan