Skip to main content

node-tar CVE-2026-140239

| EUVDEUVD-2026-140444 HIGH
Improper Input Validation (CWE-20)
2026-12-01 GitHub_M GHSA-ffhw-4r4q-5cwv
7.2
CVSS 4.0 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Craft tar with malicious GEX linkpath
  2. Delivery
    Deliver archive to Parser/list consumer
  3. Exploit
    linkpath injected, no strict warning fires
  4. Execution
    Consumer builds symlink/path from entry.linkpath
  5. Impact
    Arbitrary file read or write outside directory

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V2 - Validation and Business Logic Input validation, allowlisting
Exploitation Conditions

Exploitation requires that the consuming application uses tar.Parser or tar.list directly AND trusts entry.linkpath to build filesystem paths, create symlinks, or make routing decisions without revalidating that the value stays within the intended directory; the attacker must get the victim to process a crafted archive containing a PAX Global Extended Header (type 'g') with a linkpath field (UI:P / passive interaction). Key limiting factors: applications using only tar.x()/tar.extract() are NOT exploitable because Unpack's STRIPABSOLUTEPATH guard rejects an escaping linkpath at extraction time; only node-tar versions prior to 8.0.0 are affected; and the issue additionally defeats strict:true, which normally throws on dangerous archive contents.

Impact

The vendor CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:P, VC:L/VI:H/VA:L) yields 7.2 (High), driven by network-deliverable input, no required privileges, and a high integrity impact (arbitrary file write), tempered by required passive user interaction (the victim must process an attacker-supplied archive) and only Low confidentiality/availability. No EPSS score and no KEV status are present in the input, so exploitation probability and active-exploitation signals cannot be assessed - this absence should not be read as 'low risk'. The decisive risk modulator is scope, confirmed by the advisory: node-tar's own tar.x/tar.extract path is NOT affected because Unpack's STRIPABSOLUTEPATH guard rejects an escaping linkpath, so the common extraction use case is safe. The flaw only reaches a vulnerable state in applications that consume tar.Parser or tar.list directly and trust entry.linkpath without revalidation (archive-inspection tools, CI/CD tarball scanners, custom extractors). This makes it a genuine but conditional priority: high CVSS reflects worst-case consumer behavior, while real-world exposure depends on whether a given deployment uses the Parser API in the vulnerable way rather than the standard extraction helpers. The vuln.today decision label is 'this_week', consistent with a patched, non-KEV, conditionally-exploitable library flaw rather than an emergency.

Exploit ScenarioDerived

An attacker crafts a tar archive whose PAX Global Extended Header sets a linkpath such as '../../../etc/passwd', then supplies it to an application that uses tar.Parser or tar.list to inspect archives. Because read-entry.js fails to strip linkpath from global headers, every entry silently carries the attacker's linkpath with no strict-mode warning, and a downstream consumer that builds a symlink or path from entry.linkpath reads or writes files outside the intended directory. A full working proof-of-concept (zero-warning injection plus an arbitrary-file-read chain, and a control confirming tar.x is unaffected) is published in the GHSA advisory, so the trigger and impact are concretely demonstrated.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Dec 02, 2026

Crafted PAX Global Extended Headers leak an attacker-controlled linkpath into every entry returned by tar.Parser and tar.list in node-tar before 8.0.0, so downstream tools that trust entry.linkpath can be steered into creating symlinks that escape the intended directory and read or write arbitrary files. The defect lives in read-entry.ts's #slurp(), which - unlike its counterpart in header.ts - never filters linkpath out of 'g'-type global headers, so the value propagates even under strict:true with zero warnings, defeating the library's own safety net. Only applications that consume the parser API directly and build paths or symlinks from entry.linkpath without revalidating are exposed; tar.x() and tar.extract() remain safe because Unpack's STRIPABSOLUTEPATH guard rejects the escaping linkpath at extraction time. Unauthenticated remote attackers only need the victim to process a malicious archive (passive user interaction); the vendor rates this High at CVSS 4.0 7.2, a proof-of-concept is published alongside the GitHub advisory, and no active exploitation or CISA KEV listing is reported at time of analysis.

