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 Hat | NVD | cve.org | |
|---|---|---|---|
| Base Score | 2.5 | 3.3 | N/A |
| Attack Vector | Local | Local | N/A |
| Attack Complexity | High | Low | N/A |
| Privileges Required | Low | Low | N/A |
| User Interaction | None | None | N/A |
| Scope | Unchanged | Unchanged | N/A |
| Confidentiality | None | None | N/A |
| Integrity Impact | Low | Low | N/A |
| Availability Impact | None | None | N/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
Not sure what something means? Check out our Security Glossary.
Want to get errata notifications? Sign up here.