CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-24842

Escape Artist: Breaking node-tar with Hardlink Path Traversal

Amit Schendel
Amit Schendel
Senior Security Researcher

Jan 28, 2026·6 min read·232 visits

Executive Summary (TL;DR)

Logic error in hardlink validation allows writing or linking files outside the destination folder. Affects node-tar < 7.5.7. Fixed by strictly forbidding '..' in link targets.

A critical logic flaw in node-tar, the de facto standard archive utility for the Node.js ecosystem, allows attackers to bypass path traversal protections using hardlinks. By exploiting a discrepancy between how link paths are validated versus how they are resolved by the operating system, a malicious TAR archive can create hardlinks to arbitrary files outside the extraction root. This affects millions of developers and pipelines relying on node-tar for package installation.

The Hook: The Foundation Cracks

If you work with Node.js, you use node-tar. You might not know it, but every time you type npm install, this library is the workhorse silently unpacking tarballs in the background. It is the plumbing of the JavaScript ecosystem. And when the plumbing leaks, the entire house gets wet.

CVE-2026-24842 isn't just a simple buffer overflow or a typo. It's a logic bug that exposes a fundamental misunderstanding of how file systems resolve paths. The vulnerability allows an attacker to craft a TAR archive that looks perfectly innocent to the security validator but behaves maliciously when handed off to the operating system.

Imagine a bouncer checking your ID at the club entrance (the validator). They check your address and say "You live nearby, come in." But once you're inside, you teleport to a different country. That's essentially what happens here. The validator calculates path safety based on one assumption, while the OS executes the file creation based on another.

The Flaw: A Matter of Perspective

The core of the issue lies in the discrepancy between intent and execution. When node-tar extracts a file, it generally tries to prevent "Path Traversal"—the classic attack where a file named ../../etc/passwd tries to escape the extraction directory. node-tar has checks for this. However, hardlinks (type: 'Link') introduce a layer of complexity.

When node-tar validated a hardlink entry, it resolved the target path relative to the entry's parent directory within the archive. For example, if you had an entry at a/b/c/link, and it pointed to ../../target, the validator calculated: extract_root/a/b/c/ + ../../target = extract_root/a/target. This looks safe. It stays inside the extraction root.

However, the fatal flaw was in the actual extraction step. node-tar used fs.linkSync(linkpath, entrypath). Crucially, when fs.link receives a relative path, the operating system resolves it relative to the Current Working Directory (CWD) of the process, NOT the directory of the file being created. So, that same ../../target string is passed directly to the OS, which walks up two directories from where the process is running, potentially escaping the sandbox entirely.

The Code: The Smoking Gun

The fix provided in commit f4a7aa9bc3d717c987fdf1480ff7a64e87ffdb46 is brutally simple, acknowledging that trying to be clever with path resolution is a losing game. Instead of trying to calculate where the link lands, the developers decided to nuke the problem from orbit.

The vulnerable code attempted to resolve paths intelligently. The patched code simply forbids relative traversals in links altogether.

// src/unpack.ts (The Fix)
 
// If the field is a path or the type is a Link (hardlink)
if (field === 'path' || type === 'Link') {
  // If the path contains '..', it is immediately rejected.
  // No complex math, no resolution attempts. Just NO.
  if (p.includes('..')) {
    this.warn('TAR_ENTRY_ERROR', `${field} contains '..'`, { entry });
    return false;
  }
}

This is a classic "defense in depth" shift. Rather than trusting the complex logic that ensures .. stays within bounds, node-tar now asserts that hardlinks in archives simply shouldn't be navigating up the directory tree at all. It removes the ambiguity that caused the vulnerability.

The Exploit: Climbing the Ladder

To exploit this, we need to trick the validator into thinking we are deep inside a directory structure so that it allows us to use .. segments. Then, we rely on the OS to interpret those .. segments relative to the root of the process.

Here is the recipe for disaster:

  1. Create a deep directory structure: Make an archive with a folder trap/level1/level2/level3/.
  2. Insert the Hardlink: Place a hardlink entry inside level3.
  3. Weaponize the Target: Set the link target to ../../../../../../etc/passwd.

The Validator's View: It sees the entry at trap/level1/level2/level3/. It sees the target ../../../../../../etc/passwd. It resolves this relative to level3. Mathematically, that might still look "contained" or at least confusing enough to bypass the check depending on the exact validation logic version.