RemediationAI

Vendor-released patch: node-tar 8.0.0 - upgrade the 'tar' npm dependency to 8.0.0 or later (npm install tar@^8.0.0) and rebuild any bundled or vendored copies; the fix commit f351e5b4a8916bc8c8f821d0ad926a17d26ea237 adds the missing linkpath exclusion for global headers in read-entry.ts alongside broader PAX parsing hardening, and release notes are at https://github.com/isaacs/node-tar/releases/tag/v8.0.0 with the advisory at https://github.com/isaacs/node-tar/security/advisories/GHSA-ffhw-4r4q-5cwv. Where the upgrade cannot happen immediately, fix the consuming code rather than the library: never use entry.linkpath verbatim - resolve it against the entry's own directory with path.resolve and reject any result that does not stay inside the intended extraction root before calling fs.symlink or fs.writeFile; the trade-off is that legitimate symlinks pointing outside the sandbox will now be refused, which is the same behavior Unpack already enforces. Applications that only need extraction should route through tar.x()/tar.extract() instead of hand-rolled Parser logic, since Unpack's STRIPABSOLUTEPATH guard already blocks this archive shape; the trade-off is loss of any custom per-entry handling built on the Parser stream. As a defense-in-depth filter for inspection-only tools, pre-scan archives and reject any 'g'-type PAX global header that carries a linkpath key before it reaches the parser, but note that this duplicates logic the 8.0.0 release implements centrally and may reject rare archives that legitimately set global linkpath values. Note that strict:true does not mitigate this issue in versions before 8.0.0, so relying on it is not a valid compensating control.

Affected VersionsENISA

node-tar < 8.0.0

Affected Packages

npm tar fix: 8.0.0
euvd node_tar fix: 8.0.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 2 packages in npm, euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The flaw sits in node-tar's PAX extended-header handling. PAX defines two header types: local extended headers ('x') that describe the next entry, and Global Extended Headers ('g') whose key/value records are meant to apply to every subsequent entry in the archive. The library applies those records through two independent #slurp() implementations - one in src/header.ts used to decode the raw 512-byte block, and one in src/read-entry.ts used to build the ReadEntry object surfaced to consumers. header.ts correctly skips linkpath when slurping a global header, so header.linkpath stays empty and the "linkpath forbidden in global header" warning in consumeHeader() never fires. read-entry.ts only excludes path, so the attacker's linkpath is written straight into entry.linkpath for plain File and Directory entries alike. This is an improper input validation (CWE-20) and insufficient verification of data authenticity (CWE-345) problem: the parser accepts metadata fields that the format's own rules reserve for per-entry (local) headers, and it validates global-header semantics inconsistently across two code paths. The blast radius is deliberately narrow - node-tar's own Unpack layer resolves linkpath relative to the entry directory and rejects anything escaping cwd, which is why the advisory's control test shows tar.x() throwing TAR_ENTRY_ERROR: linkpath escapes extraction directory on the same archive. The risk therefore materializes only in third-party consumers of the Parser/list API - archive scanners, CI/CD tarball inspectors, and custom extraction logic. The 8.0.0 fix adds the missing (k === 'linkpath' && gex) filter and, in the same commit, hardens the surrounding parser: PAX records are now parsed by declared byte length rather than naive line splitting, order of slurping was changed so local headers override global ones, size/global keys are excluded from slurping, and entries appearing after a lone null block raise TAR_BAD_ARCHIVE.

Know when Node.js gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (GitHub_M) PRIMARY 7.2 HIGH
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:L/VI:H/VA:L/SC:N/SI:N/SA:N
vuln.today AI 7.6 HIGH

A network-delivered archive is processed passively by a Parser consumer (UI:R) with no privileges; primary impact is arbitrary file write (I:H) with limited read (C:L) and minor availability effect.

