{"api_version":"1","generated_at":"2026-08-12T02:43:52+00:00","cve":"CVE-2024-12718","urls":{"html":"https://cve.report/CVE-2024-12718","api":"https://cve.report/api/cve/CVE-2024-12718.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2024-12718","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2024-12718"},"summary":{"title":"Bypass extraction filter to modify file metadata outside extraction directory","description":"Allows modifying some file metadata (e.g. last modified) with filter=\"data\" or file permissions (chmod) with filter=\"tar\" of files outside the extraction directory.\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. Only Python versions 3.12 or later are affected by these vulnerabilities, earlier versions don't include the extraction filter feature.\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.","state":"PUBLISHED","assigner":"PSF","published_at":"2025-06-03 13:15:20","updated_at":"2026-07-31 15:16:26"},"problem_types":["CWE-22","CWE-22 CWE-22 Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')"],"metrics":[{"version":"3.1","source":"cna@python.org","type":"Secondary","score":"5.3","severity":"MEDIUM","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N","data":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N","baseScore":5.3,"baseSeverity":"MEDIUM","attackVector":"NETWORK","attackComplexity":"LOW","privilegesRequired":"NONE","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"NONE","integrityImpact":"LOW","availabilityImpact":"NONE"}},{"version":"3.1","source":"CNA","type":"CVSS","score":"5.3","severity":"MEDIUM","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N","data":{"attackComplexity":"LOW","attackVector":"NETWORK","availabilityImpact":"NONE","baseScore":5.3,"baseSeverity":"MEDIUM","confidentialityImpact":"NONE","integrityImpact":"LOW","privilegesRequired":"NONE","scope":"UNCHANGED","userInteraction":"NONE","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N","version":"3.1"}}],"references":[{"url":"https://github.com/python/cpython/commit/4633f3f497b1ff70e4a35b6fe2c907cbe2d4cb2e","name":"https://github.com/python/cpython/commit/4633f3f497b1ff70e4a35b6fe2c907cbe2d4cb2e","refsource":"cna@python.org","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://github.com/python/cpython/commit/3612d8f51741b11f36f8fb0494d79086bac9390a","name":"https://github.com/python/cpython/commit/3612d8f51741b11f36f8fb0494d79086bac9390a","refsource":"cna@python.org","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://github.com/python/cpython/commit/dd8f187d0746da151e0025c51680979ac5b4cfb1","name":"https://github.com/python/cpython/commit/dd8f187d0746da151e0025c51680979ac5b4cfb1","refsource":"cna@python.org","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://github.com/python/cpython/pull/135037","name":"https://github.com/python/cpython/pull/135037","refsource":"cna@python.org","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://github.com/python/cpython/commit/9c1110ef6652687d7c55f590f909720eddde965a","name":"https://github.com/python/cpython/commit/9c1110ef6652687d7c55f590f909720eddde965a","refsource":"cna@python.org","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://github.com/python/cpython/issues/135034","name":"https://github.com/python/cpython/issues/135034","refsource":"cna@python.org","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://github.com/python/cpython/commit/19de092debb3d7e832e5672cc2f7b788d35951da","name":"https://github.com/python/cpython/commit/19de092debb3d7e832e5672cc2f7b788d35951da","refsource":"cna@python.org","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://github.com/python/cpython/commit/28463dba112af719df1e8b0391c46787ad756dd9","name":"https://github.com/python/cpython/commit/28463dba112af719df1e8b0391c46787ad756dd9","refsource":"cna@python.org","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://gist.github.com/sethmlarson/52398e33eff261329a0180ac1d54f42f","name":"https://gist.github.com/sethmlarson/52398e33eff261329a0180ac1d54f42f","refsource":"cna@python.org","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://github.com/python/cpython/commit/aa9eb5f757ceff461e6e996f12c89e5d9b583b01","name":"https://github.com/python/cpython/commit/aa9eb5f757ceff461e6e996f12c89e5d9b583b01","refsource":"cna@python.org","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://github.com/python/cpython/commit/9e0ac76d96cf80b49055f6d6b9a6763fb9215c2a","name":"https://github.com/python/cpython/commit/9e0ac76d96cf80b49055f6d6b9a6763fb9215c2a","refsource":"cna@python.org","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://mail.python.org/archives/list/security-announce@python.org/thread/MAXIJJCUUMCL7ATZNDVEGGHUMQMUUKLG/","name":"https://mail.python.org/archives/list/security-announce@python.org/thread/MAXIJJCUUMCL7ATZNDVEGGHUMQMUUKLG/","refsource":"cna@python.org","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://github.com/python/cpython/issues/127987","name":"https://github.com/python/cpython/issues/127987","refsource":"134c704f-9b21-4f2e-91b3-4a467353bcc0","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2024-12718","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-12718","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"Python Software Foundation","product":"CPython","version":"affected 3.9.23 python","platforms":[]},{"source":"CNA","vendor":"Python Software Foundation","product":"CPython","version":"affected 3.10.0 3.10.18 python","platforms":[]},{"source":"CNA","vendor":"Python Software Foundation","product":"CPython","version":"affected 3.11.0 3.11.13 python","platforms":[]},{"source":"CNA","vendor":"Python Software Foundation","product":"CPython","version":"affected 3.12.0 3.12.11 python","platforms":[]},{"source":"CNA","vendor":"Python Software Foundation","product":"CPython","version":"affected 3.13.0 3.13.4 python","platforms":[]},{"source":"CNA","vendor":"Python Software Foundation","product":"CPython","version":"affected 3.14.0a1 3.14.0b3 python","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[{"source":"CNA","value":"Jakub Wilk","lang":"en"},{"source":"CNA","value":"Seth Larson","lang":"en"},{"source":"CNA","value":"Petr Viktorin","lang":"en"},{"source":"CNA","value":"Serhiy Storchaka","lang":"en"},{"source":"CNA","value":"Hugo van Kemenade","lang":"en"},{"source":"CNA","value":"Łukasz Langa","lang":"en"},{"source":"CNA","value":"Thomas Wouters","lang":"en"}],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":{"cve_year":"2024","cve_id":"12718","cve":"CVE-2024-12718","epss":"0.006630000","percentile":"0.481650000","score_date":"2026-08-03","updated_at":"2026-08-04 00:07:33"},"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"adp":[{"metrics":[{"other":{"content":{"id":"CVE-2024-12718","options":[{"Exploitation":"poc"},{"Automatable":"yes"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","timestamp":"2025-07-24T15:57:41.217375Z","version":"2.0.3"},"type":"ssvc"}}],"providerMetadata":{"dateUpdated":"2025-07-24T15:57:58.221Z","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","shortName":"CISA-ADP"},"references":[{"tags":["exploit"],"url":"https://github.com/python/cpython/issues/127987"}],"title":"CISA ADP Vulnrichment"}],"cna":{"affected":[{"defaultStatus":"unaffected","product":"CPython","repo":"https://github.com/python/cpython","vendor":"Python Software Foundation","versions":[{"lessThan":"3.9.23","status":"affected","version":"0","versionType":"python"},{"lessThan":"3.10.18","status":"affected","version":"3.10.0","versionType":"python"},{"lessThan":"3.11.13","status":"affected","version":"3.11.0","versionType":"python"},{"lessThan":"3.12.11","status":"affected","version":"3.12.0","versionType":"python"},{"lessThan":"3.13.4","status":"affected","version":"3.13.0","versionType":"python"},{"lessThan":"3.14.0b3","status":"affected","version":"3.14.0a1","versionType":"python"}]}],"credits":[{"lang":"en","type":"reporter","value":"Jakub Wilk"},{"lang":"en","type":"coordinator","value":"Seth Larson"},{"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"}],"descriptions":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"<span style=\"background-color: rgb(255, 255, 255);\">Allows modifying some file metadata (e.g. last modified) with </span><code>filter=\"data\"</code><span style=\"background-color: rgb(255, 255, 255);\">&nbsp;or file permissions (chmod) with </span><code>filter=\"tar\"</code><span style=\"background-color: rgb(255, 255, 255);\">&nbsp;of files outside the extraction directory.<br><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. Only Python versions 3.12 or later are affected by these vulnerabilities, earlier versions don't include the extraction filter feature.</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.</p></span><br>"}],"value":"Allows modifying some file metadata (e.g. last modified) with filter=\"data\" or file permissions (chmod) with filter=\"tar\" of files outside the extraction directory.\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. Only Python versions 3.12 or later are affected by these vulnerabilities, earlier versions don't include the extraction filter feature.\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":"NONE","baseScore":5.3,"baseSeverity":"MEDIUM","confidentialityImpact":"NONE","integrityImpact":"LOW","privilegesRequired":"NONE","scope":"UNCHANGED","userInteraction":"NONE","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N","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":{"dateUpdated":"2026-07-31T14:08:19.099Z","orgId":"28c92f92-d60d-412d-b760-e73465c3df22","shortName":"PSF"},"references":[{"tags":["issue-tracking"],"url":"https://github.com/python/cpython/issues/135034"},{"tags":["patch"],"url":"https://github.com/python/cpython/pull/135037"},{"tags":["issue-tracking"],"url":"https://github.com/python/cpython/issues/127987"},{"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/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/aa9eb5f757ceff461e6e996f12c89e5d9b583b01"},{"tags":["patch"],"url":"https://github.com/python/cpython/commit/dd8f187d0746da151e0025c51680979ac5b4cfb1"}],"source":{"discovery":"UNKNOWN"},"title":"Bypass extraction filter to modify file metadata outside extraction directory","x_generator":{"engine":"Vulnogram 0.2.0"}}},"cveMetadata":{"assignerOrgId":"28c92f92-d60d-412d-b760-e73465c3df22","assignerShortName":"PSF","cveId":"CVE-2024-12718","datePublished":"2025-06-03T12:59:10.908Z","dateReserved":"2024-12-17T17:04:51.209Z","dateUpdated":"2026-07-31T14:08:19.099Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2025-06-03 13:15:20","lastModifiedDate":"2026-07-31 15:16:26","problem_types":["CWE-22","CWE-22 CWE-22 Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')"],"metrics":{"cvssMetricV31":[{"source":"cna@python.org","type":"Secondary","cvssData":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N","baseScore":5.3,"baseSeverity":"MEDIUM","attackVector":"NETWORK","attackComplexity":"LOW","privilegesRequired":"NONE","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"NONE","integrityImpact":"LOW","availabilityImpact":"NONE"},"exploitabilityScore":3.9,"impactScore":1.4}],"ssvcV203":[{"source":"134c704f-9b21-4f2e-91b3-4a467353bcc0","ssvcData":{"timestamp":"2025-07-24T15:57:41.217375Z","id":"CVE-2024-12718","options":[{"exploitation":"poc"},{"automatable":"yes"},{"technicalImpact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}]},"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2024","CveId":"12718","Ordinal":"1","Title":"Bypass extraction filter to modify file metadata outside extract","CVE":"CVE-2024-12718","Year":"2024"},"notes":[{"CveYear":"2024","CveId":"12718","Ordinal":"1","NoteData":"Allows modifying some file metadata (e.g. last modified) with filter=\"data\" or file permissions (chmod) with filter=\"tar\" of files outside the extraction directory.\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. Only Python versions 3.12 or later are affected by these vulnerabilities, earlier versions don't include the extraction filter feature.\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.","Type":"Description","Title":"Bypass extraction filter to modify file metadata outside extract"}]}}}