CVE-2025-4517
This vulnerability allows an attacker to write files to arbitrary locations on the filesystem when a Python tarfile module extracts a tar archive with the filter set to "data" or "tar". The flaw occurs because the extraction filter does not prevent path traversal, letting the archive specify paths that escape the intended directory. The issue is critical because it can overwrite system files or install malicious code.
No official fix yet. If none appears within 45 days of first tracking, this entry is removed automatically.
Who is affected
Python 3.14 and earlier versions that use the tarfile module to extract untrusted tar archives with filter="data" or "tar". Developers or users running Python scripts that perform such extraction are affected.
Real-world impact
An attacker could write files to any location on the filesystem, potentially overwriting system files, installing malware, or creating files that compromise the system.
Why this severity
The CVSS score of 9.4 reflects that the flaw can be triggered over the network, requires no special privileges, and lets an attacker fully compromise confidentiality and integrity, with some impact on availability.
What to do about it
- ›Avoid extracting untrusted tar archives with filter="data" or "tar".
- ›Use a safer extraction filter or disable extraction of untrusted archives.
No official fix or mitigation is documented in the sources yet. Monitor the vendor advisory and apply the patch as soon as it is released.
NVD description
Timeline
- Jun 3, 2025 · Jun 3, 2025PublishedDisclosed and added to the National Vulnerability Database.
- Jul 31, 2026 · 5d agoAdvisory updatedThe NVD record was last revised.
How it’s attacked
References & advisories
- gist.github.com/sethmlarson/52398e33eff2613…
- github.com/python/cpython/commit/19de0…
- github.com/python/cpython/commit/28463…
- github.com/python/cpython/commit/3612d…
- github.com/python/cpython/commit/4633f…
- github.com/python/cpython/commit/9c111…
- github.com/python/cpython/commit/9e0ac…
- github.com/python/cpython/commit/aa9eb…
- github.com/python/cpython/commit/dd8f1…
- github.com/python/cpython/issues/13503…
- github.com/python/cpython/pull/135037
- mail.python.org/archives/list/security-anno…