LiveActive security incident?Get immediate response
CVE Record

CVE-2021-32803: Arbitrary File Creation/Overwrite via insufficient symlink protection due to directory cache poisoning

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.

HighCVSS 8.2Not KEV-listedUpdated
Glexia's TakeAutomated analysishigh

Security readout for executives and security teams

Plain-English summary

CVE-2021-32803 affects the npm tar package, also known as node-tar. A malicious tar archive could cause files to be created or overwritten outside the intended extraction location. Business risk is highest where systems automatically unpack archives from users, partners, package workflows, or build pipelines.

Executive priority

Treat as a high-priority dependency remediation if archive extraction is exposed to untrusted inputs or automated supply-chain workflows. If node-tar is only present in isolated tooling with trusted inputs, urgency is lower but upgrade should still be scheduled.

Technical view

Vulnerable node-tar versions cached created directories and skipped later symlink checks for cached paths. An archive could exploit this cache behavior to bypass symlink protections and write files to unintended locations. Fixed releases are 3.2.3, 4.4.15, 5.0.7, and 6.1.2.

Likely exposure

Exposure is likely in Node.js applications, developer tools, CI systems, or products that depend on vulnerable node-tar versions and extract untrusted tar archives. Transitive dependency exposure should be considered. Oracle and Siemens advisories indicate downstream product relevance, but this bundle does not define specific affected product versions beyond node-tar.

Exploitation context

The CVSS vector requires local attack conditions and user interaction, but no privileges. The provided bundle does not show CISA KEV listing or confirmed active exploitation. Practical risk depends on whether vulnerable software processes attacker-controlled tar archives.

Researcher notes

The core issue is directory cache poisoning that weakens symlink defense during extraction. CVSS 8.2 reflects changed scope with high confidentiality and integrity impact, but no availability impact. Evidence in this bundle supports fixed versions, not exploit-in-the-wild claims.

Mitigation direction

  • Upgrade npm tar to a fixed version or later.
  • Audit direct and transitive dependencies for vulnerable node-tar ranges.
  • Avoid extracting untrusted tar archives until vulnerable dependencies are remediated.
  • Review vendor advisories for packaged products that embed node-tar.
  • Refresh lockfiles and redeploy affected build or runtime environments.

Validation and detection

  • Check SBOMs and lockfiles for npm tar versions below fixed releases.
  • Confirm deployed artifacts include fixed node-tar versions.
  • Identify application paths that extract user, partner, or CI-supplied tar archives.
  • Run dependency scanning mapped to CVE-2021-32803.
  • Review vendor bulletins for Oracle or Siemens product exposure where applicable.
Prepared
Confidence
high
Sources
8

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cwe · medium confidence lookup

CWE-22: File access and web shell behavior lookup

File traversal and upload weaknesses can lead teams to review file, web shell, execution, and collection telemetry. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.

Open ATT&CK lookup
description · low confidence lookup

File access behavior lookup

The CVE wording references file access or upload behavior, so file telemetry and web shell review may help. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.

Open ATT&CK lookup
cve · low confidence lookup

CVE-2021-32803 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
High
CVSS
8.2 (3.1)
Known Exploited
No
Published

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

Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

1CVSS vectors
0Timeline events
0ADP providers
7Source links

CVSS vector scores

1 official score

We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.

ScoreVersionSeverityVectorExploitImpactSource
8.2CVSS 3.1HighCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N1.85.8Primary CVE score

Vulnerability scoring details

Base CVSS 3.1 score

8.2High
CVSS 3.1 vector shape for CVE-2021-32803Attack VectorAttack ComplexityPrivileges RequiredUser InteractionScopeConfidentiality ImpactIntegrity ImpactAvailability Impact

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

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Privileges Required
NoneLowHigh
User Interaction
NoneRequired
Scope
ChangedUnchanged
Confidentiality Impact
HighLowNone
Integrity Impact
HighLowNone
Availability Impact
HighLowNone
Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
npmnode-tar< 3.2.3, >= 4.0.0, < 4.4.15, >= 5.0.0, < 5.0.7, >= 6.0.0, < 6.1.2Listed
Weakness

CWE details

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.