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-140249

CVE-2026-140249: Path Traversal via Lexical Symlink Normalization in node-tar

Alon Barad
Alon Barad
Software Engineer

Dec 2, 2026·13 min read·3 visits

Executive Summary (TL;DR)

A path traversal flaw in node-tar (>= 7.5.5, < 8.0.0) allows attackers to create symbolic links pointing outside the target extraction directory via lexical path normalization bypasses. When downstream application logic reads from or writes to the extracted files, it follows the planted symlinks, resulting in arbitrary file read or modification. Upgrade to node-tar version 8.0.0 or later to resolve this issue.

CVE-2026-140249 (also tracked as GHSA-4pf9-5fpx-xmr6) is a path traversal and improper link resolution vulnerability in node-tar, the core tar archive manipulation library for Node.js. Affecting versions 7.5.5 through 7.5.24, the flaw resides in the symbolic link path validation routine executed during archive extraction via tar.x(). Because the library validates link targets using purely lexical string manipulation rather than filesystem-aware path resolution, an attacker can craft an archive containing chained symlinks or unnormalized path suffixes that bypass traversal checks. Although node-tar does not directly write archive payloads through escaping symlinks during the extraction phase, it allows the creation of symlinks inside the extraction directory that resolve to arbitrary locations on the host filesystem. Any subsequent read or write operation performed by the host application on the extracted directory tree follows these symlinks, leading to arbitrary file disclosure or overwrite within the privilege context of the Node.js process.

Vulnerability Overview

node-tar (published on npm as tar) is the standard archive extraction and creation utility for the Node.js ecosystem. It is deployed as a direct dependency in thousands of applications and serves as a foundational component in package managers (such as the npm CLI), build pipelines, serverless deployment systems, and content management frameworks. Because these tools frequently process untrusted archives uploaded by external users or fetched from remote registries, node-tar serves as a primary security boundary responsible for confining extracted filesystem objects to a designated working directory (cwd).

To enforce extraction confinement, node-tar implements path sanitization routines within its Unpack parser class (src/unpack.ts). When extracting an archive via tar.x(), the parser inspects every entry's header fields—specifically the entry path and, for symbolic and hard links, the target linkpath—to prevent directory traversal attacks. If a symbolic link target attempts to traverse above the root of the extraction directory using dot-dot (..) segments, node-tar is designed to emit a TAR_ENTRY_ERROR warning and abort the creation of that link.

In node-tar versions 7.5.5 through 7.5.24, this verification mechanism contains a flaw classified under CWE-22 (Improper Limitation of a Pathname to a Restricted Directory) and CWE-59 (Improper Link Resolution Before File Access). The validation routine relies strictly on POSIX lexical string normalization (path.posix.normalize and path.posix.join) to calculate whether a relative linkpath escapes the extraction root. By comparing paths strictly as text strings without accounting for how the operating system kernel resolves intermediate symbolic links or trailing dot segments on disk, the check fails to detect multiple escape primitives.

Consequently, an unauthenticated attacker who can supply a crafted tarball to an application using a vulnerable version of node-tar can plant symbolic links inside the extraction directory that point to arbitrary files on the underlying filesystem. While node-tar itself contains internal protections that prevent subsequent entries within the same tarball from writing directly through an extracted symlink, the library leaves the escaping symlink intact on disk. When the calling application later iterates over the extracted files to read configuration data, modify assets, or move files, the operating system follows the planted symlink, resulting in unauthorized file disclosure or arbitrary file overwrite.

Root Cause Analysis

The root cause of CVE-2026-140249 is a semantic divergence between lexical path normalization in user space and physical pathname resolution in the operating system kernel. In src/unpack.ts, the method Unpack[STRIPABSOLUTEPATH] attempts to determine if a symlink's linkpath escapes the extraction root by joining the directory name of the entry (path.posix.dirname(entry.path)) with the normalized target (parts.join('/')) and passing the result to path.posix.normalize(). If the resulting string does not start with '../' and is not equal to '..', the check passes.

