CVE-2026-12345: medium-severity vulnerability in Python Software Foundation CPython
Race condition in tempfile.TemporaryDirectory cleanup allows deleting files outside the temporary directory
Published · Updated
33Vexday Risk Score
No sign of exploitation. It has a public proof of concept.
ssvc Attendcvss 5.9epss 0.2%
from disclosure to weapon0 days
Published on NVDSep 29
1st PoCAug 14
exploitation probability
0.2%top 93% of all CVEs
observed exploitation
nono source reports it
1 public exploit(s)
The cleanup of tempfile.TemporaryDirectory is vulnerable to a race condition. An attacker who can modify the tree during cleanup can replace a directory with a symbolic link, causing files outside of the temporary directory to be deleted or have their permissions and file flags reset, with the privileges of the process performing the cleanup. Note that platforms where shutil.rmtree.avoids_symlink_attacks is false, remain affected, and file flags may still be reset outside of the tree on all platforms.
CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:N/VI:H/VA:H/SC:N/SI:N/SA:N
Affected products
Python Software Foundation · CPythonpublic PoCs found — 1
githubgithub.com/zahidec0de/CVE-2026-12345-poc★ 0⚠ Public resources, to assess the exposure of systems you control or are authorized to test. Test only with authorization.
Related CVEs — Python Software Foundation CPython
In the same product, most dangerous first.
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-4517CRITICALArbitrary writes via tarfile realpath overflowEPSS 1.4%
References
https://github.com/python/cpython/commit/06ef3d43fdaf4da97af12fa694b4886092c4b970https://github.com/python/cpython/commit/458e7134a5af7f86aee9d21b51cf499b41aa4420https://github.com/python/cpython/commit/5c20517a4fc56683efe63a7751020db9573f538dhttps://github.com/python/cpython/commit/e1f3590f155c6d66007e958c98c9d69316551993https://github.com/python/cpython/issues/157579https://github.com/python/cpython/pull/157580http://www.openwall.com/lists/oss-security/2026/09/29/40