CVE-2025-4517: falha crítica em Python Software Foundation CPython
Arbitrary writes via tarfile realpath overflow
Publicada em · Atualizada em
Aviso por e-mail quando ela entrar no KEV, ganhar PoC pública ou subir de nota.
48Vexday Risk Score
Sem sinal de exploração. Ela tem prova de conceito pública.
ssvc Attendcvss 9.4epss 1.4%
da publicação à arma257 dias
Publicada no NVD3 de jun.
1ª PoC+257d
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
Produtos afetados
Python Software Foundation · CPythonPoCs públicas encontradas — 8
githubgithub.com/0xDTC/CVE-2025-4517-tarfile-PATH_MAX-bypass★ 8githubgithub.com/AzureADTrent/CVE-2025-4517-POC★ 8githubgithub.com/StealthByte0/CVE-2025-4517-poc★ 2githubgithub.com/AnimePrincess420/CVE-2025-4517-PoC★ 2githubgithub.com/estebanzarate/CVE-2025-4517-Python-tarfile-filter-data-Bypass-PoC★ 0githubgithub.com/Rohitberiwala/PyPath-Escape-CVE-2025-4517-Exploit-Research★ 0githubgithub.com/kerburenthusiasm/CVE-2025-4517-PoC★ 0githubgithub.com/bgutowski/CVE-2025-4517-POC-Sudoers★ 0⚠ Recursos públicos, para você avaliar a exposição de sistemas que controla ou está autorizado a testar. Teste apenas com autorização.
CVEs relacionadas — Python Software Foundation CPython
No mesmo produto, das mais perigosas para as menos.
CVE-2024-7592HIGHQuadratic complexity parsing cookies with backslashesEPSS 2.3%CVE-2024-6232HIGHRegular-expression DoS when parsing TarFile headersEPSS 2.2%CVE-2024-12254HIGHUnbounded memory buffering in SelectorSocketTransport.writelines()EPSS 1.9%CVE-2025-13836MEDIUMExcessive read buffering DoS in http.clientEPSS 1.6%CVE-2025-0938MEDIUMURL parser allowed square brackets in domain namesEPSS 1.6%CVE-2025-4138HIGHBypassing extraction filter to create symlinks to arbitrary targets outside extraction directoryEPSS 1.4%
Referências
https://gist.github.com/sethmlarson/52398e33eff261329a0180ac1d54f42fhttps://github.com/python/cpython/commit/19de092debb3d7e832e5672cc2f7b788d35951dahttps://github.com/python/cpython/commit/28463dba112af719df1e8b0391c46787ad756dd9https://github.com/python/cpython/commit/3612d8f51741b11f36f8fb0494d79086bac9390ahttps://github.com/python/cpython/commit/4633f3f497b1ff70e4a35b6fe2c907cbe2d4cb2ehttps://github.com/python/cpython/commit/9c1110ef6652687d7c55f590f909720eddde965ahttps://github.com/python/cpython/commit/9e0ac76d96cf80b49055f6d6b9a6763fb9215c2ahttps://github.com/python/cpython/commit/aa9eb5f757ceff461e6e996f12c89e5d9b583b01https://github.com/python/cpython/commit/dd8f187d0746da151e0025c51680979ac5b4cfb1https://github.com/python/cpython/issues/135034https://github.com/python/cpython/pull/135037https://mail.python.org/archives/list/security-announce@python.org/thread/MAXIJJCUUMCL7ATZNDVEGGHUMQMUUKLG/