The first failure mode in this design is Intermediate Symlink Cancellation. In lexical path normalization, a named segment followed immediately by a parent directory reference (e.g., s1/..) is mathematically cancelled out and removed from the string. Therefore, when evaluating a symlink at the root of the archive named esc with a linkpath of s1/../outside.txt, path.posix.normalize(path.posix.join('.', 's1/../outside.txt')) collapses s1/.. and returns 'outside.txt'. Because 'outside.txt' does not start with '../', node-tar approves the link. However, if the archive also extracts s1 as a symbolic link pointing to . (or if s1 is a nested symlink pointing to ..), the OS kernel does not cancel s1/.. lexically. Instead, the kernel resolves s1 to its target directory first, and then applies ../outside.txt relative to that resolved location, climbing out of the extraction root.

The second failure mode is an Unnormalized Entry Path Base caused by trailing dot segments (/. or /./) in the archive entry's path header. When an attacker defines a symlink entry with path set to 'esc/.' and linkpath set to '../outside.txt', node-tar computes the base directory by calling path.posix.dirname('esc/.'), which returns 'esc'. Next, it evaluates path.posix.normalize(path.posix.join('esc', '../outside.txt')), which cancels out 'esc/..' and evaluates to 'outside.txt', passing validation. When node-tar subsequently invokes the filesystem call to create the symlink at 'esc/.', the operating system strips the trailing /. and creates the symlink directly at <cwd>/esc (at the root of the extraction directory, not inside a subdirectory named esc). Its target '../outside.txt' then resolves relative to <cwd>, escaping one level above the extraction directory.

The third failure mode involves Backslash Path Separators on POSIX Systems. If an archive contains a directory entry named 'A\B' and a symlink at 'esc' with a linkpath of 'A\B/../../outside.txt', the validation logic converts backslashes to forward slashes before splitting the linkpath into segments (['A', 'B', '..', '..', 'outside.txt']). During the lexical check, A/B/../.. cancels out entirely, evaluating to 'outside.txt' and passing validation. On a non-Windows (POSIX) filesystem, however, 'A\B' is treated as a single directory name containing a literal backslash rather than a two-level directory hierarchy. When the kernel resolves 'A\B/../../outside.txt' on disk, it enters the single directory 'A\B', applies the first '..' to return to <cwd>, and applies the second '..' to escape into the parent directory of <cwd>.

Code Analysis

Prior to the fix, the path validation logic in src/unpack.ts processed symbolic link targets inside the [STRIPABSOLUTEPATH] symbol method. Once absolute roots were stripped and backslashes were replaced with forward slashes, the code executed a basic join and normalize check against entry.path.

// Vulnerable code in src/unpack.ts (node-tar >= 7.5.5, < 8.0.0)
const [root, stripped] = stripAbsolutePath(p)
if (root) {
  entry[field] = stripped
  this.warn('TAR_ENTRY_INFO', `stripping ${root} from ${field}`, {
    entry,
    [field]: p,
  })
}
 
const parts = stripped.replaceAll('\\', '/').split('/')
if (parts.includes('..')) {
  if (field === 'path' || entry.type === 'Link') {
    this.warn('TAR_ENTRY_ERROR', `${field} contains '..'`, {
      entry,
      [field]: p,
    })
    return false
  }
  // VULNERABILITY 1 & 2: entry.path is not normalized before dirname(),
  // and '..' segments appearing after named path portions are collapsed by normalize().
  const entryDir = path.posix.dirname(entry.path)
  const resolved = path.posix.normalize(
    path.posix.join(entryDir, parts.join('/')),
  )
  if (resolved.startsWith('../') || resolved === '..') {
    this.warn(
      'TAR_ENTRY_ERROR',
      `${field} escapes extraction directory`,
      {
        entry,
        [field]: p,
      },
    )
    return false
  }
}

In commit 23b368128b6cf7d4c26f2e302c0e4a82f70a6e3d, the maintainer addressed these bypasses by introducing two invariant checks prior to computing the lexical resolution. First, the patch scans the split parts array of the linkpath to find the index of the first named segment (any segment that is not '..', '.', or an empty string ''). If any '..' segment appears after that index (parts.includes('..', firstName)), the link is immediately rejected.

