Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. tar
  4. ›
  5. CVE-2026-24842

CVE-2026-24842: node-tar Vulnerable to Arbitrary File Creation/Overwrite via Hardlink Path Traversal

January 28, 2026

node-tar contains a vulnerability where the security check for hardlink entries uses different path resolution semantics than the actual hardlink creation logic. This mismatch allows an attacker to craft a malicious TAR archive that bypasses path traversal protections and creates hardlinks to arbitrary files outside the extraction directory.

References

  • github.com/advisories/GHSA-34x7-hfp2-rc4v
  • github.com/isaacs/node-tar
  • github.com/isaacs/node-tar/commit/f4a7aa9bc3d717c987fdf1480ff7a64e87ffdb46
  • github.com/isaacs/node-tar/security/advisories/GHSA-34x7-hfp2-rc4v
  • nvd.nist.gov/vuln/detail/CVE-2026-24842

Code Behaviors & Features

Detect and mitigate CVE-2026-24842 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions before 7.5.7

Fixed versions

  • 7.5.7

Solution

Upgrade to version 7.5.7 or above.

Impact 8.2 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N

Learn more about CVSS

Weakness

  • CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
  • CWE-59: Improper Link Resolution Before File Access ('Link Following')

Source file

npm/tar/CVE-2026-24842.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:17:13 +0000.