Skip to main content
Network Thinking Solutions Logo

CVE-2021-32803

The npm package "tar" (aka node-tar) before versions 6.1.2, 5.0.7, 4.4.15, and 3.2.3 has an arbitrary File Creation/Overwrite vulnerability via insufficient symlink protection. `node-tar` aims to guarantee that any file whose location would be modified by a symbolic link is not extracted.

All CVEs
CVE-2021-32803Published 8/3/2021

The npm package "tar" (aka node-tar) before versions 6.1.2, 5.0.7, 4.4.15, and 3.2.3 has an arbitrary File Creation/Overwrite vulnerability via insufficient symlink protection. `node-tar` aims to guarantee that any file whose location would be modified by a symbolic link is not extracted.

Vendor advisory
CVSS8.2High

Overview

The npm package "tar" (aka node-tar) before versions 6.1.2, 5.0.7, 4.4.15, and 3.2.3 has an arbitrary File Creation/Overwrite vulnerability via insufficient symlink protection. `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. This order of operations resulted in the directory being created and added to the `node-tar` directory cache. When a directory is present in the directory cache, subsequent calls to mkdir for that directory are skipped. However, this is also where `node-tar` checks for symlinks occur. 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. This issue was addressed in releases 3.2.3, 4.4.15, 5.0.7 and 6.1.2.

Published
8/3/2021
Last modified
6/17/2026
CVE assigner
Not available
NVD analysis
Not available

Exploitation

No CISA KEV flag in the saved record

An absent KEV flag does not establish that exploitation has never occurred. Verify current intelligence before prioritizing work.

EPSS predictions and CISA SSVC assessments are not imported here. Review additional intelligence on Cloudflare

Affected products

Affected-version rules published in the advisory. Conditions and uncertain comparisons require verification.

Vendor / productAffected versionsPlatform / conditionsEvidence
tar
tar project
< 3.2.3

Verify advisory

The advisory has platform, edition, hardware, or configuration conditions not verified by software inventory.

Source
tar
tar project
≥ 4.0.0, < 4.4.15

Verify advisory

The advisory has platform, edition, hardware, or configuration conditions not verified by software inventory.

Source
tar
tar project
≥ 5.0.0, < 5.0.7

Verify advisory

The advisory has platform, edition, hardware, or configuration conditions not verified by software inventory.

Source
tar
tar project
≥ 6.0.0, < 6.1.2

Verify advisory

The advisory has platform, edition, hardware, or configuration conditions not verified by software inventory.

Source
graalvm
oracle
20.3.3

Verify advisory

The advisory has platform, edition, hardware, or configuration conditions not verified by software inventory.

Source
graalvm
oracle
21.2.0

Verify advisory

The advisory has platform, edition, hardware, or configuration conditions not verified by software inventory.

Source
sinec infrastructure network services
siemens
< 1.0.1.1

Verify advisory

Source
node-tar
npm
< 3.2.3

Verify advisory

Source
node-tar
npm
>= 4.0.0, < 4.4.15

Verify advisory

Source
node-tar
npm
>= 5.0.0, < 5.0.7

Verify advisory

Source
node-tar
npm
>= 6.0.0, < 6.1.2

Verify advisory

Source

Recommended actions

Verify the product, installed version, platform, and advisory prerequisites on each system. Apply the vendor's applicable fixed release or mitigation. An affected-range boundary alone is not a universal update recommendation.

Vendor advisory links

Derived from non-aggregator references because the source record has no vendor tags. Verify the advisory before acting on it.

Severity

CVSS describes technical impact. It is separate from exploitation evidence.

Published headline score: 8.2. Score version, vector, and attribution are not available in this record. Additional score details appear when the source record is next refreshed.

Sources & references

Sources: Official CVE List, NVD and cve.now (summaries CC BY 4.0). Uses NVD data; not endorsed by NVD.