← Back to CVE List
Vulnerability Intelligence Report
Race condition in tempfile.TemporaryDirectory cleanup allows deleting files outside the temporary directory

CVE-2026-12345

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.

No Active Exploit Signals
CVSS Base Score
5.9
MEDIUM
EPSS Probability:0.18%
Executive Threat Verdict
Evaluating...
Evaluating Threat Landscape...
Assessing known weaponization, exploitation telemetry, and federal advisories.
Attack Surface
—
Authentication
—
Weaponization
—
SSVC Action
—

Weaknesses (CWE)

CWE-59 ↗CWE-59 Improper Link Resolution Before File Access ('Link Following')

Affected Products & Versions

Vendor Product Affected Versions
Python Software Foundation CPython 0 < 3.12.15 (affected), 3.13.0a1 < 3.15.0 (affected)

References & Technical Advisories

No reference links found.

Threat Intelligence Signals

EPSS Score
0.180%

Identity & Timeline

StatusPUBLISHED
Assigning AuthorityPython Software Foundation · Vendor · USA
Reserved2026-06-15T19:08:01
Published2026-09-29T17:46:01
Last Updated2026-09-30T22:45:28

LINK COPIED TO CLIPBOARD