Skip to main content

node-tar CVE-2026-140235

| EUVDEUVD-2026-140410 HIGH
Improper Input Validation (CWE-20)
2026-12-01 GitHub_M GHSA-rgjp-p5j7-w36x
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-embedded PAX record
  2. Delivery
    Deliver archive to node-tar 7.x consumer
  3. Exploit
    parseKV newline-split drops real record
  4. Execution
    Forged path/size/linkpath applied to entry
  5. Impact
    Defeat inspection and write forged filename

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 a node-tar consumer running an affected version (7.5.0 through <8.0.0) to list or extract a tar archive containing either a crafted PAX extended-header record or a filename with an embedded newline that was packed by any length-compliant packer (GNU tar, bsdtar, Python tarfile). The forged-field injection (path, size, linkpath, mode, uid, gid, mtime) functions even in default extraction mode, but there the forged path is confined to the extraction root because path sanitization still applies. Escaping that confinement to an absolute path or a parent-directory ('..') component additionally requires the non-default preservePaths option to be enabled. Limiting factors: the victim must process the attacker-influenced archive (user interaction, UI:P), and the traversal-grade impact depends on the non-default preservePaths configuration.

Impact

Multiple signals converge on a genuine but qualified priority. The vendor CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:P/VC:L/VI:H/VA:L, score 7.2 HIGH) describes a network-reachable, low-complexity, unauthenticated flaw whose dominant impact is integrity (VI:H), not disclosure. It is NOT on CISA KEV, so there is no public evidence of active exploitation, and no EPSS score was supplied, so widespread-exploitation probability cannot be quantified here - state this gap explicitly. A validated proof-of-concept is published inside the GHSA-rgjp-p5j7-w36x advisory (tested against tar@7.5.22, Node v24.19.0, cross-compared with GNU tar 1.35 and Python 3.13), so this is a public PoC reference that demonstrates the parsing divergence; it is not verified as a weaponized working exploit, and PoC availability must not be conflated with active exploitation. The vuln.today decision label is this_week, consistent with a serious issue warranting prompt patching rather than an emergency. Two factors temper raw severity: exploitation requires a victim to process an attacker-controlled or crafted archive (UI:P), and the most dangerous outcome - a forged path that is absolute or contains '..' - requires the non-default preservePaths option; in default extraction the forged path is confined to the extraction root because path sanitization still applies. No SSVC automatable/technical-impact fields were provided. Net: a real, broadly-relevant integrity/field-injection bug in an extremely common dependency, meriting timely patching to 8.0.0, but not an actively-exploited emergency on the available data.

Exploit ScenarioDerived

An attacker crafts (or induces a victim to archive) a tar file containing a PAX extended header whose record value embeds a newline followed by a self-valid '<len> key=value' fragment such as '24 path=forged-name.txt'. When a node-tar 7.x consumer lists or extracts the archive, parseKV drops the real record and applies the forged path, size, linkpath, mode, uid/gid, or mtime, so the entry node-tar materializes differs from what every compliant reader (GNU tar, bsdtar, Python tarfile) sees, defeating name- and attribute-based inspection. A validated PoC exists in the vendor advisory; with the non-default preservePaths option the forged path may become absolute or contain parent-directory traversal.

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 injection in node-tar 7.5.0 through 7.9.x (fixed in 8.0.0) lets a crafted or attacker-influenced archive rewrite entry attributes: the parser splits length-delimited pax records on newlines, so a value containing a newline drops the genuine record and any trailing self-valid fragment is applied as a real field such as path, size, linkpath, mode, uid, gid, or mtime. Affected are Node.js applications that list or extract archives with the vulnerable library; default extraction still confines a forged path to the extraction root, but with the non-default preservePaths option the forged path can be absolute or contain a parent-directory component. A public PoC reference exists and was validated against npm tar@7.5.22 with GNU tar and Python tarfile as differential controls; it is not verified as working exploit code beyond the demonstrated parser divergence, no CISA KEV entry exists, and exploitation requires the victim to process the malicious archive (UI:R).

RemediationAI