File: src/unpack.ts
@@ -279,7 +279,23 @@ export class Unpack extends Parser {
       // Resolve linkpath relative to the entry's directory.
       // `path.posix` is safe to use because we're operating on
       // tar paths, not a filesystem.
-      const entryDir = path.posix.dirname(entry.path)
+      // A '..' is only safe at the start of the target. Any named
+      // part before it can be a symlink, and then the '..' goes to
+      // the parent of that symlink's target.
+      const firstName = parts.findIndex(
+        part => part !== '..' && part !== '.' && part !== '',
+      )
+      if (firstName !== -1 && parts.includes('..', firstName)) {
+        this.warn(
+          'TAR_ENTRY_ERROR',
+          `${field} contains '..' after a path portion`,
+          { entry, [field]: p },
+        )
+        return false
+      }
+      // Normalize the path, so that the directory is the one where
+      // the link is created. The path 'x/.' creates the link 'x'.
+      const entryDir = path.posix.dirname(path.posix.normalize(entry.path))
       const resolved = path.posix.normalize(
         path.posix.join(entryDir, parts.join('/')),
       )

Second, the patch wraps entry.path in path.posix.normalize() before passing it to path.posix.dirname(). This ensures that an entry path like 'esc/.' or 'a/esc/.' is normalized to 'esc' or 'a/esc' first, so dirname() accurately returns '.' or 'a'—matching the actual directory where the symlink will reside on disk.

An evaluation of fix completeness shows that restricting '..' strictly to leading segments of a linkpath effectively eliminates all three attack vectors simultaneously. Because no named directory segment is allowed to precede a '..' segment inside linkpath, an attacker cannot traverse through an intermediate symlink (s1/../outside.txt) and cannot abuse backslash directory names (A\B/../../outside.txt), as both patterns require a named component before '..'. Furthermore, because leading '..' segments only traverse upward through the ancestor directories of the symlink itself, and node-tar already prevents directory paths along an entry's ancestor chain from traversing outside cwd (unless preservePaths is explicitly enabled), lexical normalization of leading '..' segments against dirname(normalize(entry.path)) accurately reflects the maximum depth available inside the extraction tree.

Exploitation

Exploiting CVE-2026-140249 requires an attacker to supply a crafted tar archive to a target service or user tool that extracts the archive using node-tar with default security settings (preservePaths: false, unlink: false). No special authentication or elevated host privileges are required to craft the archive, though the post-extraction impact depends entirely on how the host application interacts with the extracted files.

The official test suite committed alongside the patch (test/symlink-linkpath-escape.test.ts) demonstrates six distinct archive layouts capable of planting escaping symlinks in vulnerable versions (>= 7.5.5, < 8.0.0). Because node-tar validates each entry sequentially without inspecting the disk for symlink targets of other entries, the order of entries in the tarball does not restrict exploitation; the helper symlink can appear either before or after the escaping symlink.

// Six bypass primitives adapted from test/symlink-linkpath-escape.test.ts
const link = (path: string, linkpath: string) => ({
  path,
  linkpath,
  type: 'SymbolicLink',
})
const dir = (path: string) => ({ path, type: 'Directory' })
 
const exploitScenarios = {
  // 1. '..' following an earlier symlink pointing to '.'
  dotDotAfterEarlierSymlink: [
    link('s1', '.'),
    link('esc', 's1/../outside.txt'),
  ],
 
  // 2. '..' following a symlink extracted later in the archive
  dotDotAfterLaterSymlink: [
    link('esc', 'x/y/../outside.txt'),
    dir('x'),
    link('x/y', '..'),
  ],
 
  // 3. '..' following a nested directory symlink
  dotDotAfterNestedSymlink: [
    dir('a'),
    link('a/b', '../x'),
    link('a/esc', 'b/../../outside.txt'),
  ],
 
  // 4. Entry path ending in '/.' at the archive root
  entryPathEndingInDot: [
    link('esc/.', '../outside.txt'),
  ],
 
  // 5. Nested entry path ending in '/.'
  nestedEntryPathEndingInDot: [
    dir('a'),
    link('a/esc/.', '../../outside.txt'),
  ],
 
  // 6. Backslash in directory name on POSIX filesystems
  backslashDirectoryName: [
    dir('A\\B'),
    link('esc', 'A\\B/../../outside.txt'),
  ],
}

To achieve arbitrary file write or file disclosure in an end-to-end scenario, the attacker names the escaping symlink (esc) after a predictable file that the target application reads or modifies after extraction (for example, package.json, index.html, or an output log file). When tar.x({ file: 'exploit.tar', cwd: '/app/uploads/extracted' }) completes, /app/uploads/extracted/esc exists on disk as a symlink pointing to s1/../../etc/passwd or s1/../../app/server.js. When the application subsequently calls fs.readFileSync('/app/uploads/extracted/esc') and returns the content in an HTTP response or build log, the contents of the external target file are disclosed. Similarly, if the application calls fs.writeFileSync('/app/uploads/extracted/esc', data) to stamp metadata or compile assets, it overwrites the target file outside the extraction directory.

Impact Assessment

The security impact of CVE-2026-140249 is rated High with a CVSS v4.0 base score of 7.2 (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). The Attack Vector is Network (AV:N) and Attack Complexity is Low (AC:L), reflecting that tar archives are routinely accepted over network interfaces via web uploads, API endpoints, and automated CI/CD artifact fetchers, and that constructing the malicious tar headers is deterministic and requires no timing or race condition exploitation. User Interaction is scored as Passive (UI:P) where a service or user must initiate extraction of the archive.

The primary impact falls on Vulnerable System Integrity (VI:H). In automated deployment systems, plugin installers, or document processing pipelines that modify extracted files in place, an attacker can overwrite critical application source code, configuration files, or user-level startup scripts (such as .bashrc or ~/.ssh/authorized_keys). Overwriting executable scripts or application modules directly escalates the flaw into Remote Code Execution (RCE) within the security context of the Node.js runtime user.

Confidentiality (VC:L) and Availability (VA:L) are rated Low in the baseline CVSS v4.0 vector because arbitrary file read and denial of service depend on the host application's post-extraction behavior. If the application serves extracted files back to the user (such as a static site hosting platform or an archive preview utility), an attacker can achieve high-impact data exfiltration by reading sensitive host files like /etc/shadow, environment variables (/proc/self/environ), or application credentials. If the application writes to the extracted symlink, an attacker can corrupt critical system or application binaries to induce a denial of service.

As of December 2, 2026, the Exploit Prediction Scoring System (EPSS) assigns CVE-2026-140249 a score of 0.00942 (0.94% probability of exploitation within 30 days), placing it in the 62.07th percentile. The vulnerability is not currently listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. However, because functional Proof-of-Concept (PoC) exploit vectors are publicly documented in the node-tar repository's unit tests, downstream projects that expose node-tar extraction to untrusted inputs face an immediate exploitation risk.

Remediation

The primary remediation for CVE-2026-140249 is to upgrade node-tar (tar) to version 8.0.0 or later. Version 8.0.0 incorporates commit 23b368128b6cf7d4c26f2e302c0e4a82f70a6e3d, which rejects any symbolic link whose target contains '..' after a named path segment and normalizes entry.path prior to calculating relative directory depth.

# Upgrade tar to the latest patched version (8.0.0+)
npm install tar@^8.0.0
 
# Audit the dependency tree for transitive vulnerable versions (>= 7.5.5 < 8.0.0)
npm ls tar

> [!NOTE] > Because node-tar is a major transitive dependency across the Node.js ecosystem, upgrading top-level packages may not immediately update nested dependencies pinned to the 7.x release line. If transitive dependencies require tar@7.x, use the overrides field in package.json (or resolutions in Yarn) to force resolution to ^8.0.0 where API compatibility permits.

For environments where an immediate upgrade to node-tar 8.0.0 is blocked by breaking changes in the v8 major release, developers can implement an application-level workaround using the filter callback option in tar.x(). This filter intercepts every archive entry prior to extraction and allows the application to replicate the patch's validation logic or block symbolic links altogether when extracting untrusted archives.

const tar = require('tar')
const path = require('node:path')
 
await tar.x({
  file: 'untrusted-archive.tar',
  cwd: '/path/to/extraction/root',
  filter: (entryPath, entry) => {
    // Option A: Completely disallow symbolic and hard links in untrusted archives
    if (entry.type === 'SymbolicLink' || entry.type === 'Link') {
      return false
    }
 
    // Option B: Replicate the CVE-2026-140249 patch validation logic for SymbolicLinks
    if (entry.type === 'SymbolicLink' && entry.linkpath) {
      const parts = entry.linkpath.replaceAll('\\', '/').split('/')
      if (parts.includes('..')) {
        const firstName = parts.findIndex(
          p => p !== '..' && p !== '.' && p !== ''
        )
        if (firstName !== -1 && parts.includes('..', firstName)) {
          return false // Reject '..' appearing after a named path segment
        }
        const entryDir = path.posix.dirname(path.posix.normalize(entry.path))
        const resolved = path.posix.normalize(
          path.posix.join(entryDir, parts.join('/'))
        )
        if (resolved.startsWith('../') || resolved === '..') {
          return false // Reject link escaping extraction root
        }
      }
    }
    return true
  },
})

In addition to input filtering, applications that perform post-extraction filesystem operations on untrusted archives should verify that resolved file paths remain inside the intended extraction root using fs.realpathSync() before opening files for reading or writing, or pass the O_NOFOLLOW flag to low-level fs.open() calls where symbolic links are not expected.

Official Patches

isaacs (node-tar)node-tar v8.0.0 official release notes and patched package release
isaacs (node-tar)Official GitHub Repository Security Advisory (GHSA-4pf9-5fpx-xmr6)
isaacs (node-tar)Git commit 23b368128b6cf7d4c26f2e302c0e4a82f70a6e3d fixing symlink linkpath traversal

Fix Analysis (1)

Technical Appendix

CVSS Score
7.2/ 10
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
EPSS Probability
0.94%
Top 38% most exploited

Affected Systems

node-tar (npm package: tar) >= 7.5.5, < 8.0.0Node.js applications and build tools utilizing node-tar for archive extraction

Affected Versions Detail

Product
Affected Versions
Fixed Version
node-tar (tar)
isaacs
>= 7.5.5, < 8.0.08.0.0
AttributeDetail
Vulnerability TypePath Traversal & Improper Symlink Resolution (CWE-22 / CWE-59)
Affected Componentnode-tar (src/unpack.ts) >= 7.5.5, < 8.0.0
Attack VectorNetwork / Crafted Tar Archive Extraction (tar.x)
CVSS v4.0 Score7.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)
EPSS Score0.94% (62.07th Percentile)
ImpactArbitrary File Overwrite and Arbitrary File Disclosure via Planted Symlinks
Exploit StatusProof of Concept (PoC) Available in Official Test Suite
Patched Versionnode-tar 8.0.0

