Skip to main content

node-tar CVE-2026-140238

| EUVDEUVD-2026-140443 HIGH
Path Traversal (CWE-22)
2026-12-01 GitHub_M GHSA-mpg7-vg3p-wc3m
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 newline-forged PAX path record
  2. Delivery
    Victim extracts archive or runs npm install
  3. Exploit
    Forged record overrides entry, overwrites package.json
  4. Execution
    Injected postinstall script executes
  5. Impact
    Arbitrary code execution / file overwrite on host

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path canonicalization, traversal prevention
MITRE ATT&CK

2 techniques across 2 tactics: Discovery, Collection

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

The attacker must control part of the material being archived (e.g. a planted filename containing a newline and forged PAX record) or craft the tar archive directly, and the victim must extract/install it (UI:P). Two distinct conditions: (1) Direct node-tar extraction WITHOUT strip (POSIX and Windows) allows overwriting a path within the extraction target, escaping an intended prefix/subdirectory - PoC-verified. (2) The npm postinstall RCE additionally requires Windows, npm's strip:1 normalization (normalizeWindowsPath splitting x\package.json into two components), overwrite of the installed package's package.json, and later execution of the injected postinstall script. Limiting factors: POSIX npm processing with strip:1 is explicitly NOT affected by the RCE chain; the full arbitrary-code-execution outcome is Windows-plus-npm specific; and exploitation is not self-triggering (requires the victim to extract or install). The only complete fix per the vendor is updating to node-tar 8.0.0.

Impact

Signals are moderately but not uniformly high. The CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:P, score 7.2) indicates a network-reachable, low-complexity, unauthenticated flaw that nonetheless requires passive user interaction (UI:P) - the victim must extract or npm install a crafted archive; it is not a self-triggering remote exploit. SSVC aligns with this: Exploitation=poc (not active), Automatable=no, Technical Impact=partial, which matches the vuln.today 'this_week' priority rather than an emergency label. The GHSA advisory includes runnable proof-of-concept code and a Windows RCE kit that the reporter verified end-to-end (Windows Server 2022, Node v22.14.0, npm 10.9.2), so publicly available exploit code exists, but there is NO CISA KEV listing and NO EPSS score in the input - so there is no evidence of active in-the-wild exploitation, and widespread opportunistic exploitation is unlikely given the 'Automatable: no' judgment and the need for attacker-controlled archive content plus victim action. The highest-impact outcome (code execution via injected postinstall) is Windows-and-npm-strip:1-specific; POSIX npm with strip:1 is explicitly not affected by that chain. Net: a real, worth-patching-this-week integrity/path-overwrite issue in an extremely widely used library, but not a drop-everything emergency on the available signals. Note a signal nuance to verify: the raw CVSS carries VI:H (high integrity impact) reflecting the Windows RCE case, while the broader cross-platform primitive is 'overwrite a path within the extraction target' - defenders not running the Windows npm-install path face integrity impact without the postinstall RCE escalation.

Exploit ScenarioDerived

An attacker commits a file whose name embeds a newline plus a forged PAX path=package.json record into a directory that is later packed (e.g. a CI artifact or package-publishing pipeline), or crafts such a tar archive directly. When a victim extracts it with node-tar <8.0.0 (no strip), the forged record overrides the real entry path and silently overwrites a file at the extraction root; on Windows with npm's strip:1 normalization the same primitive overwrites an installed package's package.json and runs an attacker-injected postinstall script, yielding code execution during npm install. Publicly available exploit code exists - the GHSA advisory bundles a minimal POSIX repro and a verified real-Windows npm RCE kit.

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

PAX extended-header record forgery in node-tar before 8.0.0 lets an archive override its own entry attributes - most damagingly path - so extraction writes attacker content to a location the archive structure never declared, escaping an intended prefix or subdirectory inside the extraction target. Direct node-tar extraction without strip is affected on both POSIX and Windows, and on Windows an npm install with strip:1 can additionally have an installed package's package.json overwritten so an injected postinstall script runs, yielding code execution during install. The vendor advisory references a public proof-of-concept bundle, including an end-to-end Windows npm postinstall reproduction; POSIX npm processing with strip:1 is explicitly not affected by that RCE chain, exploitation requires the victim to extract or install the archive (UI:R at the assessed CVSS:3.1 vector AV:N/AC:L/PR:N/UI:R), and the priority label is this_week rather than act_now.

RemediationAI

