Skip to main content

node-tar CVE-2025-64118

MEDIUM
Race Condition (CWE-362)
2025-10-30 security-advisories@github.com
6.1
CVSS 4.0 · Vendor: github
View

Attack ChainAIDerived

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

  1. Access
    Gain local concurrent write access to target tar file
  2. Exploit
    Truncate archive at block boundary during sync .list read
  3. Impact
    Leak uninitialized process memory as entry contents

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V15 - Secure Coding and Architecture Concurrency control, locking
MITRE ATT&CK

1 technique across 1 tactic: Privilege Escalation

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

Exploitation Conditions

Exploitation requires ALL of the following: (1) the victim application uses node-tar 7.5.1 and calls .t() / .list() with { sync: true } to read entry contents; (2) an attacker-controlled local process can concurrently modify the same tar file on disk, truncating it to a smaller size at the boundary between a tar header and body block; (3) the truncation must land in the narrow race window between when the archive size is obtained via stat and when the synchronous parser reaches the truncated entry. Limiting factors that reduce real-world risk: the vector is local (AV:L) and requires a precise, high-complexity timing race (AC:H / AT:P), only the sync list path is affected (async/streaming and extraction paths are not implicated by the advisory), the PoC demonstrates the condition specifically on Node.js 22 or >= 25.1.0, and a mismatched truncation boundary typically yields a parse error (strict mode) or a skipped entry rather than a clean leak. Not exploitable against default remote/unauthenticated usage.

Impact

This is a genuine but low-priority issue whose signals are largely consistent in pointing to limited real-world risk. The input CVSS 4.0 vector (AV:L/AC:H/AT:P/PR:L/UI:P) describes a local, high-complexity attack with a present attack requirement (AT:P), partial privileges, and passive user interaction - i.e. an attacker must win a tight timing race on the same host, which the GHSA advisory confirms: the file must be truncated precisely between the stat() size read and the moment the parser reaches that entry. EPSS reinforces this, at 0.13% (3rd percentile), indicating very low predicted exploitation despite a publicly available PoC. There is NO CISA KEV listing, so this is not confirmed as actively exploited. The confidentiality impact is real (VC:H - uninitialized process memory can leak passwords, env vars, or unrelated file contents), but exploitation is probabilistic and non-deterministic even for a local attacker. No SSVC decision data was provided in the input. Net: a confirmed information-disclosure bug with a real PoC, but high attack complexity, local-only vector, and very low EPSS make this a patch-on-normal-cycle item rather than an emergency - the main nuance is that the affected library (npm/tar) is ubiquitous, so the installed base is enormous even though the vulnerable code path (.list with sync:true under a concurrent truncation race) is narrow.

Exploit ScenarioDerived

A local attacker (or malicious/compromised co-located process) repeatedly rewrites and truncates a tar archive on disk while a victim Node.js process calls tar.t({sync:true}) to list/read that archive's entries. By shrinking the file at a header/body block boundary in the race window between the size stat and the parser read, the attacker causes node-tar to emit uninitialized heap memory as entry data, leaking process secrets. A working two-script PoC (producer that truncates in a loop, consumer that lists and dumps non-zero bytes) is published in the GHSA advisory.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.1% exploitation probability (EPSS)

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

Alert me

AnalysisAIv1 – Oct 07, 2026

node-tar 7.5.1 can leak uninitialized process memory into the caller's data stream when the synchronous listing API .t() / .list() is used with { sync: true } and the tar file on disk is truncated to a smaller size mid-read. A local attacker (or any concurrent process with write access to the archive) must win a narrow race window between the initial size lookup and the parser's read of a truncated 512-byte block boundary, after which the parser can hand back bytes of stale heap memory - potentially unrelated file contents, environment variables, or credentials - instead of tar entry data. Real-world risk is limited: the vector is local (CVSS:3.1/AV:L/AC:H/PR:L/UI:R, CVSS 4.0 base 6.1), EPSS is only 0.13% (3rd percentile), the vulnerability is not in CISA KEV, and a publicly available proof-of-concept reproducer exists in the GitHub advisory (GHSA-29xp-372q-xqph) targeting Node.js 22 or >= 25.1.0; the issue is fixed in 7.5.2.

RemediationAI

