CVE-2026-12345: Python Software Foundation CPython · Race Condition
Affects Python Software Foundation CPythonSource CVE Database V5
Not known to be exploited · CVSS 5.9 Medium · fixed in 3.15.0rc3 : update Python Software Foundation CPython when convenient.
Data as of 12 Nov 2026, 23:24 UTC
Thin evidence
One scorer or none| CNA (PSF) | CVSS 4.0 | 5.9 |
|---|
- EPSS
- 0.3% chance of exploitation in 30 days – higher than 28% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
- Patch
- Available – fixed in 3.15.0rc3, 3.14.9, 3.13.18 +1
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
Weaponized: evidence found.
Public exploit code: GitHub proofs of concept
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), GitHub proofs of concept, the Metasploit, Exploit-DB and nuclei-templates index as of 13 Nov 2026.
What to do
Upgrade Python Software Foundation CPython to 3.15.0rc3, 3.14.9, 3.13.18 or 3.12.15.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| Python Software FoundationCPython | Affected
| Fixed in
|
| Python Software FoundationCPython | Affected
| Fixed in
|
| Python Software FoundationCPython | Affected
| Fixed in
|
| Python Software FoundationCPython | Affected
| Fixed in
|
GitHubCPythonpkg:github/CPythonOther threats | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
Fixed versions of CPython are 3.12.15, 3.13.18, 3.14.9, and 3.15.0rc3 and later. Users should upgrade to these versions to remediate the vulnerability. No alternative mitigations are indicated. Patch status is confirmed by the vendor's fixed versions.
Description
CVE-2026-12345 is a race condition vulnerability in the cleanup process of tempfile.TemporaryDirectory in CPython. An attacker able to modify the directory tree during cleanup can replace a directory with a symbolic link, leading to deletion or permission changes of files outside the temporary directory with the privileges of the cleanup process. This affects multiple CPython versions prior to fixed releases. The vulnerability is medium severity with a CVSS score of 5.9.
References
- github.com/python/cpython/pull/157580 (opens in a new tab)
- github.com/python/cpython/issues/157579 (opens in a new tab)
- github.com/python/cpython/commit/5c20517a4fc56683efe63a7751020db9573f538d (opens in a new tab)
- openwall.com/lists/oss-security/2026/09/29/40 (opens in a new tab)
- github.com/python/cpython/commit/458e7134a5af7f86aee9d21b51cf499b41aa4420 (opens in a new tab)
- github.com/python/cpython/commit/e1f3590f155c6d66007e958c98c9d69316551993 (opens in a new tab)
- github.com/python/cpython/commit/06ef3d43fdaf4da97af12fa694b4886092c4b970 (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)