Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessCraft tar with malicious GEX linkpath
-
DeliveryDeliver archive to Parser/list consumer
-
Exploitlinkpath injected, no strict warning fires
-
ExecutionConsumer builds symlink/path from entry.linkpath
-
ImpactArbitrary 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. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – 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
Affected Packages
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
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
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.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
2DescriptionCVE.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.
Articles & Coverage 1
Executive ViewAI
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.
Apply vendor patch.
Threat Intelligence Overview
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
Remote code execution in n8n's workflow expression evaluation system allows an authenticated user with workflow creation
A vulnerability in the NuPoint Unified Messaging (NPM) component of Mitel MiCollab through 9.8 SP1 FP2 (9.8.1.201) could
FortiOS and FortiProxy contain an authentication bypass via the Node.js websocket module allowing unauthenticated remote
Denial of service against HTTP/2 server implementations allows remote unauthenticated attackers to exhaust server resour
Eval injection vulnerability in the internals.batch function in lib/batch.js in the bassmaster plugin before 1.5.2 for t
Flowise version 3.0.5 contains a remote code execution vulnerability in the CustomMCP node. The mcpServerConfig paramete
Node.js 8.5.0 before 8.6.0 allows remote attackers to access unintended files, because a change to ".." handling was inc
An issue was discovered in the node-serialize package 0.0.4 for Node.js. Rated critical severity (CVSS 9.8), this vulner
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
Directory traversal vulnerability in the st module before 0.2.5 for Node.js allows remote attackers to read arbitrary fi
Multiple SQL injection vulnerabilities in the Manage Accounts page in the AccountManagement.asmx service in the Solarwin
A vulnerability in NuPoint Messenger (NPM) of Mitel MiCollab through 9.8.0.33 allows an unauthenticated attacker to cond
EUVD-2026-140444
GHSA-ffhw-4r4q-5cwv
NVD
CVE.org
Exploit-DB