The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
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
    • 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-2021-32610

CVE-2021-32610: PHP Archive Tar Path Traversal Vulnerability

CVE-2021-32610 is a path traversal vulnerability in PHP Archive Tar that allows symlinks to reference targets outside extracted archives. This article covers the technical details, affected versions, and mitigation.

Published: February 25, 2026

CVE-2021-32610 Overview

CVE-2021-32610 is a symlink path traversal vulnerability in PHP's Archive_Tar library prior to version 1.4.14. The vulnerability allows malicious tar archives containing symbolic links to reference and potentially overwrite files outside of the intended extraction directory. This is a distinct vulnerability from CVE-2020-36193, though both involve improper handling of symlinks during archive extraction.

Critical Impact

Attackers can craft malicious tar archives with symlinks pointing to sensitive files outside the extraction path, potentially leading to arbitrary file overwrite, sensitive data exposure, or code execution if critical system files are modified.

Affected Products

  • PHP Archive_Tar (versions prior to 1.4.14)
  • Debian Linux 9.0
  • Fedora 33, 34, and 35

Discovery Timeline

  • 2021-07-30 - CVE-2021-32610 published to NVD
  • 2024-11-21 - Last updated in NVD database

Technical Details for CVE-2021-32610

Vulnerability Analysis

The vulnerability exists in the Archive_Tar library's handling of symbolic links during tar archive extraction. When processing entries with typeflag == "2" (symbolic links), the library failed to properly validate that the symlink target remained within the intended extraction directory boundaries. An attacker could craft a tar archive containing a symlink that points to a location outside the extraction path, such as ../../../etc/passwd or absolute paths like /etc/shadow.

The root cause stems from insufficient path canonicalization and validation when resolving symbolic link destinations. The original implementation attempted to track directory depth but did not properly account for all traversal scenarios, including absolute paths and Windows-style paths containing colons.

Root Cause

The vulnerability is classified as CWE-59 (Improper Link Resolution Before File Access). The Archive/Tar.php file did not adequately verify that symbolic link targets remained within the extraction directory after path resolution. The flawed logic allowed specially crafted archives to escape directory boundaries through path traversal sequences.

Attack Vector

This is a local attack vector vulnerability requiring the victim to process a malicious tar archive. Attack scenarios include:

  1. A malicious archive uploaded to a web application that processes tar files (e.g., Drupal modules, CMS themes)
  2. Automated backup restoration processes that extract untrusted archives
  3. Package installation workflows that handle tar-based packages

The attacker requires local access or the ability to supply a malicious archive to a vulnerable application. No user interaction is required beyond the system processing the malicious file.

The security patch implements proper symlink validation by:

php
                            } elseif ($v_header['typeflag'] == "2") {
+                        if (!$p_symlinks) {
+                            $this->_warning('Symbolic links are not allowed. '
+                                . 'Unable to extract {'
+                                . $v_header['filename'] . '}'
+                            );
+                            return false;
+                        }
+                        $absolute_link = FALSE;
                         $link_depth = 0;
-                        foreach (explode("/", $v_header['filename']) as $dir) {
-                            if ($dir === "..") {
-                                $link_depth--;
-                            } elseif ($dir !== "" && $dir !== "." ) {
-                                $link_depth++;
-                            }
+                        if (strpos($v_header['link'], "/") === 0 || strpos($v_header['link'], ':') !== FALSE) {
+                          $absolute_link = TRUE;
                         }
-                        foreach (explode("/", $v_header['link']) as $dir){
-                            if ($link_depth <= 0) {
-                                break;
+                        else {
+                            $s_filename = preg_replace('@^' . preg_quote($p_path) . '@', "", $v_header['filename']);
+                            $s_linkname = str_replace('\\', '/', $v_header['link']);
+                            foreach (explode("/", $s_filename) as $dir) {
+                                if ($dir === "..") {
+                                    $link_depth--;

Source: GitHub Security Commit

Detection Methods for CVE-2021-32610

Indicators of Compromise

  • Tar archives containing symbolic links with ../ path traversal sequences
  • Symlinks pointing to absolute paths (starting with / or containing :)
  • Unexpected file modifications outside intended extraction directories
  • Web application logs showing extraction of archives with suspicious symlink entries

Detection Strategies

  • Monitor file system operations for symlink creation pointing outside application directories
  • Implement static analysis scanning for Archive_Tar versions prior to 1.4.14
  • Use software composition analysis (SCA) tools to identify vulnerable dependencies in PHP applications
  • Audit Drupal, PEAR-based applications, and other PHP projects for outdated Archive_Tar library usage

Monitoring Recommendations

  • Enable file integrity monitoring on critical system files and directories
  • Log and alert on tar extraction operations in production environments
  • Monitor for unexpected file permission changes following archive extraction
  • Implement application-level logging for archive processing operations

How to Mitigate CVE-2021-32610

Immediate Actions Required

  • Upgrade PHP Archive_Tar to version 1.4.14 or later immediately
  • Review and audit any archives processed by vulnerable systems
  • Check for unauthorized file modifications in sensitive directories
  • For Drupal installations, apply security update SA-CORE-2021-004

Patch Information

The vulnerability is fixed in Archive_Tar version 1.4.14. The patch adds proper validation for symbolic links, including:

  • Option to disable symlink extraction entirely via the $p_symlinks parameter
  • Detection and rejection of absolute symlink paths (paths starting with / or containing :)
  • Improved directory depth tracking to prevent traversal via relative paths
  • Proper handling of Windows-style path separators

Patches are available via:

  • GitHub Release 1.4.14
  • Debian LTS Security Notice
  • Fedora package updates for versions 33, 34, and 35

Workarounds

  • Disable symlink extraction if functionality is not required
  • Implement a validation layer that scans tar archives for symlinks before extraction
  • Run archive extraction in sandboxed environments with restricted file system access
  • Use chroot jails or containerization to limit the impact of symlink traversal attacks
bash
# Check Archive_Tar version in your PHP environment
composer show pear/archive_tar

# Update Archive_Tar to patched version
composer require pear/archive_tar:^1.4.14

# For Drupal installations, update core
composer update drupal/core --with-dependencies

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

  • Vulnerability Details
  • TypePath Traversal

  • Vendor/TechPhp Archive Tar

  • SeverityHIGH

  • CVSS Score7.1

  • EPSS Probability2.96%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • CWE-59
  • Technical References
  • GitHub Release Version 1.4.14

  • Debian LTS Security Notice

  • Fedora Package Announcement

  • Fedora Package Announcement

  • Fedora Package Announcement

  • Fedora Package Announcement

  • Drupal Security Advisory
  • Vendor Resources
  • GitHub Commit Update

  • GitHub Commit Update
  • Related CVEs
  • CVE-2020-28949: PHP Archive Tar Path Traversal Flaw

  • CVE-2020-36193: PHP Archive Tar Path Traversal Vulnerability

  • CVE-2020-28948: PHP Archive Tar Unserialization Vulnerability
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