Vendor-released patch: 7.5.2 - upgrade the tar package to 7.5.2 or later (for example npm install tar@^7.5.2, then npm audit fix or a lockfile overrides/resolutions entry for any transitive dependency pinned at 7.5.1). The fix is delivered via PR https://github.com/isaacs/node-tar/pull/446 and commit https://github.com/isaacs/node-tar/commit/5e1a8e638600d3c3a2969b4de6a6ec44fa8d74c9, which replaces the unsafe allocate-then-read sequence with a size-checked read; the vendor advisory is https://github.com/isaacs/node-tar/security/advisories/GHSA-29xp-372q-xqph. If immediate upgrade is not possible, the most effective compensating control is to stop using the affected code path: call the asynchronous/streaming listing API (.t() / .list() without { sync: true }) instead of the synchronous variant - the trade-off is that callers must restructure synchronous control flow into callbacks or promises, which is not always feasible in CLI startup logic. A second option is to eliminate the race precondition by ensuring tar files are not writable by other local processes while they are parsed (read from an immutable artifact store, a copied snapshot, or a directory with restrictive write permissions), accepting the operational cost of staging archives and the limitation that this depends on filesystem permissions being correctly enforced. Note that a mismatched truncation boundary typically causes a strict: true parse error or a skipped entry rather than a leak, so no additional input-validation workaround is required beyond upgrading or removing the sync read path.

Affected Packages

npm tar fix: 7.5.2

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in npm

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

Technical ContextAI · show details

The root cause is a classic time-of-check/time-of-use race condition (CWE-362) introduced by a refactor of the synchronous tar listing code path in src/list.ts. The vulnerable flow opens the archive, calls fs.fstatSync(fd) to obtain the file size, allocates a destination buffer sized to that stat result, and then performs a single positional fs.readSync() into it. If a concurrent process truncates the file between the fstatSync measurement and the readSync completion, the read returns fewer bytes than the buffer length, and because the buffer was obtained from Buffer.allocUnsafe() it retains whatever data previously occupied that heap region. Tar archives are organized in 512-byte header/body blocks, so a truncation that lands precisely on a header/body boundary leaves a partial block whose tail is uninitialized heap memory that the parser can misinterpret as legitimate entry content; a truncation at any other offset usually produces a malformed record that triggers a parse error (strict: true) or a skipped entry rather than a clean disclosure. The advisory notes this behavior is a regression from commit 5330eb04 and that only the synchronous list path (.t() / .list() with { sync: true }) is affected - asynchronous/streaming read and extraction code paths do not execute the same allocate-then-read sequence. The affected component is the npm package tar (CPE npm/tar) at exactly version 7.5.1, a library that is very widely consumed directly and as a transitive dependency in Node.js build and packaging toolchains; the reported PoC was demonstrated on Node.js 22 and >= 25.1.0. Note that the supplied CVSS 4.0 vector (VC:H/SC:H/SI:H/SA:H) and the independent CVSS 3.1 assessment (S:U, C:H/I:L/A:L) both agree that confidentiality loss is the dominant impact, with only low integrity and availability effects.

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) PRIMARY 6.1 MEDIUM
CVSS:4.0/AV:L/AC:H/AT:P/PR:L/UI:P/VC:H/VI:L/VA:L/SC:H/SI:H/SA:H
vuln.today AI 5.5 MEDIUM

Local-only timing race gives AV:L/AC:H; a co-located writer with filesystem access warrants PR:L and the dependent sync-list call maps to UI:R; memory disclosure drives C:H with minor I/A.

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

Primary rating from Vendor (github).

CVSS VectorVendor: github

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

DescriptionCVE.org

node-tar is a Tar for Node.js. In 7.5.1, using .t (aka .list) with { sync: true } to read tar entry contents returns uninitialized memory contents if tar file was changed on disk to a smaller size while being read. This vulnerability is fixed in 7.5.2.

Threat Intelligence Overview

EPSS Score
0.1%
Top 97% exploitable
Prevalence
Ubiquitous
npm/tar is a foundational Node.js package used by npm itself and countless tools
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 MEDIUM
CISA KEV No
Public POC No
EPSS 0.1%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.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
Defer
Exploitation· derived
None
System Exposure· derived
Small
Automatable· derived
No
Human Impact· derived
Medium

Priority Score

30
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +30
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.

Race conditions occur when multiple concurrent requests exploit the brief time gap between checking a condition and acting upon it (TOCTOU - Time of Check, Time of Use).

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-2013-4660 MEDIUM POC
6.8 Jun 28

The JS-YAML module before 2.0.5 for Node.js parses input without properly considering the unsafe !!js/function tag, whic

Vendor StatusVendor

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