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-2025-13462

CVE-2025-13462: Python tarfile Module Parsing Vulnerability

CVE-2025-13462 is a parsing flaw in Python's tarfile module where crafted archives can be misinterpreted during AREGTYPE normalization. This article covers technical details, affected versions, and mitigation.

Published: March 13, 2026

CVE-2025-13462 Overview

A vulnerability has been identified in Python's tarfile module where improper normalization of AREGTYPE (\\x00) blocks to DIRTYPE occurs during the processing of multi-block members such as GNUTYPE_LONGNAME or GNUTYPE_LONGLINK. This input validation flaw could allow a crafted tar archive to be misinterpreted by the tarfile module compared to other tar implementations, potentially leading to inconsistent file handling behavior.

Critical Impact

Crafted tar archives may be processed differently by Python's tarfile module compared to other implementations, potentially enabling archive manipulation attacks or extraction to unintended locations.

Affected Products

  • Python tarfile module (CPython)

Discovery Timeline

  • 2026-03-12 - CVE CVE-2025-13462 published to NVD
  • 2026-03-12 - Last updated in NVD database

Technical Details for CVE-2025-13462

Vulnerability Analysis

This vulnerability stems from improper input validation (CWE-20) in Python's tarfile module. The issue occurs when the module processes tar archives containing multi-block extended header entries, specifically GNUTYPE_LONGNAME (used for filenames exceeding 100 characters) and GNUTYPE_LONGLINK (used for long symlink targets). During this processing, the module incorrectly applies normalization of AREGTYPE (\\x00) blocks to DIRTYPE, even when it should not do so within the context of multi-block member handling.

This behavioral inconsistency means that a specially crafted tar archive could be interpreted differently by Python's tarfile module compared to GNU tar, BSD tar, or other tar implementations. Such discrepancies can be leveraged in security-sensitive contexts where multiple systems process the same archive with different behaviors.

Root Cause

The root cause lies in the block type normalization logic within the tarfile module. When parsing tar archive headers, the module normalizes AREGTYPE (represented by a null byte \\x00) to REGTYPE for regular files. However, this normalization continues to apply during multi-block member processing (such as GNU extended headers), where the block type semantics differ. The normalization logic fails to account for the stateful nature of multi-block parsing, leading to incorrect type assignments.

Attack Vector

This vulnerability requires local access to exploit. An attacker would need to craft a malicious tar archive containing specific block sequences that exploit the normalization inconsistency. The attack vector involves:

  1. Creating a tar archive with GNUTYPE_LONGNAME or GNUTYPE_LONGLINK extended headers
  2. Including continuation blocks with AREGTYPE (\\x00) type bytes that get incorrectly normalized
  3. Targeting applications that use Python's tarfile module for archive extraction or inspection

The vulnerability mechanism involves crafting tar archives where continuation blocks within GNU extended header sequences contain null type bytes. When processed by Python's tarfile module, these blocks are incorrectly normalized to DIRTYPE, potentially causing path handling inconsistencies. See the GitHub Issue Discussion for technical details on the parsing behavior.

Detection Methods for CVE-2025-13462

Indicators of Compromise

  • Tar archives with unusually structured GNU extended headers containing GNUTYPE_LONGNAME or GNUTYPE_LONGLINK sequences
  • Extraction results that differ from expected archive contents when compared across different tar implementations
  • Applications using tarfile module exhibiting unexpected directory creation or file placement behavior

Detection Strategies

  • Implement archive validation using multiple tar implementations before processing with Python's tarfile module
  • Review application logs for unexpected file extraction paths or directory structures
  • Audit code that processes untrusted tar archives using the tarfile module
  • Compare extraction results between Python's tarfile and system tar for critical archives

Monitoring Recommendations

  • Monitor file system activity during tar extraction operations for unexpected directory creation
  • Implement integrity checks comparing expected vs. actual extraction results
  • Log all tar archive processing operations with archive metadata for forensic analysis
  • Alert on tar archives containing GNU extended headers from untrusted sources

How to Mitigate CVE-2025-13462

Immediate Actions Required

  • Review applications that process untrusted tar archives using Python's tarfile module
  • Consider using alternative tar parsing libraries or system tar commands for sensitive operations
  • Implement input validation on tar archives before processing
  • Apply the patch from the official Python repository once available in your Python version

Patch Information

The Python development team has addressed this vulnerability through a pull request. Organizations should monitor for the fix to be incorporated into official Python releases. For details, see the GitHub Pull Request and the Python Security Announcement.

Workarounds

  • Validate tar archives using system tar or alternative implementations before processing with Python
  • Implement allowlisting for expected archive structures when processing tar files
  • Use extraction filters (introduced in Python 3.12) to limit tarfile extraction behavior
  • Avoid processing untrusted tar archives with tarfile module in security-sensitive contexts

For applications requiring immediate mitigation, consider implementing pre-extraction validation:

bash
# Validate tar archive structure using GNU tar before Python processing
tar --list -f archive.tar > /dev/null 2>&1 && echo "Archive validated"

# Use extraction filters in Python 3.12+ for safer defaults
# tarfile.extract(filter='data') or tarfile.extract(filter='tar')

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

  • Vulnerability Details
  • TypeOther

  • Vendor/TechPython

  • SeverityLOW

  • CVSS Score2.0

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:4.0/AV:L/AC:H/AT:P/PR:L/UI:N/VC:N/VI:L/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
  • ConfidentialityHigh
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • CWE-20
  • Technical References
  • GitHub Issue Discussion

  • GitHub Pull Request

  • Python Security Announcement
  • Related CVEs
  • CVE-2021-23336: Python Web Cache Poisoning Vulnerability

  • CVE-2024-6923: CPython Email Header Injection Flaw

  • CVE-2020-26116: Python HTTP Client CRLF Injection Flaw

  • CVE-2020-15523: Python DLL Hijacking 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