The OS View: The process calls link("../../../../../../etc/passwd", "path/to/extract/trap/level1/level2/level3/link"). The OS ignores the destination path when resolving the source. It looks at the source string: ../../../../../../etc/passwd. If the node process is running in /home/user/app, this path walks up to root and grabs the shadow file (permissions permitting). You now have a hardlink to the system's password file inside your extraction folder.

The Impact: Filesystem Roulette

Why should you panic? Because hardlinks are bidirectional portals. If an attacker can create a hardlink to a sensitive file (like a config file or /etc/shadow), they gain a direct handle to that file on the host system.

Scenario 1: Information Disclosure The attacker extracts the malicious archive. The extraction creates a link named funny_pic.jpg that is actually a hardlink to config/database.yml. The application then processes or serves funny_pic.jpg to the user. The attacker downloads their own "image" and gets your database credentials.

Scenario 2: Integrity Violation The attacker links overwrite_me.txt to /usr/local/bin/startup_script.sh. Later in the extraction or in a subsequent request, the attacker writes data to overwrite_me.txt. Because it's a hardlink, the OS writes that data directly into startup_script.sh. The next time the server restarts, the attacker owns the box.

The Fix: Upgrade or Die

The only reliable way to fix this is to upgrade node-tar. The logic required to safely validate hardlinks without banning .. is notoriously difficult and prone to edge cases (as proven by the existence of this CVE).

Remediation Steps:

  1. Check your package-lock.json or yarn.lock for node-tar (often aliased simply as tar).
  2. Ensure the resolved version is 7.5.7 or higher.
  3. Run npm audit fix if applicable, or manually force the dependency update.

> [!NOTE] > If you cannot upgrade, you must ensure that your application creates a clean, empty sandbox directory for every extraction and strictly limits the file system permissions of the Node.js process. Do not run extraction as root.

Official Patches

node-tarCommit f4a7aa9 fixing the path traversal

Fix Analysis (1)

Technical Appendix

CVSS Score
8.2/ 10
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N
EPSS Probability
0.03%
Top 93% most exploited

Affected Systems

Node.js applications using `node-tar`npm CLI (potentially, via dependency)CI/CD pipelines extracting untrusted artifacts

Affected Versions Detail

Product
Affected Versions
Fixed Version
node-tar
isaacs
< 7.5.77.5.7
AttributeDetail
CWECWE-22 (Path Traversal)
Attack VectorLocal / Network (Archive Upload)
CVSS8.2 (High)
EPSS Score0.00027 (Low Probability)
ConfidentialityHigh (File Read)
IntegrityLow (File Overwrite)
Exploit StatusPoC Available

MITRE ATT&CK Mapping

T1559Inter-Process Communication
Execution
T1204User Execution
Execution
T1006Direct Volume Access
Defense Evasion
CWE-22
Path Traversal

Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

Known Exploits & Detection

GitHub AdvisoryTechnical description of the hardlink path traversal logic flaw

Vulnerability Timeline

Patch committed by maintainer
2026-01-27
CVE-2026-24842 Published
2026-01-28

References & Sources

  • [1]NVD - CVE-2026-24842
  • [2]GHSA-34x7-hfp2-rc4v Advisory

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•27 minutes ago•CVE-2026-59192
6.9

CVE-2026-59192: Unsafe Deserialization in CakePHP TwigView UtilsExtension

The cakephp/twig-view plugin integrates the Twig templating engine into the CakePHP framework. Prior to versions 1.3.3 and 2.1.2, the UtilsExtension class exposes PHP's native unserialize() function as a Twig filter without restricting allowed classes. When untrusted data is passed into the unserialize filter within a template, an attacker can trigger PHP Object Injection and execute Property-Oriented Programming (POP) gadget chains, leading to arbitrary code execution or data manipulation.

Alon Barad
Alon Barad
2 views•8 min read
•about 16 hours ago•CVE-2026-63402
5.9

CVE-2026-63402: Prototype-Chain Traversal and Shared Built-in Corruption in i18next