Vendor-released patch: node-tar 8.0.0, published at https://github.com/isaacs/node-tar/releases/tag/v8.0.0 and referenced by advisory GHSA-mpg7-vg3p-wc3m; the vendor states that updating to 8.0.0 is the only complete fix, and the code change is commit f351e5b4a8916bc8c8f821d0ad926a17d26ea237, which frames PAX records by declared byte length instead of splitting on newlines. Upgrade every dependency path that resolves node-tar below 8.0.0 - including transitive copies pulled in by npm/pacote - and re-verify the resolved version with a lockfile or npm ls tar, since a single remaining 7.x copy keeps the forgery primitive reachable. Patching also removes the related hardening gaps closed in the same commit (attacker-supplied size/global keys ignored during slurp, global PAX applied before local, warning on entries after a lone null block). When upgrade is not immediately possible, treat the deployment scoping as a temporary boundary rather than a fix: the npm postinstall RCE chain requires Windows with strip:1 and does not apply to POSIX npm processing with strip:1, but direct node-tar extraction without strip is exploitable on both POSIX and Windows, so any consumer calling the extraction API directly on attacker-influenced archives remains exposed until 8.0.0 is installed.

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 (CWE-22 path traversal, with the advisory also classifying the framing bug as CWE-93 newline injection). The PAX format frames each record as <byte-length> <key>=<value>\n, where the length is authoritative precisely because a value may itself contain a newline. node-tar's parseKV in src/pax.ts instead split the PAX body on \n and validated each line only by a self-consistency check (declaredLen === byteLength(line) + 1), so a newline embedded in any value was reinterpreted as a record boundary and everything after it became an independent, attacker-chosen record; the source itself carried an XXX Values with \n in them will fail this comment. Accepted keys are whitelisted and applied to the entry via Object.assign in ReadEntry#slurp (src/read-entry.ts), so forged path, linkpath, size, uid and similar records override the genuine header values. A complementary creation-side defect exists in encodeField, which serialized values with no escaping, meaning archives produced by node-tar itself from a directory containing an attacker-planted filename can carry forged records. The 8.0.0 fix commit f351e5b4a8916bc8c8f821d0ad926a17d26ea237 rewrites parseKV to walk records strictly by declared byte length, stops at the first malformed record, applies global (gex) PAX values before local ones so local values win, and excludes size, global, and global path/linkpath from slurp; it also hardens null-byte stripping with the /s regex flag and adds a TAR_BAD_ARCHIVE warning for entries following a lone null block. This is distinct from the earlier NUL-in-PAX denial-of-service issue GHSA-gvwx-54wh-qm9j: here the outcome is silent attribute forgery and path overwrite, not a crash.

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

Archive is network-delivered (AV:N) but the victim must extract/install it (UI:R) with no privileges (PR:N); impact is chiefly integrity via path/package.json overwrite (I:H), with limited confidentiality and availability.

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:21 cve.org
HIGH 7.2

DescriptionCVE.org

node-tar is a tar archive manipulation library for Node.js. Prior to 8.0.0, newline splitting of PAX extended header records permits attacker-controlled entry attributes to be forged. Direct node-tar extraction without strip can overwrite a path within the extraction target. The npm execution chain additionally requires Windows strip:1 normalization, an overwrite of package.json, and later execution of the injected postinstall script; POSIX npm processing with strip:1 is not affected by that chain. This issue is fixed in version 8.0.0.

Executive ViewAI

Why It Matters

A high-severity flaw in the widely used node-tar library (versions before 8.0.0) allows a crafted archive to redirect extracted files outside their intended location, which on Windows can escalate to code execution during an npm package install. Teams that process third-party or untrusted archives-and anyone whose build/install pipelines touch Windows machines-should care, because a single malicious package download could compromise a developer workstation or CI runner and serve as an entry point into internal systems.

Business Impact: High
Compensating Controls

Vendor-released patch: node-tar 8.0.0

Threat Intelligence Overview

Prevalence
Ubiquitous
core tar library bundled with npm; hundreds of millions of weekly installs
Threat Intel
1
1 source
Social Media
1
Sightings
Data Quality
5 sources
Confidence: Medium
EUVD NVD CVE.org Vulnrichment GHSA CIRCL GitHub

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
Scheduled
Exploitation
Poc
System Exposure· derived
Open
Automatable
No
Human Impact
High
Technical Impact
Partial

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

Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.

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