{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2025-4517","assignerOrgId":"28c92f92-d60d-412d-b760-e73465c3df22","state":"PUBLISHED","assignerShortName":"PSF","dateReserved":"2025-05-09T15:05:07.139Z","datePublished":"2025-06-03T12:58:50.352Z","dateUpdated":"2026-04-21T20:17:01.375Z"},"containers":{"cna":{"affected":[{"defaultStatus":"unaffected","modules":["tarfile"],"product":"CPython","repo":"https://github.com/python/cpython","vendor":"Python Software Foundation","versions":[{"version":"0","lessThan":"3.10.18","status":"affected","versionType":"python"},{"version":"3.11.0","lessThan":"3.11.13","status":"affected","versionType":"python"},{"version":"3.12.0","lessThan":"3.12.11","status":"affected","versionType":"python"},{"version":"3.13.0","lessThan":"3.13.4","status":"affected","versionType":"python"},{"version":"3.14.0a1","lessThan":"3.14.0b3","status":"affected","versionType":"python"}]}],"credits":[{"lang":"en","type":"reporter","value":"Caleb Brown (Google)"},{"lang":"en","type":"remediation developer","value":"Petr Viktorin"},{"lang":"en","type":"remediation developer","value":"Serhiy Storchaka"},{"lang":"en","type":"remediation reviewer","value":"Hugo van Kemenade"},{"lang":"en","type":"remediation reviewer","value":"Łukasz Langa"},{"lang":"en","type":"remediation reviewer","value":"Thomas Wouters"},{"lang":"en","type":"coordinator","value":"Seth Larson"}],"descriptions":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"<p><span style=\"background-color: rgb(255, 255, 255);\">Allows arbitrary filesystem writes outside the extraction directory during extraction with </span><code>filter=\"data\"</code><span style=\"background-color: rgb(255, 255, 255);\">.</span><br></p><p>You are affected by this vulnerability if using the <code>tarfile</code>&nbsp;module to extract untrusted tar archives using <code>TarFile.extractall()</code>&nbsp;or <code>TarFile.extract()</code>&nbsp;using the <code>filter=</code>&nbsp;parameter with a value of <code>\"data\"</code>&nbsp;or <code>\"tar\"</code>. See the tarfile <a target=\"_blank\" rel=\"nofollow\" href=\"https://docs.python.org/3/library/tarfile.html#tarfile-extraction-filter\">extraction filters documentation</a>&nbsp;for more information.</p><p>Note that for Python 3.14 or later the default value of <code>filter=</code>&nbsp;changed from \"no filtering\" to `\"data\", so if you are relying on this new default behavior then your usage is also affected.</p><p>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.<br></p>"}],"value":"Allows arbitrary filesystem writes outside the extraction directory during extraction with filter=\"data\".\n\n\nYou 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.\n\nNote 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.\n\nNote 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."}],"metrics":[{"cvssV3_1":{"attackComplexity":"LOW","attackVector":"NETWORK","availabilityImpact":"LOW","baseScore":9.4,"baseSeverity":"CRITICAL","confidentialityImpact":"HIGH","integrityImpact":"HIGH","privilegesRequired":"NONE","scope":"UNCHANGED","userInteraction":"NONE","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L","version":"3.1"},"format":"CVSS","scenarios":[{"lang":"en","value":"GENERAL"}]}],"problemTypes":[{"descriptions":[{"cweId":"CWE-22","description":"CWE-22 Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')","lang":"en","type":"CWE"}]}],"providerMetadata":{"orgId":"28c92f92-d60d-412d-b760-e73465c3df22","shortName":"PSF","dateUpdated":"2026-04-21T20:17:01.375Z"},"references":[{"tags":["issue-tracking"],"url":"https://github.com/python/cpython/issues/135034"},{"tags":["patch"],"url":"https://github.com/python/cpython/pull/135037"},{"tags":["vendor-advisory"],"url":"https://mail.python.org/archives/list/security-announce@python.org/thread/MAXIJJCUUMCL7ATZNDVEGGHUMQMUUKLG/"},{"tags":["patch"],"url":"https://github.com/python/cpython/commit/3612d8f51741b11f36f8fb0494d79086bac9390a"},{"tags":["patch"],"url":"https://github.com/python/cpython/commit/9e0ac76d96cf80b49055f6d6b9a6763fb9215c2a"},{"tags":["mitigation"],"url":"https://gist.github.com/sethmlarson/52398e33eff261329a0180ac1d54f42f"},{"tags":["patch"],"url":"https://github.com/python/cpython/commit/19de092debb3d7e832e5672cc2f7b788d35951da"},{"tags":["patch"],"url":"https://github.com/python/cpython/commit/aa9eb5f757ceff461e6e996f12c89e5d9b583b01"},{"tags":["patch"],"url":"https://github.com/python/cpython/commit/28463dba112af719df1e8b0391c46787ad756dd9"},{"tags":["patch"],"url":"https://github.com/python/cpython/commit/4633f3f497b1ff70e4a35b6fe2c907cbe2d4cb2e"},{"tags":["patch"],"url":"https://github.com/python/cpython/commit/9c1110ef6652687d7c55f590f909720eddde965a"},{"tags":["patch"],"url":"https://github.com/python/cpython/commit/dd8f187d0746da151e0025c51680979ac5b4cfb1"}],"source":{"discovery":"UNKNOWN"},"title":"Arbitrary writes via tarfile realpath overflow","x_generator":{"engine":"Vulnogram 0.2.0"}},"adp":[{"metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2025-4517","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"yes"},{"Technical Impact":"total"}],"version":"2.0.3","timestamp":"2025-10-24T03:55:18.283911Z"}}}],"title":"CISA ADP Vulnrichment","providerMetadata":{"orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","shortName":"CISA-ADP","dateUpdated":"2026-02-26T18:27:38.812Z"}}]}}