Race condition in tempfile.TemporaryDirectory cleanup allows deleting files outside the temporary directory
Exact source revision recorded 26 Oct 2026 02:35:10 UTC. It does not establish the source's current position. Latest evidence.
cve-program · CVE-2026-12345
PublishedThe 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.
- Source published
- 29 Sep 2026 17:46:01 UTC
- Source modified
- 26 Oct 2026 00:36:23 UTC
- Observed here
- 26 Oct 2026 02:35:10 UTC
- Source terms
- CVE Program Terms of Use
Original source record · Cite this exact observation · Complete original publisher JSON
This view projects the publisher's source fields for reading; the original JSON retains additional fields and CVE enrichment containers. Attribution: cve-program · CVE Program Terms of Use. Source text is retained; field grouping and change labels are provided by ChangeIntel.
CVSS 4.0 · 5.9 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