CVE-2026-31802
Medium · 5.5CVSS
5.5
EPSS
0.2%
Published
Mar 10, 2026
CISA due date
—
Cloudanix analysis
A malicious archive could cause affected software to overwrite files outside the folder where it was supposed to unpack them.
- Exploitation
- Requires User Interaction
- Attacker needs
- None
- Complexity
- Low
- Impact
- Data Tampering
- Component
- Library
- Class
- Path Traversal
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Prior to node-tar 7.5.11, tar archive extraction can mishandle Windows drive-relative symlink targets such as `C:../../../target.txt`. During normal `tar.x()` extraction, a malicious archive can create a symbolic link that resolves outside the intended extraction directory. Subsequent extraction steps may then write through that symlink and overwrite files outside the configured working directory. The primary impact is integrity compromise of files reachable by the extracting process; confidentiality and availability impact are not the main characteristics of this flaw.
Why it matters to the business
Applications, build systems, developer tools, CI/CD jobs, package processing services, or automation that extract untrusted tar archives with vulnerable versions of the npm `tar` package could overwrite files outside the intended extraction area. This can corrupt application files, alter configuration, poison build artifacts, or potentially set up further compromise if sensitive executable or configuration files are overwritten. The current EPSS is low and the vulnerability is not in CISA KEV, but it should still be prioritized where archives come from users, third parties, package registries, or automated supply-chain workflows.
How an attack unfolds
An attacker prepares a tar archive containing a specially crafted symbolic link whose target uses a drive-relative path form, for example `C:../../../target.txt`. The vulnerable extraction logic treats the path as acceptable during extraction, allowing the symlink to point outside the destination directory. The attacker then includes additional archive entries that write through or interact with that symlink. When a vulnerable application or build process calls `tar.x()` on the archive, files outside the extraction directory may be overwritten with attacker-controlled content. Practical impact depends on the privileges of the extracting process and which filesystem paths are reachable.
How to fix it
Upgrade the npm `tar` package to version 7.5.11 or later wherever it is used directly or transitively. Regenerate lockfiles after upgrading and verify that deployed artifacts do not still include vulnerable nested copies. If immediate upgrade is not possible, avoid extracting untrusted tar archives, disable or reject symlink entries during extraction where feasible, extract archives inside a tightly permissioned temporary sandbox, run extraction with the least-privileged account possible, and validate archive entries before extraction. On Windows or cross-platform systems, specifically reject symlink targets that use drive-relative traversal patterns such as `C:../` or `C:../../../`.
How to confirm the fix worked
Confirm dependency resolution shows `tar` version 7.5.11 or later in package manifests and lockfiles, including transitive dependency trees using tools such as `npm ls tar`, software composition analysis, or SBOM inspection. Validate runtime/container images as well as source repositories, because vulnerable copies may remain in built artifacts. Where feasible, run a controlled regression test using a tar archive containing a drive-relative symlink target and verify extraction does not create or overwrite files outside the intended directory. Confirm archive extraction runs with restricted filesystem permissions and that symlink-containing archives are rejected or safely handled if mitigation controls are used.
Typical attack path
- Identify an application, service, developer workflow, or CI/CD process that extracts tar archives using npm `tar` before 7.5.11.
- Submit or introduce a malicious tar archive to that workflow, such as through upload, import, dependency ingestion, artifact processing, or build automation.
- Include a symbolic link entry with a Windows drive-relative traversal target such as `C:../../../target.txt`.
- Include follow-on archive entries intended to write attacker-controlled content through the symlink or into paths outside the extraction directory.
- Wait for the vulnerable process to run `tar.x()` and extract the archive.
- Achieve overwrite of files outside the intended extraction directory, potentially modifying configuration, source files, build outputs, or other files writable by the extraction process.
How to detect it
Look for evidence that untrusted tar archives were processed by applications or build workflows using vulnerable npm `tar` versions before 7.5.11. Relevant sources include application upload/import logs, CI/CD job logs, artifact processing logs, endpoint file creation/modification telemetry, EDR events, filesystem audit logs, and records of extracted archive contents. Hunt for tar archives containing symbolic link entries whose link target begins with a Windows drive-relative prefix followed by traversal, such as `C:../` or another drive letter with `../`. Review file modification events occurring immediately after archive extraction, especially writes outside expected temporary extraction directories. In CI/CD environments, compare modified files and build outputs around archive extraction events for unexpected changes to configuration files, scripts, package manifests, lockfiles, startup files, or generated artifacts. No public exploitation or named threat actors are currently identified from the provided data, so detection should focus on suspicious archive structure and unauthorized file overwrites rather than actor-specific infrastructure.
- C:../../../
- C:../../
- C:../
- D:../../../
- D:../../
- D:../
- E:../../../
- E:../../
- E:../
- tar.x(
- node_modules/tar/package.json
- "tar": "7.5.10"
- "tar": "7.5.9"
- "tar": "7.5.8"
What your security team should do
- Inventory all applications, build jobs, developer tools, and services that use the npm `tar` package or extract tar archives from untrusted sources.
- Upgrade `tar` to 7.5.11 or later and rebuild/redeploy affected applications and container images.
- Prioritize internet-facing upload/import features, package ingestion systems, artifact processors, and CI/CD pipelines that process third-party archives.
- Search dependency lockfiles and SBOMs for vulnerable `tar` versions prior to 7.5.11, including transitive dependencies.
- Add archive-validation controls that reject symlinks with drive-relative or traversal-like targets before extraction.
- Run extraction workloads with least privilege in disposable directories or containers so file overwrite impact is contained.
- Review recent archive-processing activity for suspicious symlink targets or unexpected file modifications outside extraction directories.
- Add tests to ensure future archive handling cannot write outside the intended destination directory.
The record
node-tar is a full-featured Tar for Node.js. Prior to version 7.5.11, tar (npm) can be tricked into creating a symlink that points outside the extraction directory by using a drive-relative symlink target such as C:../../../target.txt, which enables file overwrite outside cwd during normal tar.x() extraction. This vulnerability is fixed in 7.5.11.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| npm | tar | 0 | 7.5.11 |
| Chainguard | actions-runner | 0 | 2.332.0-r2 |
| Chainguard | graalvm-25-ce-nodejs | 0 | 25.0.2-r5 |
| Chainguard | kibana-8.17 | 0 | 8.17.10-r13 |
| Chainguard | kibana-8.17-bitnami | 0 | 8.17.10-r13 |
| Chainguard | kibana-8.17-iamguarded | 0 | 8.17.10-r13 |
| Chainguard | kibana-8.18 | 0 | 8.18.8-r11 |
| Chainguard | kibana-8.18-bitnami | 0 | 8.18.8-r11 |
| Chainguard | kibana-8.18-iamguarded | 0 | 8.18.8-r11 |
| Chainguard | kibana-9.0 | 0 | 9.0.8-r14 |
| Chainguard | kibana-9.0-bitnami | 0 | 9.0.8-r14 |
| Chainguard | kibana-9.0-iamguarded | 0 | 9.0.8-r14 |
| Chainguard | kibana-9.1 | 0 | 9.1.10-r7 |
| Chainguard | kibana-9.1-iamguarded | 0 | 9.1.10-r7 |
| Chainguard | kibana-9.2 | 0 | 9.2.6-r1 |
| Chainguard | kibana-9.2-iamguarded | 0 | 9.2.6-r1 |
| Chainguard | kibana-9.3 | 0 | 9.3.1-r1 |
| Chainguard | kibana-9.3-iamguarded | 0 | 9.3.1-r1 |
| Chainguard | kubeflow-centraldashboard | 0 | 1.10.0-r15 |
| Chainguard | lerna | 0 | 9.0.7-r1 |
| Chainguard | node-gyp | 0 | 12.2.0-r2 |
| Chainguard | opensearch-dashboards-2 | 0 | 2.19.4-r15 |
| Chainguard | opensearch-dashboards-2-fips | 0 | 2.19.5-r1 |
| Chainguard | opensearch-dashboards-3-fips | 0 | 3.5.0-r4 |
| Chainguard | opensearch-dashboards-3-fips-alerting-dashboards-plugin | 0 | 3.5.0-r4 |
| Chainguard | opensearch-dashboards-3-fips-anomaly-detection-dashboards-plugin | 0 | 3.5.0-r4 |
| Chainguard | opensearch-dashboards-3-fips-dashboards-maps | 0 | 3.5.0-r4 |
| Chainguard | opensearch-dashboards-3-fips-dashboards-notifications | 0 | 3.5.0-r4 |
| Chainguard | opensearch-dashboards-3-fips-dashboards-observability | 0 | 3.5.0-r4 |
| Chainguard | opensearch-dashboards-3-fips-dashboards-query-workbench | 0 | 3.5.0-r4 |
| Chainguard | opensearch-dashboards-3-fips-dashboards-reporting | 0 | 3.5.0-r4 |
| Chainguard | opensearch-dashboards-3-fips-dashboards-search-relevance | 0 | 3.5.0-r4 |
| Chainguard | opensearch-dashboards-3-fips-index-management-dashboards-plugin | 0 | 3.5.0-r4 |
| Chainguard | opensearch-dashboards-3-fips-ml-commons-dashboards | 0 | 3.5.0-r4 |
| Chainguard | opensearch-dashboards-3-fips-security-analytics-dashboards-plugin | 0 | 3.5.0-r4 |
| Chainguard | opensearch-dashboards-3-fips-security-dashboards-plugin | 0 | 3.5.0-r4 |
| Chainguard | pulumi-language-nodejs | 0 | 3.224.0-r2 |
| Chainguard | renovate | 0 | 43.77.8-r1 |
| Chainguard | sqlpad | 0 | 7.5.7-r13 |
| Chainguard | tileserver-gl | 0 | 5.5.0-r8 |
| Chainguard | tileserver-gl-fips | 0 | 5.5.0-r9 |
| Wolfi | kubeflow-centraldashboard | 0 | 1.10.0-r15 |
| Wolfi | lerna | 0 | 9.0.7-r1 |
| Wolfi | node-gyp | 0 | 12.2.0-r2 |
| Wolfi | opensearch-dashboards-2 | 0 | 2.19.4-r15 |
| Wolfi | pulumi-language-nodejs | 0 | 3.224.0-r2 |
| Wolfi | renovate | 0 | 43.77.8-r1 |
| Wolfi | sqlpad | 0 | 7.5.7-r13 |
| Wolfi | tileserver-gl | 0 | 5.5.0-r8 |
Related vulnerabilities
- GHSA-9ppj-qmqm-q256 node-tar Symlink Path Traversal via Drive-Relative Linkpath Same vulnerability
- CVE-2026-53655 node-tar is a full-featured Tar for Node.js. Also affects tar
- GHSA-vmf3-w455-68vh node-tar applies PAX size override to intermediary GNU long-name/long-link headers… Also affects tar
- CVE-2026-29786 node-tar is a full-featured Tar for Node.js. Also affects tar
- GHSA-qffp-2rhf-9h96 tar has Hardlink Path Traversal via Drive-Relative Linkpath Also affects tar
- CVE-2026-26960 node-tar is a full-featured Tar for Node.js. Also affects tar
- GHSA-83g3-92jg-28cx Arbitrary File Read/Write via Hardlink Target Escape Through Symlink Chain in node-tar… Also affects tar
- GHSA-34x7-hfp2-rc4v node-tar Vulnerable to Arbitrary File Creation/Overwrite via Hardlink Path Traversal Also affects tar