MITRE ATT&CK Mapping

T1083File and Directory Discovery
Discovery
T1005Data from Local System
Collection
CWE-22
Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

The software uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the software does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.

Known Exploits & Detection

GitHub (Official Fix Commit & Regression Test Suite)Official commit containing test/symlink-linkpath-escape.test.ts, which provides six functional PoC archive layouts demonstrating symlink escape via lexical normalization bypass.

Vulnerability Timeline

Initial development of benchmarking and security test suites for the node-tar v8 redesign.
2026-11-26
Fix commit 23b368128b6cf7d4c26f2e302c0e4a82f70a6e3d authored and merged into isaacs/node-tar to reject symlink targets that can leave the cwd.
2026-11-27
GitHub Security Advisory GHSA-4pf9-5fpx-xmr6 and CVE-2026-140249 published; node-tar v8.0.0 officially released.
2026-12-01
FIRST.org publishes initial EPSS telemetry for CVE-2026-140249 (Score: 0.00942, 62.07th percentile).
2026-12-02

References & Sources

  • [1]NVD - CVE-2026-140249 Detail
  • [2]CVE.org Record - CVE-2026-140249
  • [3]GitHub Advisory Database - GHSA-4pf9-5fpx-xmr6
  • [4]node-tar Repository Security Advisory - GHSA-4pf9-5fpx-xmr6
  • [5]Fix Commit 23b368128b6cf7d4c26f2e302c0e4a82f70a6e3d (isaacs/node-tar)
  • [6]node-tar v8.0.0 Release Notes
  • [7]CVEListV5 Official JSON Record for CVE-2026-140249

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

