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

CVE-2026-140238: PAX Extended Header Newline Injection and File Overwrite in node-tar

Alon Barad
Alon Barad
Software Engineer

Dec 2, 2026·14 min read·4 visits

Executive Summary (TL;DR)

An improper record framing flaw in node-tar (< 8.0.0) allows newline characters inside PAX extended header values to inject arbitrary metadata attributes like 'path'. This enables arbitrary file overwrites during archive extraction and can lead to Remote Code Execution on Windows systems during npm package installation by overwriting package.json postinstall scripts.

CVE-2026-140238 (GHSA-mpg7-vg3p-wc3m) is a high-severity parsing vulnerability in node-tar versions prior to 8.0.0. By splitting POSIX.1-2001 PAX extended header blocks on raw newline characters instead of enforcing byte-length framing prefixes, the parser allows unescaped newlines within metadata fields to inject forged PAX records. Attackers can override entry attributes such as file paths during extraction, enabling arbitrary file overwrites inside the destination directory and remote code execution on Windows via npm lifecycle script injection.

Vulnerability Overview

node-tar (published as tar on npm) is the standard archive manipulation library for the Node.js ecosystem. It serves as a core dependency for the npm CLI (@npmcli/arborist and pacote), build pipelines, and server-side file processing utilities that unpack .tar and .tgz archives. Because it processes untrusted archive inputs across package managers and web applications, its header parsing logic represents a critical security boundary.

In versions prior to 8.0.0, node-tar contains a framing desynchronization flaw when parsing POSIX.1-2001 PAX extended headers. Tracked as CVE-2026-140238 (and GHSA-mpg7-vg3p-wc3m), the vulnerability is classified under CWE-22 (Improper Limitation of a Pathname to a Restricted Directory) and CWE-93 (Improper Neutralization of CRLF Sequences). Instead of reading PAX key-value records according to their explicit decimal byte-length prefixes, the parser splits the entire header payload on newline (\n, 0x0A) delimiters.

This parser differential allows an attacker to embed a newline character followed by a crafted <length> <keyword>=<value> sequence inside any benign PAX attribute, such as a file comment or custom metadata field. When node-tar processes the header, it interprets the injected line as a distinct, subsequent PAX record. By injecting a forged path or linkpath attribute, the attacker overrides the authentic filename stored in the primary ustar header.

The impact depends on the extraction context. In applications that extract archives directly without path-stripping options, an attacker can overwrite arbitrary files within the extraction target directory. In the npm package installation context on Windows platforms, the interaction between injected path attributes and Windows path normalization during strip: 1 processing allows a malicious tarball to overwrite package.json and achieve Remote Code Execution (RCE) via scripts.postinstall lifecycle hooks.

Root Cause Analysis

To overcome the 100-byte filename limit and fixed metadata fields of legacy 512-byte ustar headers, the POSIX.1-2001 specification introduced PAX extended headers (identified by typeflag values 'x' for local extended headers and 'g' for global extended headers). A PAX extended header block consists of one or more concatenated key-value records formatted according to the following grammar:

"<length> <keyword>=<value>\n"

In this specification, <length> is a decimal integer string representing the total byte length of the record, including the <length> digits themselves, the space delimiter (0x20), the <keyword>, the equals sign (0x3D), the <value>, and the trailing newline (0x0A). Because POSIX explicitly permits <value> to contain arbitrary UTF-8 characters—including embedded newline characters—a compliant parser must determine record boundaries strictly by advancing a byte offset pointer by <length> bytes.

In node-tar versions prior to 8.0.0, the parseKV function in src/pax.ts disregarded byte-length framing when tokenizing records. Instead, it stripped the trailing newline and invoked .split('\n') on the decoded UTF-8 string before passing each resulting substring to parseKVLine. The source code even contained a developer comment (// XXX Values with \n in them will fail this. Refactor to not be a naive line-by-line parse.) acknowledging that embedded newlines were not handled according to specification.

When parseKVLine received each newline-split segment, it parsed the leading integer n using parseInt(line, 10) and verified whether n === Buffer.byteLength(line) + 1. While an outer record containing an injected newline fails this length check on its first fragment (because n reflects the combined length of the outer record or an arbitrary prefix, whereas line was truncated at the first \n), parseKVLine simply returned the accumulator object set without halting the parser. Execution then proceeded to the second line after the embedded newline.

Because the attacker controls the text immediately following the embedded newline, they can supply a self-consistent length prefix n that matches Buffer.byteLength(line) + 1 for the forged second line (for example, 24 path=forged-name.txt). parseKVLine validates the length of the injected fragment, extracts the key-value pair, and assigns set['path'] = 'forged-name.txt'. When ReadEntry initializes the file entry in src/read-entry.ts, it invokes this.#slurp(ex), merging the forged path attribute onto the entry object and replacing the original filename.

Compounding this primary framing flaw, node-tar exhibited three secondary metadata handling defects in src/read-entry.ts, src/header.ts, and src/parse.ts:

  1. Improper Precedence and Meta-Entry Slurping: ReadEntry applied local extended headers (ex) before global extended headers (gex), allowing global defaults to overwrite file-specific attributes, and applied pending extended headers to subsequent meta-entries rather than reserving them strictly for the next file entry.
  2. Post-Header Size Mutation: ReadEntry.#slurp allowed PAX properties to overwrite entry.size and entry.global after Header had already resolved the entry body byte length, creating stream synchronization discrepancies.
  3. Incomplete Null-Byte Truncation: The regular expression /\0.*/ used across src/header.ts, src/parse.ts, and src/pax.ts to strip trailing data after a null byte lacked the s (dotAll) regex flag. If a string contained a null byte followed by a newline character (\0...\ninjected), .replace(/\0.*/, '') halted matching at the newline, leaving characters after the newline intact.

Code Analysis

Commit f351e5b4a8916bc8c8f821d0ad926a17d26ea237 resolves the vulnerability by replacing the line-splitting logic in src/pax.ts with a byte-offset state machine and tightening metadata precedence in src/read-entry.ts.

PAX Record Framing (src/pax.ts)

In the vulnerable implementation, parseKV converted the PAX payload into an array of lines via .split('\n') and relied on parseKVLine to validate each line independently:

// VULNERABLE CODE (src/pax.ts prior to commit f351e5b4a8916bc8c8f821d0ad926a17d26ea237)
const parseKV = (str: string) =>
  str
    .replace(/\n$/, '')
    .split('\n')
    .reduce(parseKVLine, Object.create(null))
 
const parseKVLine = (
  set: Record<string, string | number | Date>,
  line: string,
) => {
  const n = parseInt(line, 10)
 
  // XXX Values with \n in them will fail this.
  // Refactor to not be a naive line-by-line parse.
  if (n !== Buffer.byteLength(line) + 1) {
    return set
  }
 
  line = line.slice((n + ' ').length)
  const kv = line.split('=')
  const r = kv.shift()
  if (!r) {
    return set
  }
  const k = r.replace(/^SCHILY\.(dev|ino|nlink)/, '$1')
  const v = kv.join('=').replace(/\0.*/, '')
  // ... attribute assignment ...

The patched implementation converts the input string into a Buffer and scans record boundaries using raw byte offsets (pos, sp, and end). It also enforces fail-fast termination (break) immediately upon encountering any malformed length prefix or missing trailing newline (0x0A), preventing desynchronized recovery into attacker-controlled bytes:

// PATCHED CODE (src/pax.ts in commit f351e5b4a8916bc8c8f821d0ad926a17d26ea237)
const SIMPLE_NUMBER = /^\d+$/
 
const parseKV = (str: string) => {
  const set: Record<string, string | number | Date> = Object.create(null)
  const buf = Buffer.from(str)
  let pos = 0
  while (pos < buf.length) {
    let sp = pos
    // 1. Scan ASCII decimal digits (0x30 '0' through 0x39 '9') for <len>
    while (
      sp < buf.length &&
      (buf[sp] as number) >= 0x30 &&
      (buf[sp] as number) <= 0x39
    ) {
      sp++
    }
    // 2. Require at least one digit followed immediately by ASCII space (0x20)
    if (sp === pos || buf[sp] !== 0x20) break
    const n = Number(buf.toString('ascii', pos, sp))
    const end = pos + n
    // 3. Validate record bounds and verify the final byte of the record is '\n' (0x0a)
    if (end <= sp + 1 || end > buf.length || buf[end - 1] !== 0x0a) break
    // 4. Pass the exact record body (which may safely contain '\n') to parseKVLine
    parseKVLine(set, buf.toString('utf8', sp + 1, end - 1))
    pos = end
  }
  return set
}

Inside parseKVLine, the patch removes the redundant length calculation, adds the /s (dotAll) flag to the null-byte sanitization regex (kv.join('=').replace(/\0.*/s, '')), validates date timestamps with !isNaN(d.getTime()), and enforces SIMPLE_NUMBER (/^^\d+$/) and Number.isSafeInteger(s) validation across all numeric fields (size, gid, uid, dev, ino, nlink, and mode).

Extended Header Application (src/read-entry.ts)

In src/read-entry.ts, the constructor and #slurp method were updated to enforce POSIX precedence rules and prevent extended headers from mutating meta-entries or body sizes:

// PATCHED CODE (src/read-entry.ts in commit f351e5b4a8916bc8c8f821d0ad926a17d26ea237)
    // Pending extended headers describe the next file entry, not a
    // meta entry. Apply global first, so that local values win.
    if (!this.meta) {
      if (gex) {
        this.#slurp(gex, true)
      }
      if (ex) {
        this.#slurp(ex)
      }
    }

And within ReadEntry.#slurp:

          // The Header already resolved size. It sets the body length.
          return !(
            v === null ||
            v === undefined ||
            k === 'size' ||
            k === 'global' ||
            (k === 'path' && gex) ||
            (k === 'linkpath' && gex)
          )

Null-Byte Regex Hardening (src/header.ts and src/parse.ts)

In src/header.ts (decString) and src/parse.ts (OldGnuLongPath and NextFileHasLongLinkpath handlers), all occurrences of .replace(/\0.*/, '') were updated to .replace(/\0.*/s, '') to ensure null-byte truncation removes all trailing bytes even when newline characters appear after the null terminator. Furthermore, in src/parse.ts, ex.path = ... and ex.linkpath = ... were changed to nullish coalescing assignments (ex.path ??= ... and ex.linkpath ??= ...) so that legacy GNU long-path headers cannot override an already-populated PAX extended header attribute.

Fix Completeness Assessment

The patch in f351e5b4a8916bc8c8f821d0ad926a17d26ea237 is complete with respect to PAX record framing and header precedence. By operating on a byte Buffer (Buffer.from(str)) rather than character indices or line delimiters, parseKV accurately accounts for multi-byte UTF-8 sequences and embedded 0x0A bytes, halting immediately if any record violates POSIX framing. In v8.0.0, node-tar also introduced a modernized Web Streams architecture (src/next/) utilizing byte-level Uint8Array processing, eliminating legacy stream buffering abstractions.

Exploitation

Exploitation of CVE-2026-140238 relies on creating a structural differential between how standard compliant tar implementations (or the PAX encoder itself) view an archive and how vulnerable versions of node-tar (< 8.0.0) parse it.

Crafting the Forged PAX Header

Consider a legitimate archive creation routine or an attacker-constructed .tar file where an arbitrary PAX metadata field (such as comment, or even a path field in a multi-record header) contains a newline character. If the attacker sets the comment attribute to:

x\n24 path=forged-name.txt

When encoded as a valid POSIX PAX record, the total byte length of the record "37 comment=x\n24 path=forged-name.txt\n" is 37 bytes:

  • "37 " (3 bytes)
  • "comment=" (8 bytes)
  • "x\n24 path=forged-name.txt" (25 bytes)
  • "\n" (1 byte)

A POSIX-compliant tar utility (such as GNU tar or BSD libarchive) reads the prefix 37, consumes the exact 37-byte span, assigns the entire value "x\n24 path=forged-name.txt" to the comment attribute, and extracts the subsequent file entry under its original ustar header filename (e.g., carrier.txt).

When a vulnerable version of node-tar processes the exact same 37-byte PAX payload:

  1. parseKV strips the final newline and splits on \n, producing two elements:
    • Element 0: "37 comment=x" (12 bytes)
    • Element 1: "24 path=forged-name.txt" (23 bytes)
  2. parseKVLine evaluates Element 0: n = 37, while Buffer.byteLength("37 comment=x") + 1 is 13. Because 37 !== 13, Element 0 is silently skipped.
  3. parseKVLine evaluates Element 1: n = 24, while Buffer.byteLength("24 path=forged-name.txt") + 1 is 24. Because 24 === 24, validation passes.
  4. parseKVLine parses path=forged-name.txt and populates ex.path = 'forged-name.txt'.
  5. When the following file entry (carrier.txt) is read, ReadEntry.#slurp(ex) overwrites entry.path with 'forged-name.txt', causing node-tar to extract the payload of carrier.txt directly to forged-name.txt.

Attack Vector 1: Arbitrary File Overwrite in Direct Extraction

Any Node.js service that inspects an uploaded archive using a compliant tool (or validates the primary ustar header names) and then extracts the archive using tar.extract({ file: 'archive.tar', cwd: '/target/dir' }) without strip options can be tricked into overwriting sensitive files inside /target/dir. While carrier.txt appears benign during pre-extraction inspection, node-tar writes its contents to the forged path specified after the newline.

Attack Vector 2: Windows npm Package Installation RCE

A critical real-world vector identified in the advisory affects the npm package manager running on Windows platforms. When npm installs a dependency tarball, it extracts the archive using node-tar with strip: 1 to remove the leading package/ directory prefix.

On POSIX systems, strip: 1 discards any entry whose resolved path does not contain a directory separator. On Windows, however, path separator normalization interacts with attacker-controlled PAX path values containing newline or special characters. By injecting a forged path via PAX newline desynchronization, an attacker can target the root package.json of the module being extracted.

By overwriting package.json during extraction with a file containing a scripts.postinstall entry, the attacker forces the npm CLI to execute arbitrary shell commands as soon as the extraction phase finishes.

Impact Assessment

CVE-2026-140238 carries a CVSS v4.0 base score of 7.2 (High) with the vector string 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.

Metric Breakdown

  • Attack Vector (AV:N) & Privileges Required (PR:N): The flaw is exploitable remotely over the network without authentication whenever an application or package manager processes an untrusted tar archive.
  • Attack Complexity (AC:L) & Attack Requirements (AT:N): Exploitation is deterministic and requires no special runtime conditions or race windows.
  • User Interaction (UI:P): Passive user interaction is required in scenarios where a developer or automated CI/CD runner installs a package or unpacks an archive.
  • Integrity Impact (VI:H): The primary technical impact is high integrity loss on the vulnerable system due to arbitrary file overwriting within the target extraction directory.
  • Confidentiality & Availability Impact (VC:L / VA:L): Overwriting application configuration or source files can lead to service disruption or localized information disclosure, escalating to full system compromise (RCE) when combined with npm lifecycle script execution on Windows.

Ecosystem Scope

Because node-tar is downloaded tens of millions of times per week and underpins the npm CLI toolchain, virtually all Node.js environments utilizing tar < 8.0.0 (including the entire 6.x and 7.x release lines up to 7.5.24) are affected if they process untrusted .tar or .tgz streams. As of publication, the vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog, and no standalone weaponized exploits have been indexed in public exploit databases beyond the official regression test suite.

Remediation

Upgrading to Patched Versions

The vulnerability is permanently fixed in node-tar (tar) version 8.0.0 via commit f351e5b4a8916bc8c8f821d0ad926a17d26ea237. Development and operations teams should upgrade direct dependencies immediately:

npm install tar@^8.0.0

> [!NOTE] > node-tar v8.0.0 introduces a major architectural update (src/next/) and requires Node.js >= 22. Ensure your runtime environment meets this engine requirement before upgrading.

Resolving Transitive Dependencies

If tar is included as a transitive dependency by build tools, bundlers, or package management libraries, force the resolution to ^8.0.0 using the overrides field in your project's package.json:

{
  "overrides": {
    "tar": "^8.0.0"
  }
}

For Yarn or pnpm workspaces, configure the equivalent resolutions or pnpm.overrides block and regenerate your lockfile.

Workarounds & Compensating Controls

In legacy environments constrained to Node.js versions prior to v22 where upgrading to tar@8.0.0 is not immediately feasible, apply the following compensating controls:

  1. Filter PAX Extended Header Entries: When extracting untrusted archives, inspect or reject archives containing PAX extended headers (typeflag 'x' or 'g'), or pre-validate the raw archive using a POSIX-compliant binary (such as system bsdtar or GNU tar) in an isolated container before processing with node-tar.
  2. Disable npm Lifecycle Scripts: When installing untrusted npm packages on Windows build agents or developer workstations, pass --ignore-scripts (or set ignore-scripts=true in .npmrc) to prevent overwritten package.json files from executing postinstall hooks.
  3. Enforce Custom Entry Filtering: Supply a strict filter: (path, entry) => boolean callback to tar.extract() that validates entry.path against an explicit allowlist of expected filenames and rejects unexpected top-level files like package.json.

Official Patches

GitHub / isaacs (node-tar)Official Repository Security Advisory (GHSA-mpg7-vg3p-wc3m)
GitHub / isaacs (node-tar)Fix Commit f351e5b4a8916bc8c8f821d0ad926a17d26ea237
GitHub / isaacs (node-tar)node-tar v8.0.0 Release Notes

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

Affected Systems

node-tar (npm package: tar) < 8.0.0Node.js applications extracting untrusted TAR/TGZ archives via node-tarnpm CLI package extraction pipelines on Windows platforms using vulnerable node-tar versions

Affected Versions Detail

Product
Affected Versions
Fixed Version
node-tar (tar)
Isaac Z. Schlueter (isaacs)
< 8.0.08.0.0
AttributeDetail
CVE / Advisory IDCVE-2026-140238 / GHSA-mpg7-vg3p-wc3m
CWE ClassificationCWE-22 (Path Traversal) / CWE-93 (CRLF Injection)
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)
Affected Componentnode-tar (tar) < 8.0.0 (src/pax.ts, src/read-entry.ts)
Patched Version8.0.0 (Commit f351e5b4a8916bc8c8f821d0ad926a17d26ea237)
Primary ImpactArbitrary File Overwrite & Windows npm Postinstall RCE
Exploit / KEV StatusPoC in Regression Tests / Not in CISA KEV

MITRE ATT&CK Mapping

T1083File and Directory Discovery
Discovery
T1005Data from Local System
Collection
T1059.007Command and Scripting Interpreter: JavaScript
Execution
T1546Event Triggered Execution
Persistence
CWE-22
Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

The software uses external input to construct a pathname that should be within a restricted directory, but it does not properly neutralize sequences or forged metadata attributes that resolve to an unexpected location.

Known Exploits & Detection

GitHub (Official Regression Test Suite)Regression tests in test/parse-differential.test.ts demonstrating PAX record newline injection overriding entry paths (e.g., 'x\n24 path=forged-name.txt' and 'é\n21 path=package.json\n').

Vulnerability Timeline

Initial patch commits authored in the node-tar repository.
2026-11-26
Fix commit f351e5b4a8916bc8c8f821d0ad926a17d26ea237 committed and node-tar v8.0.0 release prepared.
2026-11-27
GitHub Security Advisory GHSA-mpg7-vg3p-wc3m and CVE-2026-140238 published to CVE.org and NVD.
2026-12-01

References & Sources

  • [1]GitHub Security Advisory: GHSA-mpg7-vg3p-wc3m
  • [2]node-tar Repository Advisory: GHSA-mpg7-vg3p-wc3m
  • [3]Fix Commit f351e5b4a8916bc8c8f821d0ad926a17d26ea237 in isaacs/node-tar
  • [4]node-tar Release v8.0.0
  • [5]CVE.org Record: CVE-2026-140238
  • [6]NVD Vulnerability Detail: CVE-2026-140238
  • [7]CVEProject cvelistV5 Record for CVE-2026-140238

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-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
1 views•13 min read
•about 2 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
3 views•11 min read
•about 3 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
5 views•10 min read
•about 4 hours ago•CVE-2026-140240
7.1

CVE-2026-140240: Resource Exhaustion and Algorithmic Complexity Denial of Service in node-tar

CVE-2026-140240 (GHSA-7c32-79xj-j3jp) is a resource exhaustion and algorithmic complexity vulnerability in node-tar, the archive manipulation library for Node.js. In versions prior to 8.0.2, processing a small, crafted tar archive (approximately 20 KB) causes severe CPU degradation or triggers an Out-of-Memory (OOM) crash in the V8 JavaScript heap. The vulnerability stems from quadratic string allocation in asynchronous path reservation bookkeeping, unbounded depth and length validation on linkpath headers, memory retention leaks in reservation maps, and unbounded string caching in the Unicode normalization subsystem.

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

CVE-2026-140239: Global Extended Header linkpath Injection in node-tar

CVE-2026-140239 (GHSA-ffhw-4r4q-5cwv) is an improper input validation vulnerability in the node-tar npm package prior to version 8.0.0. An inconsistency between the Header and ReadEntry parsing classes allows an attacker to inject an arbitrary linkpath attribute into all subsequent archive entries via a PAX Global Extended Header (type 'g'). Because the Header class ignores the global linkpath while ReadEntry applies it, the parser's strict-mode integrity validation is bypassed, enabling downstream applications that inspect entry.linkpath to be manipulated into arbitrary file read or write operations outside the extraction directory.

Alon Barad
Alon Barad
7 views•12 min read
•about 7 hours ago•CVE-2026-140237
6.9

CVE-2026-140237: PAX Metadata-Body File Smuggling and Interpretation Conflict in node-tar

An interpretation conflict vulnerability in node-tar versions 7.0.0 prior to 8.0.0 allows attackers to smuggle arbitrary tar archive members inside POSIX extended header (PAX) metadata blocks. Because node-tar reapplied pending PAX size attributes onto subsequent metadata entries, an attacker can set a PAX size of zero to prematurely terminate metadata body consumption. When combined with multi-engine inspection and extraction pipelines, this parser desynchronization permits file smuggling that bypasses archive member allowlists, malware scanning, and security policy verification.

Amit Schendel
Amit Schendel
9 views•12 min read