Menu

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

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

DEV Community: cybersecurity·CVE Reports·about 6 hours ago
#ScQdR932
#devtocybersecurity#devto#dev#record#node
Long article (721 words) — no AI summary yet.
Reading 0:00
15s threshold

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

Vulnerability ID: CVE-2026-140238

CVSS Score: 7.2

Published: 2026-12-02

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.

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'.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.