CVE-2025-69874: nanotar Path Traversal Vulnerability in parseTar() and parseTarGzip()

nanotar Updated 11 Feb 2026

Summary

11/02/2026
No i
Moderate
6.9

CVE-2025-69874: nanotar is vulnerable to path traversal in parseTar() and parseTarGzip(). Affects nanotar versions < 0.2.0. No fix is published. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

nanotar is an npm package designed for handling tar and gzip file formats, allowing users to extract and manipulate archived files efficiently. It is widely used in various applications for its simplicity and effectiveness in managing compressed data. However, a significant security flaw has been identified in versions up to 0.2.0, which exposes users to potential risks from maliciously crafted tar archives.

Vulnerability Detail

The vulnerability in nanotar arises from improper validation of file paths during the extraction process in the parseTar() and parseTarGzip() functions. This flaw allows remote attackers to exploit path traversal sequences, enabling them to write arbitrary files outside the intended extraction directory. As a result, an attacker could potentially overwrite critical system files or introduce malicious files into the system, leading to severe security breaches.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

As a temporary workaround, users can implement input validation to sanitize file paths before processing tar archives. This can be done by checking for path traversal sequences (like '../') and rejecting any files that attempt to exploit this vulnerability.

Conclusion

The path traversal vulnerability in nanotar poses a significant risk to users, allowing attackers to exploit the package for malicious purposes. It is essential to update to the latest version to safeguard against potential threats. Implementing additional input validation can also help mitigate risks until an update is applied.

See every vulnerability recorded for nanotar →

Share this vulnerability

FAQ

A path traversal vulnerability allows an attacker to access files and directories that are stored outside the intended directory, potentially leading to unauthorized file access or modification.

You can check if your application is affected by using the Vulert playground at Vulert Scanner, which allows you to monitor and alert for open-source vulnerabilities in your software without requiring any installation.

If exploited, this vulnerability could allow attackers to overwrite critical files, introduce malicious content, or compromise the integrity of the system, leading to data loss or unauthorized access.

Yes, users should update to a version of nanotar higher than 0.2.0 to ensure they are protected against this vulnerability.

The CVSS score of this vulnerability is 6.9, indicating a moderate level of risk.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback