Join the Cyber Forum: Threat Intel on May 12, 2026 to learn how AI is reshaping threat defense.Join the Virtual Cyber Forum: Threat IntelRegister Now
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2025-59343

CVE-2025-59343: tar-fs Path Traversal Vulnerability

CVE-2025-59343 is a path traversal vulnerability in tar-fs that allows symlink validation bypass with predictable destination directories. This article covers the technical details, affected versions, and mitigation.

Published: April 1, 2026

CVE-2025-59343 Overview

CVE-2025-59343 is a path traversal vulnerability affecting tar-fs, a popular Node.js library that provides filesystem bindings for tar-stream. The vulnerability exists in versions prior to 3.1.1, 2.1.3, and 1.16.5, where symlink validation can be bypassed when the destination directory is predictable with a specific tarball structure. This flaw allows attackers to write files outside the intended extraction directory, potentially compromising system integrity.

Critical Impact

Attackers can bypass symlink validation to write arbitrary files outside the intended extraction directory, potentially overwriting critical system files or injecting malicious content into trusted locations.

Affected Products

  • tar-fs versions prior to 3.1.1 (3.x branch)
  • tar-fs versions prior to 2.1.4 (2.x branch)
  • tar-fs versions prior to 1.16.6 (1.x branch)

Discovery Timeline

  • 2025-09-24 - CVE-2025-59343 published to NVD
  • 2025-11-03 - Last updated in NVD database

Technical Details for CVE-2025-59343

Vulnerability Analysis

This path traversal vulnerability (CWE-22) stems from an incomplete check in the inCwd function that validates whether extracted files remain within the intended destination directory. The vulnerable code used a simple startsWith check which could be bypassed through carefully crafted directory paths. When processing a malicious tarball, an attacker could exploit this flaw to extract files to arbitrary locations on the filesystem, bypassing the library's intended security boundaries.

The vulnerability is exploitable over the network when applications process user-supplied tar archives. No authentication is required to exploit this vulnerability, making it particularly dangerous in scenarios where tar-fs is used to handle untrusted archive files.

Root Cause

The root cause lies in the inadequate path validation within the inCwd function. The original implementation checked if the destination path started with the current working directory string, but failed to account for edge cases where the path equals the current working directory exactly or where path separator boundaries aren't properly enforced. This allowed attackers to craft tarball entries that would pass the validation while actually targeting locations outside the intended directory.

Attack Vector

An attacker can exploit this vulnerability by crafting a malicious tarball containing specially constructed symlinks and file entries. When a vulnerable application extracts this tarball using tar-fs, the symlink validation bypass allows files to be written outside the intended extraction directory. This attack requires:

  1. The ability to supply a tar archive to a vulnerable application
  2. Knowledge of the predictable destination directory structure
  3. A tarball crafted with symlinks that exploit the validation flaw
javascript
// Security patch in index.js - expand check
// Source: https://github.com/mafintosh/tar-fs/commit/0bd54cdf06da2b7b5b95cd4b062c9f4e0a8c4e09
     }
 
     function inCwd (dst) {
-      return dst.startsWith(cwd)
+      return dst === cwd || dst.startsWith(cwd + path.sep)
     }
 
     function onfile () {

The patch addresses the vulnerability by ensuring that the destination path either exactly equals the working directory or properly starts with the working directory followed by a path separator, preventing directory traversal attacks.

Detection Methods for CVE-2025-59343

Indicators of Compromise

  • Unexpected file creation or modification outside designated extraction directories
  • Log entries showing tar extraction operations with suspicious path patterns containing ../ sequences
  • Files appearing in system directories that trace back to tar extraction operations
  • Symlinks in extraction directories pointing to sensitive system locations

Detection Strategies

  • Monitor tar extraction operations for paths that resolve outside intended destination directories
  • Implement file integrity monitoring on critical system directories to detect unauthorized modifications
  • Review application logs for tar-fs extraction activities with unusual destination paths
  • Scan deployed applications for vulnerable tar-fs versions using software composition analysis (SCA) tools

Monitoring Recommendations

  • Enable verbose logging for applications using tar-fs to capture extraction paths
  • Implement alerting for file system operations that create files in protected directories during tar extraction
  • Monitor npm audit results for tar-fs dependency vulnerabilities across your codebase

How to Mitigate CVE-2025-59343

Immediate Actions Required

  • Update tar-fs to version 3.1.1 or later (for 3.x branch users)
  • Update tar-fs to version 2.1.4 or later (for 2.x branch users)
  • Update tar-fs to version 1.16.6 or later (for 1.x branch users)
  • Audit applications that process untrusted tar archives for potential compromise

Patch Information

Security patches have been released across all supported branches of tar-fs. The fix modifies the inCwd function to properly validate that destination paths are contained within the intended working directory by checking for exact equality or ensuring the path starts with the working directory plus a path separator.

Patch details are available in the GitHub Commit Record. Additional information can be found in the GitHub Security Advisory and the Debian LTS Announcement.

Workarounds

  • Use the ignore option on non files/directories when extracting tar archives to prevent symlink-based attacks
  • Implement additional path validation in your application before using tar-fs extraction
  • Run tar extraction operations in isolated environments with restricted filesystem access
  • Avoid processing untrusted tar archives until patches can be applied
bash
# Configuration example
# Update tar-fs to patched version using npm
npm update tar-fs@latest

# Or specify exact patched version for your branch
npm install tar-fs@3.1.1  # For 3.x users
npm install tar-fs@2.1.4  # For 2.x users
npm install tar-fs@1.16.6 # For 1.x users

# Verify installed version
npm list tar-fs

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypePath Traversal

  • Vendor/TechTar Fs

  • SeverityHIGH

  • CVSS Score8.7

  • EPSS Probability0.03%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • CWE-22
  • Technical References
  • GitHub Commit Record

  • GitHub Security Advisory

  • Debian LTS Announcement
  • Related CVEs
  • CVE-2025-48387: tar-fs Path Traversal Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English