3.1 AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:H/A:L
4.0 AV:N/AC:L/AT:N/PR:N/UI:P/VC:L/VI:H/VA:L/SC:N/SI:N/SA:N

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
Passive
Vulnerable system: Confidentiality
Low
Vulnerable system: Integrity
High
Vulnerable system: Availability
Low
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

2
Patch available
Dec 01, 2026 - 19:02 EUVD
CVE Published
Dec 01, 2026 - 17:23 cve.org
HIGH 7.2

DescriptionCVE.org

node-tar is a tar archive manipulation library for Node.js. Prior to 8.0.0, a PAX Global Extended Header containing linkpath can populate entry.linkpath on every entry returned by tar.Parser without a strict-mode warning. Direct tar.Parser or tar.list consumers that trust this value can create paths or symlinks outside their intended directory, resulting in arbitrary file read or write. Node-tar's own tar.x and tar.extract operations are not affected because Unpack separately rejects an escaping linkpath. This issue is fixed in version 8.0.0.

Executive ViewAI

Why It Matters

CVE-2026-140239 is a high-severity flaw in the node-tar library (versions before 8.0.0) that can allow attackers to escape intended directories and access arbitrary files when malicious archives are processed. While only applications directly using the tar parser API are exposed, any such application in our environment could be compromised by a single crafted archive, potentially leading to data leakage or system compromise. Leadership should prioritize patching because the issue bypasses the library's own safeguards and requires minimal attacker effort.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

Prevalence
Ubiquitous
core npm tar library, dependency across the Node.js ecosystem
Threat Intel
1
1 source
Social Media
1
Sightings
Data Quality
4 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS N/A
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact
High

Priority Score

36
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +36
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

CVE-2025-68613 HIGH POC
8.8 Dec 19

Remote code execution in n8n's workflow expression evaluation system allows an authenticated user with workflow creation

CVE-2024-41713 CRITICAL POC
9.1 Oct 21

A vulnerability in the NuPoint Unified Messaging (NPM) component of Mitel MiCollab through 9.8 SP1 FP2 (9.8.1.201) could

CVE-2024-55591 CRITICAL POC
9.8 Jan 14

FortiOS and FortiProxy contain an authentication bypass via the Node.js websocket module allowing unauthenticated remote

CVE-2023-44487 HIGH POC
7.5 Oct 10

Denial of service against HTTP/2 server implementations allows remote unauthenticated attackers to exhaust server resour

CVE-2014-7205 CRITICAL POC
10.0 Oct 08

Eval injection vulnerability in the internals.batch function in lib/batch.js in the bassmaster plugin before 1.5.2 for t

CVE-2025-59528 CRITICAL POC
10.0 Sep 22

Flowise version 3.0.5 contains a remote code execution vulnerability in the CustomMCP node. The mcpServerConfig paramete

CVE-2017-14849 HIGH POC
7.5 Sep 28

Node.js 8.5.0 before 8.6.0 allows remote attackers to access unintended files, because a change to ".." handling was inc

CVE-2017-5941 CRITICAL POC
9.8 Feb 09

An issue was discovered in the node-serialize package 0.0.4 for Node.js. Rated critical severity (CVSS 9.8), this vulner

CVE-2014-0224 HIGH POC
7.4 Jun 05

OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph

CVE-2014-3744 HIGH POC
7.5 Oct 23

Directory traversal vulnerability in the st module before 0.2.5 for Node.js allows remote attackers to read arbitrary fi

CVE-2014-9566 HIGH POC
7.5 Mar 10

Multiple SQL injection vulnerabilities in the Manage Accounts page in the AccountManagement.asmx service in the Solarwin

CVE-2024-35286 CRITICAL POC
9.8 Oct 21

A vulnerability in NuPoint Messenger (NPM) of Mitel MiCollab through 9.8.0.33 allows an unauthenticated attacker to cond

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy