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-45582

CVE-2025-45582: GNU Tar Path Traversal Vulnerability

CVE-2025-45582 is a path traversal vulnerability in GNU Tar through version 1.35 that allows attackers to overwrite critical files using crafted archives. This article covers the technical details, affected versions, and mitigation.

Updated: January 22, 2026

CVE-2025-45582 Overview

CVE-2025-45582 is a directory traversal vulnerability in GNU Tar through version 1.35 that allows attackers to overwrite arbitrary files using crafted TAR archives. This vulnerability exploits a two-step process involving symlinks to bypass the standard protection mechanism against path traversal attacks.

Critical Impact

Successful exploitation can lead to arbitrary file overwrites, potentially compromising SSH authentication keys, configuration files, or other sensitive system files through a symlink-based directory traversal attack.

Affected Products

  • GNU Tar through version 1.35
  • Server applications that automatically extract user-supplied TAR archives
  • Software installation processes using multiple tar xf operations in the same directory

Discovery Timeline

  • 2025-07-11 - CVE-2025-45582 published to NVD
  • 2025-11-02 - Last updated in NVD database

Technical Details for CVE-2025-45582

Vulnerability Analysis

This directory traversal vulnerability exploits a design limitation in GNU Tar's protection mechanism against path traversal attacks. While GNU Tar correctly blocks single archives containing ../ sequences in member names with the error "Member name contains '..'", it fails to account for a multi-archive attack scenario.

The vulnerability requires the victim to extract two specially crafted archives sequentially. The first archive contains a symlink pointing to a sensitive directory outside the extraction path (e.g., x -> ../../../../../home/victim/.ssh). The second archive contains a file that references the symlink name followed by a critical filename (e.g., x/authorized_keys).

When the second archive is extracted, GNU Tar follows the symlink created by the first archive and writes the malicious file to the target directory, effectively bypassing the traversal protection. This attack is particularly dangerous in automated environments where multiple archives are processed sequentially, such as package managers installing dependencies or CI/CD pipelines processing user-supplied tarballs.

Root Cause

The root cause lies in GNU Tar's path traversal protection mechanism only examining individual archive members in isolation. The security check for ../ sequences does not account for the cumulative effect of extracting multiple archives into the same directory, where symlinks from a previous extraction can be leveraged to escape the intended directory structure. This represents a violation of the principle of least privilege and defense in depth, as documented in CWE-24 (Path Traversal: '../filedir').

Attack Vector

The attack requires local access and user interaction, following this two-step exploitation process:

  1. First Archive Extraction: The attacker crafts a TAR archive containing a symlink that points to a sensitive directory using relative path traversal. For example, a symlink named x pointing to ../../../../../home/victim/.ssh.

  2. Second Archive Extraction: A second TAR archive contains a file with a relative path that begins with the symlink name. For example, x/authorized_keys containing the attacker's public key.

When the victim extracts both archives into the same directory (a common practice in automated systems), the second extraction follows the symlink and overwrites the target file. In the example above, this would inject an attacker-controlled SSH key into the victim's authorized_keys file, enabling unauthorized remote access.

This attack is especially effective against:

  • Server applications that automatically extract user-supplied archives
  • Package installation processes that extract multiple dependency tarballs
  • Build systems processing untrusted archive inputs

Detection Methods for CVE-2025-45582

Indicators of Compromise

  • Unexpected symlinks in extraction directories pointing outside the intended path
  • Modified sensitive files (e.g., .ssh/authorized_keys, configuration files) with timestamps correlating to TAR extraction operations
  • Log entries showing multiple sequential tar xf operations on untrusted archives

Detection Strategies

  • Monitor file system operations during TAR extraction for symlink creation pointing to directories outside the extraction path
  • Implement integrity monitoring on critical system files that could be targeted (SSH keys, configuration files, startup scripts)
  • Audit extraction directories for symlinks with ../ components in their target paths
  • Deploy file integrity monitoring tools to detect unexpected modifications to sensitive files

Monitoring Recommendations

  • Enable detailed logging for TAR extraction operations in automated systems
  • Implement real-time alerts for symlink creation in extraction directories
  • Monitor for unauthorized modifications to authentication credential files
  • Review package installation logs for evidence of multiple untrusted TAR extractions

How to Mitigate CVE-2025-45582

Immediate Actions Required

  • Audit systems running automated TAR extraction processes and implement isolation measures
  • Use the --one-top-level option when extracting untrusted archives to enforce extraction into a dedicated directory
  • Follow GNU Tar's security guidelines by using an empty directory for each tar xf operation
  • Consider using --no-overwrite-dir and --keep-old-files options to prevent overwrites

Patch Information

No official patch has been released at the time of publication. System administrators should consult the GNU Tar Bug Report and OpenWall OSS Security Discussion for the latest updates on remediation guidance. The GNU Tar Security Guidelines provide best practices for secure archive extraction.

Workarounds

  • Create a fresh, empty directory for each tar xf operation as recommended in the GNU Tar manual
  • Use the --one-top-level flag to force extraction into a new subdirectory
  • Validate archive contents with tar -tvf before extraction to inspect for suspicious symlinks
  • Implement sandboxing or containerization for processes that extract untrusted archives
bash
# Secure extraction configuration example
# Create isolated directory for each extraction
mkdir -p /tmp/safe_extract_$$
cd /tmp/safe_extract_$$

# Extract with protection options
tar --one-top-level --no-overwrite-dir -xf untrusted_archive.tar

# Verify no suspicious symlinks exist before processing
find . -type l -exec ls -la {} \;

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

  • Vulnerability Details
  • TypePath Traversal

  • Vendor/TechGnu Tar

  • SeverityMEDIUM

  • CVSS Score4.1

  • EPSS Probability0.05%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:C/C:N/I:L/A:L
  • Impact Assessment
  • ConfidentialityHigh
  • IntegrityLow
  • AvailabilityLow
  • CWE References
  • CWE-24
  • Technical References
  • GitHub Vulnerability Description

  • GNU Tar Bug Report

  • GNU Tar Official Page

  • GNU Tar Integrity Documentation

  • GNU Tar Security Guidelines

  • OpenWall OSS Security Discussion
  • Related CVEs
  • CVE-2023-39804: GNU Tar DOS Vulnerability in PAX Archive

  • CVE-2022-48303: GNU Tar Use-After-Free 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