Patch Forecast
Yellow warning
Plan into this sprint.

CVE-2026-12345

The cleanup of tempfile.TemporaryDirectory is vulnerable to a race condition

Risk score
40/100
CVSS
5.9 v4.0
Exploit chance (30 days)
0.3%
Published
29 Sep 2026

Open in the live forecast Today's forecast

What to know

What it is
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 proces…
Affected
See advisory
Fix
Apply the vendor's security update; see the linked advisory.
Exploitation
No known exploitation

Why it is Yellow

  • CVSS 5.9 medium

References

Original description

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.

Last activity 29 Sep 2026. Patch Forecast updates every hour.