CVE-2025-13462

Description

A flaw was found in the tarfile module of cpython. This vulnerability allows a remote attacker to craft a malicious tar archive that, when processed, could be misinterpreted by the tarfile module. This misinterpretation occurs because the module incorrectly applies normalization of AREGTYPE blocks to DIRTYPE during the processing of multi-block members, such as GNUTYPE_LONGNAME or GNUTYPE_LONGLINK. The consequence is that the tarfile module may process the archive differently than intended, potentially leading to unexpected file system changes or data integrity issues.

Statement

A Low-impact flaw in Python’s tarfile module mishandles multi-block members. A local attacker could use a crafted tar archive to cause minor data integrity issues or unexpected file system changes under specific, high-complexity conditions.

Mitigation

Avoid using Python's tarfile module to extract untrusted archives. If processing untrusted archives is required, delegate extraction to the system-level tar utility (via the subprocess module). For Python 3.12 or newer, you can instead enforce strict extraction filters using tarfile.data_filter to secure the module's extraction behavior.

Common Vulnerability Scoring System (CVSS) Score Details

Info alert:Important note

CVSS scores for open source components depend on vendor-specific factors (e.g. version or build chain). Therefore, Red Hat's score and impact rating can be different from NVD and other vendors. Red Hat remains the authoritative CVE Naming Authority (CNA) source for its products and services (see Red Hat classifications).

CVSS v3 Score Breakdown

Red HatNVDcve.org
Base Score2.53.3N/A
Attack VectorLocalLocalN/A
Attack ComplexityHighLowN/A
Privileges RequiredLowLowN/A
User InteractionNoneNoneN/A
ScopeUnchangedUnchangedN/A
ConfidentialityNoneNoneN/A
Integrity ImpactLowLowN/A
Availability ImpactNoneNoneN/A

Vector

Red Hat: CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:N

NVD: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N

Understanding the Weakness (CWE)

Integrity

Technical Impact: Unexpected State

Frequently Asked Questions

Want to get errata notifications? Sign up here.