CVE-2025-4517: Arbitrary writes via tarfile realpath overflow

CVE-2025-4517 affects 195 listed versions of Python in the Dawnsentry catalogue.

9.4CVSS critical
None knownexploitation
1%EPSS (next 30 days)
3 June 2025published

Affected products and versions

The versions in the Dawnsentry catalogue this CVE affects, judged from the vendor's own advisory where there is one, otherwise from the CVE record and NVD, as each version's own page says.

Python

195 of 250 listed versions are affected. Fixed in 3.12.11, 3.11.13, 3.10.18, 3.9.23. The newest release, 3.15.2, is not affected.

3.12.10 3.12.9 3.12.8 3.12.7 3.12.6 3.12.5 3.12.4 3.12.3 3.12.2 3.11.12 3.11.11 3.11.10 3.11.9 3.11.8 3.11.7 3.11.6 3.11.5 3.11.4 3.10.17 3.10.16 3.10.15 3.10.14 3.10.13 3.10.12 3.10.11 3.10.10 3.10.9 3.10.8 3.9.22 3.9.21 3.9.20 3.9.19 3.9.18 3.9.17 3.9.16 3.9.15 3.9.14 3.9.13 3.9.12 3.9.11 3.8.20 3.8.19 3.8.18 3.8.17 3.8.16 3.8.15 3.8.14 3.8.13 3.8.12 3.8.11 3.8.10 3.8.9 3.8.8 3.8.7 3.8.6 3.7.17 3.7.16 3.7.15 3.7.14 3.7.13 and 135 more

What it is

Allows arbitrary filesystem writes outside the extraction directory during extraction with filter="data". You are affected by this vulnerability if using the tarfile module to extract untrusted tar archives using TarFile.extractall() or TarFile.extract() using the filter= parameter with a value of "data" or "tar". See the tarfile extraction filters documentation https://docs.python.org/3/library/tarfile.html#tarfile-extraction-filter  for more information. Note that for Python 3.14 or later the default value of filter= changed from "no filtering" to `"data", so if you are relying on this new default behavior then your usage is also affected. Note that none of these vulnerabilities significantly affect the installation of source distributions which are tar archives as source distributions already allow arbitrary code execution during the build process. However when evaluating source distributions it's important to avoid installing source distributions with suspicious links.

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L (Psf)

Published by Psf on 3 June 2025. Last changed 31 July 2026.

Sources

Check one version you run: look CVE-2025-4517 up, or pick a product and version in the quick lookup.

Updated 2 December 2026.