CVE-2026-59871: node-tar Type Coercion DoS Vulnerability
node-tar, a popular Node.js library for handling tar archives, has a flaw in how it processes certain archive metadata. When a tar file contains paths or link targets that are purely numeric values, the library incorrectly converts them into JavaScript numbers instead of treating them as text. This conversion breaks downstream code that expects to work with file paths as strings, causing the application to crash with an uncaught error. The issue affects versions prior to 7.5.18 and has been patched in that release.
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-704
- Affected products
- 1 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.18, node-tar coerces all-digit PAX path and linkpath values in src/pax.ts to JavaScript numbers, causing downstream path handling such as normalizeWindowsPath(entry.path).split('/') to throw an uncaught TypeError. This issue is fixed in version 7.5.18.
4 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
CVE-2026-59871 stems from improper type coercion in node-tar's PAX header parsing logic (src/pax.ts). PAX (POSIX.1-2001 eXtended) headers in tar archives can contain metadata including path and linkpath fields. The vulnerable code converts all-digit values in these fields to JavaScript numbers, violating the expectation that entry.path remain a string. When normalizeWindowsPath() or similar path-handling functions attempt operations like .split('/') on a numeric value, a TypeError is thrown. This represents a Denial of Service vector where a maliciously crafted or accidentally malformed tar archive can crash any application using node-tar to extract its contents.
Business impact
Applications relying on node-tar for archive extraction—including build tools, package managers, deployment pipelines, and file-sharing services—face availability risk. A specially crafted tar file could trigger an unhandled exception, terminating the process and disrupting operations. Organizations heavily invested in Node.js-based infrastructure, CI/CD workflows, and containerized deployments may experience service interruptions. The impact is particularly acute in automated scenarios where tar extraction happens without human oversight or fallback mechanisms.
Affected systems
node-tar versions prior to 7.5.18 are vulnerable. The isaacs/tar package on npm is the primary distribution vector. Any Node.js application with a direct or transitive dependency on an affected node-tar version is at risk, particularly those processing untrusted or third-party tar archives. This includes npm itself and tools built on the Node.js ecosystem.
Exploitability
Exploitation requires only the ability to supply a tar archive to an application using vulnerable node-tar. No authentication or special privileges are needed; the attack is network-adjacent. An attacker could host a malicious tarball or inject one into a supply chain. However, weaponization requires awareness that a target uses node-tar and processing of untrusted archives—not a trivial precondition in all environments. The CVSS score of 5.3 reflects moderate exploitability with limited attack surface in some deployment models.
Remediation
Upgrade node-tar to version 7.5.18 or later. This is a straightforward patching scenario; verify the fix in the vendor advisory and update package.json and lock files accordingly. No workarounds are documented, making prompt patching the only remediation path. Organizations should prioritize this update in applications that extract archives from external sources or untrusted users.
Patch guidance
Update node-tar dependency to 7.5.18 or newer using npm update or manual version bump in package.json. Regenerate lock files (package-lock.json or yarn.lock) and redeploy affected services. For applications with pinned dependencies or monorepos, ensure all consuming packages are updated in sync. Test archive extraction workflows after patching to confirm normal operation. Verify the upgrade using npm list node-tar to confirm the installed version.
Detection guidance
Monitor logs for uncaught TypeErrors mentioning 'split' or path normalization during tar extraction. Review dependency trees for node-tar versions < 7.5.18 using npm ls or similar tools. Set up automated scanning in CI/CD pipelines (e.g., npm audit, Snyk) to flag vulnerable versions. Honeypot tar files with all-digit path entries can trigger the vulnerability in test environments to confirm exposure. Network-based detection is difficult without deep packet inspection into archive contents.
Why prioritize this
While the CVSS score is moderate (5.3), the ease of exploitation and widespread use of node-tar in the Node.js ecosystem warrant prompt attention. Outages are costly; however, this is not a data breach or privilege escalation risk. Prioritize based on whether your applications ingest untrusted archives and their operational criticality. Development and CI/CD systems handling third-party packages should be patched urgently; internal tools with controlled inputs can follow standard maintenance windows.
Risk score, explained
The CVSS 3.1 score of 5.3 (MEDIUM severity) reflects a network-accessible Denial of Service with low attack complexity and no user interaction required. The vector AV:N/AC:L/PR:N/UI:N indicates an unauthenticated attacker can trigger the flaw over the network. However, confidentiality and integrity are not impacted (C:N/I:N), and availability impact is localized (A:L), capping the score. The flaw is real and easily triggered but narrower in scope than critical code execution or data exfiltration vulnerabilities.
Frequently asked questions
Can this vulnerability lead to data theft or unauthorized access?
No. CVE-2026-59871 is a Denial of Service vulnerability. It causes applications to crash but does not expose sensitive data or enable privilege escalation. The threat model is availability disruption, not confidentiality or integrity breach.
Does every tar file trigger this flaw, or only specific ones?
Only tar files with PAX headers containing all-digit values in path or linkpath fields trigger the vulnerability. Many archives will not match this condition. An attacker would need to deliberately craft a malicious tarball or modify an existing one to exploit this.
What is the real-world impact if we delay patching?
If your application processes untrusted tar archives (e.g., user uploads, third-party dependencies), a crafted file could crash your service or pipeline, causing downtime. For internal-only archive handling with controlled inputs, the risk is lower but still present. Patching is low-risk and removes the vector entirely.
Are there any known public exploits or KEV list inclusion?
This vulnerability is not on the CISA Known Exploited Vulnerabilities (KEV) list as of the data cutoff. No public weaponized exploits are documented, but the simplicity of the flaw means exploitation is straightforward for anyone with knowledge of it. Treat it as exploitable in principle.
This analysis is based on CVE-2026-59871 public disclosure and the vendor advisory. Verify patch version numbers and affected product ranges directly with the isaacs/tar GitHub repository or npm package page before deployment. SEC.co makes no warranty regarding the completeness or applicability of this guidance to your environment. Always test patches in non-production before rollout. For real-time vulnerability updates and official vendor communications, consult the official node-tar security advisories. Source: NVD (public-domain), retrieved 2026-08-17. Analysis generated by SEC.co (claude-haiku-4-5).
Related vulnerabilities
- CVE-2026-46690MEDIUMunbounded_spsc Pointer Transmute OOB Read & Fake-Arc Drop Vulnerability
- CVE-2026-48140MEDIUMNI grpc-device Enum Cast DoS Vulnerability – CVSS 6.5
- CVE-2026-45685HIGHOpenTelemetry eBPF Instrumentation MongoDB Parser DoS (v0.1.0–0.8.x)
- CVE-2026-55076HIGHCoder OIDC Authentication Bypass and Account Takeover
- CVE-2026-53655MEDIUMNode-tar PAX Parser Differential Vulnerability
- CVE-2026-59873HIGHnode-tar Gzip Bomb Denial of Service (HIGH)
- CVE-2026-59874HIGHnode-tar Infinite Loop Denial of Service
- CVE-2016-20064MEDIUMWP Vault 0.8.6.6 Arbitrary File Read via Directory Traversal