CVE-2026-12345mediumCWE-59

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
⚠ Public resources, to assess the exposure of systems you control or are authorized to test. Test only with authorization.