Python: Race condition
Affects pythonSource GCVE Database
Not known to be exploited · CVSS 5.9 Medium.
Data as of 27 Oct 2026, 10:12 UTC
CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:N/VI:H/VA:H/SC:N/SI:N/SA:NExploitation evidence
Disclosed: evidence found.
CVE published 29 Sep 2026
Detectable: no evidence on record.
No public nuclei template indexed
Weaponised: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 26 Oct 2026.
What to do
Affected software
| Product | Affected | Fixed in |
|---|---|---|
Bitnamipythonpkg:bitnami/pythonOther threats | Affected– | Fixed in– |
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
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.
References
- openwall.com/lists/oss-security/2026/09/29/40 (opens in a new tab)
- github.com/python/cpython/commit/06ef3d43fdaf4da97af12fa694b4886092c4b970 (opens in a new tab)
- github.com/python/cpython/commit/458e7134a5af7f86aee9d21b51cf499b41aa4420 (opens in a new tab)
- github.com/python/cpython/commit/5c20517a4fc56683efe63a7751020db9573f538d (opens in a new tab)
- github.com/python/cpython/commit/e1f3590f155c6d66007e958c98c9d69316551993 (opens in a new tab)
- github.com/python/cpython/issues/157579 (opens in a new tab)
- github.com/python/cpython/pull/157580 (opens in a new tab)
- nvd.nist.gov/vuln/detail/CVE-2026-12345 (opens in a new tab)
- github.com/python/cpython/commit/58ed0259cae509a19138795df302fe60b544dc74 (opens in a new tab)
- github.com/python/cpython/commit/0478b52788117db4b831b3efd648f56b777628aa (opens in a new tab)
- github.com/python/cpython/commit/c39b52d00b42200aaadff679e2fe3f1006d57c58 (opens in a new tab)