Upgrade to node-tar 8.0.0 (npm package 'tar' 8.0.0), as stated in the GHSA advisory and the v8.0.0 release notes (https://github.com/isaacs/node-tar/releases/tag/v8.0.0); the underlying parser rewrite is in commit f351e5b4a8916bc8c8f821d0ad926a17d26ea237. Because 8.0.0 is a major version with changed pax parsing and entry-metadata precedence, review changelogs and test archive-handling code paths before rolling it out, and pin transitive 'tar' dependencies via overrides/resolutions since the library is commonly pulled in by npm, node-gyp, and packaging toolchains. Until the upgrade is deployed, treat the preservePaths option as the highest-risk switch and keep it disabled for any extraction of untrusted or third-party archives, since with it enabled a forged path can be absolute or contain '..', whereas default extraction confines forged paths to the extraction root and cannot drop sanitization entirely. Additional compensating controls carry trade-offs: validate archive contents with an independent reader (GNU tar, bsdtar, or Python tarfile) before handing them to a node-tar consumer, at the cost of an extra processing pass and only working because those readers handle the records correctly; reject or flag archives whose member names contain newline characters, which blocks the filename-driven variant but not a hand-crafted archive; and restrict extraction to trusted, signed inputs, which reduces exposure only where the archive supply chain can be constrained. Note that vendor guidance identifies the parser fix in 8.0.0 as the complete remediation.

Affected VersionsENISA

node-tar 7.5.0, < 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

POSIX pax extended headers are encoded as length-delimited records of the form '<len> key=value\n', where <len> counts the entire record including any newline embedded in the value. node-tar's parseKV instead ran str.replace(/\n$/,'').split('\n') and then validated each resulting line by checking n === Buffer.byteLength(line)+1, so a legitimate record whose value contains a newline (which happens whenever an archived filename contains a newline) fails the length check and is dropped, while a trailing fragment that itself forms a valid '<len> key=value' line passes and is written into the extended-header set. This is a CWE-20 input-validation defect, and the advisory additionally frames it as a CWE-436 cross-implementation divergence: GNU tar, bsdtar, and Python tarfile read such archives under the true names and attributes, while node-tar reads truncated 100-byte header names plus forged attributes, defeating name-based and attribute-based inspection and enabling round-trip failures. A second facet is numeric coercion: values were accepted via JavaScript +v, so size=0x10, size=1e3, size=1.5, and size=Infinity were honored by node-tar but rejected or handled differently by GNU tar and Python tarfile. The fix in 8.0.0 replaces the newline split with a byte-length-driven cursor that consumes exactly n bytes per record, stops at the first malformed record, tightens SIMPLE_NUMBER to ^\d+$, rejects non-safe integers and invalid dates, makes pax path/linkpath assignments non-clobbering (??=), applies global headers before local ones so local values win, stops extended-header values from overriding the resolved size, and adds a differential test suite (test/parse-differential.test.ts) that asserts parity with other tar programs.

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

Attacker-supplied archive is network-deliverable and needs no auth (PR:N), but a victim must process it (UI:R); dominant impact is forged-field integrity (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 - 18:03 EUVD
CVE Published
Dec 01, 2026 - 17:11 cve.org
HIGH 7.2

DescriptionCVE.org

node-tar is a tar archive manipulation library for Node.js. From 7.5.0 until 8.0.0, parseKV splits length-delimited PAX records on newline characters, so a newline inside a record value can drop the original field and turn a trailing fragment into a forged path, size, linkpath, or other entry attribute. Default extraction confines a forged path to the extraction root. When preservePaths is enabled, the forged path may instead be absolute or contain a parent-directory component. This issue is fixed in version 8.0.0.

Executive ViewAI

Why It Matters

CVE-2026-140235 (CVSS 7.2) is a high-severity flaw in the widely used node-tar library (versions 7.5.0-7.9.x) that allows a maliciously crafted archive to manipulate file attributes during extraction, potentially leading to unintended file overwrites or path traversal when non-default options like preservePaths are enabled. While exploitation requires user interaction (processing a malicious archive) and no active exploitation has been observed, the broad adoption of node-tar in Node.js tooling means many CI/CD pipelines and applications could be exposed if untrusted archives are handled. Leadership should prioritize patching to version 8.0.0 and reviewing vulnerable dependencies, as the risk of data integrity compromise and potential unauthorized file access is significant.

Business Impact: Medium
Compensating Controls

Apply vendor patch: upgrade to node-tar 8.0.0 or later; if unable to patch immediately, avoid using preservePaths option and only process archives from trusted sources, or consider alternative archive libraries without this vulnerability.

Threat Intelligence Overview

Prevalence
Ubiquitous
npm 'tar' is a core Node.js dependency bundled with npm itself
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
Medium

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