Arbitrary Filesystem Write Vulnerability in Python Tarfile Module
CVE-2025-4517

9.4CRITICAL

What is CVE-2025-4517?

The vulnerability in the Python tarfile module allows for arbitrary filesystem writes when extracting untrusted tar archives with the filter parameter set to 'data' or 'tar'. This issue arises specifically in Python 3.12 or later. Users who employ the TarFile.extractall() or TarFile.extract() methods with these filters are at risk. Notably, starting from Python 3.14, the default filter value has changed from 'no filtering' to 'data', thus increasing potential exposure for users relying on this default behavior. It is recommended to evaluate the sources of tar archives to mitigate risks associated with installing potentially harmful source distributions.

Affected Version(s)

CPython 0 < 3.9.23

CPython 3.10.0 < 3.10.18

CPython 3.11.0 < 3.11.13

References

CVSS V3.1

Score:
9.4
Severity:
CRITICAL
Confidentiality:
High
Integrity:
High
Availability:
High
Attack Vector:
Network
Attack Complexity:
Low
Privileges Required:
None
User Interaction:
None
Scope:
Unchanged

Timeline

  • Vulnerability published

  • Vulnerability Reserved

Credit

Caleb Brown (Google)
Petr Viktorin
Serhiy Storchaka
Hugo van Kemenade
Ɓukasz Langa
Thomas Wouters
Seth Larson
.
CVE-2025-4517 : Arbitrary Filesystem Write Vulnerability in Python Tarfile Module