•about 1 hour ago•CVE-2026-140247
7.2

CVE-2026-140247: Lexical Path Validation Bypass and Symlink Escape in node-tar

CVE-2026-140247 (GHSA-gvrf-jx37-rjv5) is a high-severity path traversal and link resolution vulnerability in the npm tar package (node-tar) prior to version 8.0.0. The library validates symbolic link targets lexically rather than against the physical filesystem hierarchy, allowing specially crafted archives to create symlinks inside the extraction directory that resolve to arbitrary locations outside the extraction root.

Amit Schendel
Amit Schendel
5 views•11 min read
•about 3 hours ago•CVE-2026-140246
7.2

CVE-2026-140246: Symbolic Link Path Traversal via Backslash Separator Differential in node-tar

CVE-2026-140246 (GHSA-hqgx-p3r3-2cfg) is a path traversal and link-following vulnerability in the node-tar (tar) npm package prior to version 8.0.0. The defect stems from a semantic discrepancy in how backslash characters are processed during lexical path validation versus how they are resolved by POSIX filesystem kernels. By combining a directory containing a literal backslash with a symbolic link utilizing relative parent traversal sequences, an attacker can construct a tar archive that bypasses extraction containment checks and points to arbitrary files outside the target root directory on non-Windows hosts.

Amit Schendel
Amit Schendel
5 views•13 min read
•about 4 hours ago•CVE-2026-140245
7.2

