{"id":"CVE-2026-11940","published":"2026-06-23T16:04:17Z","modified":"2026-08-13T00:28:51Z","title":"tarfile extraction filter bypass allows escaping the destination directory","vendor":"Python Software Foundation","product":"CPython","tier":"tail","description":{"text":"tarfile.extractall() with the 'data' or 'tar'\n filter could be bypassed by a crafted archive where a hardlink \nreferences a symlink stored at a deeper name than the hardlink itself.  \nThe extraction fallback validated the symlink at it's archived location \nbut recreated it at the hardlink's shallower\npath, letting a relative\n target the filter judged contained escape the destination directory.  \nThis allowed a malicious tar archive to create a symlink pointing \noutside the destination, enabling out-of-destination file reads or \nwrites. This was an incomplete fix of CVE-2025-4330.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.8,"severity":"HIGH","version":"4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:H/SI:H/SA:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.0075,"percentile":0.55875,"provenance":"source"},"cwes":[{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"},{"id":"CWE-59","name":"Improper Link Resolution Before File Access"}],"references":[{"url":"https://github.com/python/cpython/pull/151559","tags":["patch"]},{"url":"https://mail.python.org/archives/list/security-announce@python.org/thread/LD6QIISNQFQYOIEPJNEUIPV7S3V76FZH/","tags":["vendor-advisory"]},{"url":"https://github.com/python/cpython/issues/151558","tags":["issue-tracking"]},{"url":"https://github.com/python/cpython/commit/27dd970bf6b17ebca7c8ed486a40ab043ed7af8f","tags":["patch"]},{"url":"https://github.com/python/cpython/commit/672825e2f36a57e173959b0d9d409d4560dab8df","tags":["patch"]},{"url":"https://github.com/python/cpython/commit/771d12dda5140313db0ac550292987975651bbde","tags":["patch"]},{"url":"https://github.com/python/cpython/commit/79c06bd5c6afa3c440d50faf7ee1b147c8832b4c","tags":["patch"]},{"url":"https://github.com/python/cpython/commit/be13e86f6b9788a6f4d0419dffef72cbae5865c9","tags":["patch"]},{"url":"https://github.com/python/cpython/commit/e5fdbd8d5aa923bd9111b112ea73bd6ec7c47877","tags":["patch"]},{"url":"https://github.com/python/cpython/commit/0f852b3f07dd8e71e40326a51c02afbf16a42cc5","tags":["patch"]}],"priority":{"score":16.6,"factors":[{"name":"EPSS percentile","points":11.17},{"name":"CVSS severity","points":5.46}]},"vendorSlug":"python-software-foundation","affectedVersions":[{"vendor":"Python Software Foundation","product":"CPython","versions":["< 3.10.21",">= 3.11.0, < 3.11.16",">= 3.12.0, < 3.12.14",">= 3.13.0, < 3.13.15",">= 3.14.0, < 3.14.7",">= 3.15.0a1, < 3.15.0b4"]}],"ssvc":{"exploitation":"none","automatable":"yes","technicalImpact":"partial","timestamp":"2026-06-23T17:57:25.652265Z","from":"CISA ADP","provenance":"source"},"euvd":{"id":"EUVD-2026-38490","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-python-software-foundation-cpython-cve-2025-4330","parents":[{"from":"CVE-2025-4330","to":"CVE-2026-11940","relation":"incomplete-fix","confidence":"high","kind":"lineage","evidence":[{"kind":"text","provenance":"source","relation":"incomplete-fix","quote":"This was an incomplete fix of CVE-2025-4330.","from":"CVE.org","in":"CVE-2026-11940"},{"kind":"same-code","provenance":"machine","files":["Lib/tarfile.py"],"commits":["https://github.com/python/cpython/commit/3612d8f51741b11f36f8fb0494d79086bac9390a","https://github.com/python/cpython/commit/9e0ac76d96cf80b49055f6d6b9a6763fb9215c2a","https://github.com/python/cpython/commit/27dd970bf6b17ebca7c8ed486a40ab043ed7af8f","https://github.com/python/cpython/commit/672825e2f36a57e173959b0d9d409d4560dab8df"],"basis":"shared file"}]}]}}