CVE-2026-63402 is a prototype-chain traversal and shared built-in object corruption vulnerability in the i18next internationalization framework for JavaScript prior to version 26.3.4. The flaw resides in the deepExtend utility function within src/utils.js, which uses the JavaScript 'in' operator to verify property existence on target objects. When an application passes untrusted resource bundles to i18next.addResourceBundle() with both the deep and overwrite parameters set to true, an attacker can traverse into inherited methods on Object.prototype and overwrite properties on shared built-in function objects, causing process-wide denial of service.

Amit Schendel
Amit Schendel
6 views•10 min read
•about 17 hours ago•CVE-2026-58262
7.1

CVE-2026-58262: BLS Signature Quorum Bypass via PubKeysBitmap Padding Bits in Klever-Go

CVE-2026-58262 (tracked internally as KLR-04 and via GitHub Security Advisory GHSA-f9h7-4mmq-vgcq) is a cryptographic verification and consensus quorum bypass vulnerability in Klever-Go (`klever-io/klever-go`), the Go implementation of the Klever blockchain protocol. Prior to version 1.7.20, the block header signature verification logic (`HeaderSigVerifier.verifyConsensusSize`) counts all set bits across the entire `PubKeysBitmap` byte slice toward the required two-thirds validator quorum without masking or validating unused trailing padding bits in the final byte. Because the underlying Boneh-Lynn-Shacham (BLS) multi-signature verification function (`blsMultiSigner.Verify`) iterates strictly over the indices of configured validator public keys, it ignores any bits set at indices beyond the active consensus group size. When the consensus group size is not an exact multiple of 8, a compromised or malicious block producer can set these unused trailing padding bits to artificially inflate the apparent signer count by up to 7 signatures, enabling blocks with fewer genuine validator signatures than required by the protocol to pass consensus validation.

Alon Barad
Alon Barad
3 views•14 min read
•about 18 hours ago•CVE-2026-77423
7.5

CVE-2026-77423: Regular Expression Denial of Service (ReDoS) in JLine Built-in Less Viewer

CVE-2026-77423 is a Regular Expression Denial of Service (ReDoS) vulnerability in the built-in less viewer of the JLine Java library (versions 3.0.0 prior to 3.30.15, and 4.0.0 prior to 4.3.1). The org.jline.builtins.Less class passes user-supplied search and display-filter patterns directly to Java's standard backtracking regular expression engine without complexity validation or execution timeouts. An attacker with access to an interactive JLine session can submit patterns containing nested quantifiers, causing catastrophic backtracking that consumes 100% of a CPU core and blocks the session thread indefinitely. In network-facing deployments such as SSH or Telnet administration consoles, repeated exploitation across concurrent sessions can exhaust bounded worker thread pools and result in a complete denial of service.

Alon Barad
Alon Barad
5 views•10 min read
•about 19 hours ago•CVE-2026-63492
8.1

CVE-2026-63492 (Duplicate of CVE-2026-63304): OS Command Injection in WWBN AVideo Standalone API

CVE-2026-63492 is a rejected CVE identifier originally assigned by GitHub for an OS command injection vulnerability in WWBN AVideo (formerly YouPHPTube) up to version 29.0. It was rejected as a duplicate of the canonical identifier CVE-2026-63304 (tracked under GHSA-j44m-77cc-p3cc). The flaw resides in the listFFmpegProcesses() function within plugin/API/standAlone/functions.php, which interpolates unsanitized user parameters directly into a single-quoted shell pipeline executed via PHP's exec() function. Attackers capable of crafting a valid AES-256-CBC encrypted API payload can break out of the single-quoted context and execute arbitrary operating system commands as the web-server user.

Amit Schendel
Amit Schendel
5 views•9 min read
•about 20 hours ago•CVE-2026-63476
4.3

CVE-2026-63476: Unbounded Memory Allocation and Denial of Service in isomorphic-git Packfile Delta Parser

CVE-2026-63476 is an uncontrolled resource consumption vulnerability in isomorphic-git prior to version 1.38.6. When parsing Git packfile delta objects during clone or fetch operations, the applyDelta utility reads an untrusted targetSize integer from the delta stream header and passes it directly to Buffer.alloc(). A malicious remote Git server or man-in-the-middle attacker can supply a delta header specifying a targetSize of approximately 2 GB with minimal actual payload data. Because Buffer.alloc() reserves off-heap memory in Node.js, this bypasses standard V8 heap limits and results in immediate out-of-memory termination or sustained memory retention.

Amit Schendel
Amit Schendel
5 views•10 min read