CVE-2026-140245: Symlink Linkpath Containment Bypass via Trailing Dot Segments in node-tar

CVE-2026-140245 (GHSA-jmj2-9c5q-vw73) is a path traversal vulnerability (CWE-22) affecting versions 7.5.5 through 7.5.24 of the node-tar (tar) archive manipulation library for Node.js. A discrepancy between path evaluation during symlink containment validation and actual filesystem placement allows archives containing symbolic link entries with trailing dot segments (such as '/.' or '/./') to bypass directory boundary checks. When extracted under default configurations, these crafted entries create symbolic links pointing outside the designated extraction directory (cwd), establishing a primitive for arbitrary file overwrite or creation during subsequent extraction steps.

Alon Barad
Alon Barad
6 views•10 min read
•about 5 hours ago•CVE-2026-140244
7.2

CVE-2026-140244: Symlink Containment Bypass and Arbitrary File Read in node-tar

CVE-2026-140244 (GHSA-mhqm-9wj8-w7r4) is a symlink containment bypass vulnerability in node-tar prior to version 8.0.0. Because the archive unpacker validates symbolic link targets using purely lexical path normalization without accounting for intermediate archive-created symlinks, an attacker can craft a tar archive containing chained symlinks that resolve outside the extraction directory on the physical filesystem. Downstream applications that read, copy, serve, or re-archive the extracted directory tree follow these planted symlinks, resulting in arbitrary file read and information disclosure.

Amit Schendel
Amit Schendel
6 views•13 min read
•about 6 hours ago•CVE-2026-140242
7.1

CVE-2026-140242: Improper Input Validation in node-tar PAX Header Parser Causes Entry Loss and Denial of Service

CVE-2026-140242 (also tracked as GHSA-ph3c-p786-j4rp) is an input validation vulnerability (CWE-1284) in the node-tar package for Node.js, affecting versions >= 7.0.0 and < 7.5.24. The parser for POSIX.1-2001 Extended (PAX) header records fails to verify that the parsed value of the size attribute is a finite, safe integer. Supplying a PAX header record with a size value such as Infinity bypasses simple non-negative numerical checks via JavaScript unary coercion. This results in stream boundary corruption and entry loss during archive extraction, or an uncaught runtime exception and process termination when re-packing the archive.

Alon Barad
Alon Barad
7 views•11 min read
•about 7 hours ago•CVE-2026-140241
7.1

CVE-2026-140241: Uncaught Exception Denial of Service in node-tar via Zstandard Magic Header

CVE-2026-140241 is a Denial of Service (DoS) vulnerability in the node-tar archive manipulation library (npm package: tar) affecting versions 7.5.22 through 7.5.24. The defect stems from an uncaught synchronous exception thrown during the initialization of Zstandard (zstd) decompression on Node.js runtimes that lack native zstd bindings. An unauthenticated attacker can supply a 4-byte payload containing the zstd magic header (0x28 0xb5 0x2f 0xfd) to asynchronous listing or extraction APIs, causing the error to escape stream event handlers and terminate the Node.js process.

Alon Barad
Alon Barad
7 views•10 min read