MEDIUM 5.3

CVE-2026-59875: node-tar NUL Byte Denial of Service in PAX Headers

A vulnerability in node-tar, a popular Node.js library for reading and writing tar archives, allows an attacker to craft a malicious tar file that crashes applications processing it. The flaw stems from improper handling of special characters (NUL bytes) embedded in file path metadata within tar archives. When an affected version of node-tar encounters such an archive, the resulting error terminates the application unexpectedly, causing a denial of service. This impacts any Node.js application that extracts or processes untrusted tar files without additional validation.

Source data · NVD / CISA · public domain

CVSS
3.1 · 5.3 MEDIUM · CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
Weaknesses (CWE)
CWE-248
Affected products
0 configuration(s)
Published / Modified
2026-07-08 / 2026-07-10

NVD description (verbatim)

node-tar is a tar archive manipulation library for Node.js. Prior to 7.5.17, node-tar does not strip NUL bytes from PAX path and linkpath records in src/pax.ts, allowing a crafted archive with values to reach fs.lstat or fs.open and terminate the process with an uncaught exception. This issue is fixed in version 7.5.17.

4 reference(s) · View on NVD →

SEC.co analysis · AI-assisted, reviewed against source

Technical summary

CVE-2026-59875 is a denial-of-service vulnerability in node-tar versions prior to 7.5.17. The root cause is the failure to sanitize NUL bytes (\x00) from PAX (POSIX.1-2001 eXtended) header records, specifically in the path and linkpath fields handled in src/pax.ts. PAX headers are an extension mechanism within tar archives that allow metadata beyond the standard tar format. When malformed PAX records containing embedded NUL bytes are processed, they propagate unchecked into filesystem API calls (fs.lstat, fs.open), which reject the null-terminated strings and throw exceptions. The application lacks exception handling for this scenario, resulting in an unhandled exception and process termination. The vulnerability requires no authentication and exploits normal archive extraction workflows.

Business impact

Denial-of-service attacks against build pipelines, deployment automation, and package management workflows are the primary concern. Continuous integration systems that automatically extract and process tar archives (common in software distribution) become targets. An attacker can poison a dependency or supply chain artifact with a crafted tar archive, causing CI/CD failures and service disruption. While this does not expose data or grant code execution, persistent failures can delay releases and damage operational reliability. Organizations relying on automated extraction of untrusted archives face the highest risk.

Affected systems

Any Node.js application using node-tar library version prior to 7.5.17 is vulnerable. This includes indirect dependencies—applications need not directly import node-tar to be affected if it appears in the dependency tree. Package managers, build tools, container image builders, and software distribution systems that unpack tar archives are particularly common exposure points. The vulnerability does not depend on operating system or architecture; it affects all platforms running the vulnerable Node.js library.

Exploitability

Exploitation is straightforward and requires only the ability to supply a crafted tar archive to a vulnerable application. No special network privileges, authentication, or user interaction is needed. An attacker can inject a malicious tar file into supply chains, public repositories, or any distribution channel where archives are automatically extracted. The technical barrier to crafting a tar with malicious PAX headers is minimal, making this vulnerability accessible to adversaries with basic archive manipulation knowledge. The CVSS score of 5.3 (MEDIUM) reflects the availability impact limited to denial of service without confidentiality or integrity compromise.

Remediation

Immediate patching to node-tar 7.5.17 or later is the definitive remediation. The fix adds proper NUL byte stripping from PAX path and linkpath fields, preventing malformed data from reaching filesystem APIs. Organizations should audit their dependency trees to identify node-tar usage, including transitive dependencies via npm or yarn. After upgrading, applications should be restarted to load the patched library. No workarounds exist short of avoiding tar extraction from untrusted sources or implementing custom validation logic upstream.

Patch guidance

Verify your Node.js project's node-tar version via package.json or npm list. If the version is below 7.5.17, update immediately using npm update node-tar or yarn upgrade node-tar. For projects using lock files (package-lock.json or yarn.lock), regenerate these to ensure consistent patched versions across environments. Test the updated library in a staging environment before production rollout, particularly for CI/CD pipelines and automated extraction workflows. Verify against the official node-tar release notes and GitHub repository to confirm the patch version addresses CVE-2026-59875.

Detection guidance

Monitor for unhandled exceptions or uncaught errors in Node.js applications during tar archive processing, particularly crashes with stack traces referencing fs.lstat or fs.open from node-tar code paths. Review CI/CD logs for unexpected pipeline failures coinciding with archive extraction steps. Implement input validation on tar files prior to extraction—validate the integrity of PAX headers or reject archives with suspicious metadata. Network-level detection is difficult without deep inspection; focus on application-layer logging and alerting for abnormal tar processing behavior. Organizations handling untrusted archives should instrument their extraction workflows with enhanced logging.

Why prioritize this

While CVSS 5.3 indicates medium severity, prioritization should account for deployment context. Build automation and supply chain components warrant faster patching due to the ease of weaponizing crafted archives at scale. Public-facing services that accept user-uploaded tar files should be prioritized. Internal services with tightly controlled archive sources face lower immediate risk but should still patch within standard update cycles. The lack of KEV status suggests limited active exploitation in the wild currently, but the simplicity of attack makes this a proactive hardening priority rather than an emergency.

Risk score, explained

The CVSS 5.3 score reflects a network-accessible vulnerability with low attack complexity and no authentication, but limited impact scope (availability only—no data disclosure or privilege escalation). The vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L assigns moderate weight because availability impact is restricted to the affected application process. The score would be elevated if the vulnerability enabled remote code execution, privilege escalation, or data exfiltration. In contexts where service availability is critical (SLAs, production infrastructure), risk perception may exceed the numerical score.

Frequently asked questions

Does this vulnerability affect my application if I use a higher-level library that depends on node-tar?

Yes. If any direct or transitive dependency in your Node.js project uses node-tar, your application is vulnerable until all components are patched. Use npm audit or similar tools to identify indirect node-tar usage and ensure the entire dependency tree uses version 7.5.17 or later.

Can this vulnerability be exploited without direct access to the application?

Yes. Any mechanism that allows an attacker to supply a crafted tar archive to an application using vulnerable node-tar can trigger the exploit. This includes poisoning a repository, compromising a CDN, or injecting malicious archives into software supply chains. No privileged access is required.

What is the difference between this vulnerability and a normal crash?

The key difference is that this is a *reproducible, remotely-triggered denial of service*. A normal application crash is typically accidental or environment-specific; here, an attacker intentionally crafts an archive to force a crash. The vulnerability exists in the library code, not the deployment environment.

Is there any data loss or leakage associated with this vulnerability?

No. This vulnerability results only in application termination and denial of service. There is no data exposure, no unauthorized access, and no file corruption. The impact is strictly availability-focused.

This analysis is provided for informational purposes and reflects the state of publicly available information as of the publication date. The described vulnerability and its details are based on source data provided and should be verified against official vendor advisories and security bulletins. No guarantee is made regarding completeness or real-world exploit availability. Organizations should conduct their own risk assessments based on their specific deployment contexts and apply patches according to their change management policies. This explainer does not constitute professional security advice for any particular organization. Source: NVD (public-domain), retrieved 2026-08-17. Analysis generated by SEC.co (claude-haiku-4-5).