CVE-2026-12345 json
Race condition in tempfile.TemporaryDirectory cleanup allows deleting files outside the temporary directory
published 2026-09-29 40 d ago modified 2026-10-29 11 d ago also BIT-libpython-2026-12345 , BIT-python-2026-12345 , BIT-python-min-2026-12345 , EUVD-2026-89183
- cvss
- 5.9
- version 4.0, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.3%
- EPSS 0.3% chance of exploitation in 30 days, percentile 28%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- bitnami libpython 3.12.16, 3.13.18, 3.14.9
- bitnami python 3.12.16, 3.13.18, 3.14.9
- bitnami python-min 3.12.16, 3.13.18, 3.14.9
- Python Software Foundation CPython 3.12.15, 3.13.18, 3.14.9, 3.15.0rc3
- python3.14 Debian 14 3.14.9-1
- python3.15 Debian 14 3.15.0~rc3-1
debian advisories DEBIAN-CVE-2026-12345
- python3 RHEL 8 3.6.8-79.el8_10
- python3-idle RHEL 8 3.6.8-79.el8_10
- python3-libs RHEL 8 3.6.8-79.el8_10
- python3-test RHEL 8 3.6.8-79.el8_10
- platform-python RHEL 8 3.6.8-79.el8_10
- python3-tkinter RHEL 8 3.6.8-79.el8_10
- python3.13 hummingbird 1 3.13.16-1.hum1
- python3.13-idle hummingbird 1 3.13.16-1.hum1
red hat advisories RHSA-2026:85239RHSA-2026:75119RHSA-2026:74870RHSA-2026:74922
- python315 openSUSE Tumbleweed 3.15.0-1.1
opensuse advisories openSUSE-SU-2026:12125-1
- python3 AlmaLinux 9 3.9.25-7.el9_8.6
- python3-idle AlmaLinux 9 3.9.25-7.el9_8.6
- python3-libs AlmaLinux 9 3.9.25-7.el9_8.6
- python3-test AlmaLinux 9 3.9.25-7.el9_8.6
- python3-tkinter AlmaLinux 9 3.9.25-7.el9_8.6
- python-unversioned-command AlmaLinux 9 3.9.25-7.el9_8.6
- python3-idle AlmaLinux 8 3.6.8-79.el8_10.alma.1
- python3-libs AlmaLinux 8 3.6.8-79.el8_10.alma.1
almalinux advisories ALSA-2026:89742ALSA-2026:85239
- python3.9 Rocky Linux 9 3.9.25-7.el9_8.6
- python3 Rocky Linux 8 3.6.8-79.el8_10.rocky.0
rocky linux advisories RLSA-2026:89742RLSA-2026:85239
- python3 Alpine 3.23, Alpine 3.22, Alpine 3.21 3.12.16-r0
- python3 Alpine 3.24 3.14.10-r0
alpine advisories ALPINE-CVE-2026-12345
Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- python3 Azure Linux 3.0 3.12.16-1
azure linux advisories AZL-105684
Azure Linux vulnerability data, Copyright (c) Microsoft Corporation, from https://github.com/microsoft/AzureLinuxVulnerabilityData via OSV, under the MIT licence; changed: normalised to fixed package versions per release. MIT
- github.com/python/cpython@5c20517 commit
- github.com/python/cpython@458e713 commit
- github.com/python/cpython@e1f3590 commit
- github.com/python/cpython@06ef3d4 commit
- github.com/python/cpython@58ed025 commit
- github.com/python/cpython@0478b52 commit
- github.com/python/cpython@c39b52d commit
- github.com/python/cpython#157580 pull request
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2026-12345 updated cvss 6.3
python: python: Arbitrary file deletion via race condition during temporary directory cleanup
-
Red Hat Enterprise Linux 6 python, tkinter, python-libs, python-test, python-toolsaffected: workaround, no fix planned “Out of support scope”
-
Red Hat Enterprise Linux 7 python, python3, tkinter, python-libs, python-test, python-tools, +4 more Red Hat Enterprise Linux 8 scipy, python36, python3.12, python-nose, python-wheel, python3-bson, +26 more Red Hat Enterprise Linux 9 python3.12, python3.14, python3.12-idle, python3.12-libs, python3.12-test, python3.14-idle, +11 more Red Hat Enterprise Linux 10 python3.14 3.14.7-2.el10_2, python3.12 3.12.14-1.el10_2 Red Hat Enterprise Linux AI (RHEL AI) 3 rhelai3/bootc-cuda-rhel9, rhelai3/bootc-rocm-rhel9, rhelai3/bootc-gaudi-rhel9, rhelai3/bootc-aws-cuda-rhel9, rhelai3/bootc-gcp-cuda-rhel9, rhelai3/bootc-azure-cuda-rhel9, +1 moreaffected: workaround, no fix available “Fix deferred”
-
Red Hat Hardened Images python3.10 3.10.21-1.4.hum1, python3.11 3.11.16-1.4.hum1affected: workaround, no fix available, no fix planned “Will not fix”
-
Red Hat OpenShift Virtualization 4 container-native-virtualization/ocp-virt-validation-checkup-rhel9 Red Hat Self-service automation portal 2 ansible-automation-platform/bootc-automation-portal-rhel9affected: workaround, no fix available “Fix deferred”
-
Red Hat OpenShift AI (RHOAI) rhoai/odh-dashboard-rhel9under investigation
-
Red Hat Discovery 2 discovery/discovery-ui-rhel9 1793733716, discovery/discovery-server-rhel9 1793734080fixed: vendor fix RHSA-2026:94802
-
Red Hat Enterprise Linux AppStream (v. 8) python3-idle 3.6.8-79.el8_10, python3-test 3.6.8-79.el8_10, platform-python 3.6.8-79.el8_10, python3-tkinter 3.6.8-79.el8_10fixed: vendor fix RHSA-2026:85239
-
Red Hat Enterprise Linux AppStream (v. 9) python3-tkinter 3.9.25-7.el9_8.6, python-unversioned-command 3.9.25-7.el9_8.6fixed: vendor fix RHSA-2026:89742
show 3 moreshow fewer
-
Red Hat Enterprise Linux BaseOS (v. 8) python3 3.6.8-79.el8_10, python3-libs 3.6.8-79.el8_10, python3-test 3.6.8-79.el8_10, platform-python 3.6.8-79.el8_10fixed: vendor fix RHSA-2026:85239
-
Red Hat Enterprise Linux BaseOS (v. 9) python3 3.9.25-7.el9_8.6, python3.9 3.9.25-7.el9_8.6, python3-libs 3.9.25-7.el9_8.6 Red Hat Enterprise Linux CodeReady Linux Builder (v. 9) python3 3.9.25-7.el9_8.6, python3-idle 3.9.25-7.el9_8.6, python3-test 3.9.25-7.el9_8.6, python3-tkinter 3.9.25-7.el9_8.6fixed: vendor fix RHSA-2026:89742
-
Red Hat Hardened Images python3 3.14.8-1.hum1, python3.14 3.14.8-1.hum1, python3.12 3.12.15-1.hum1, python3.13 3.13.16-1.hum1, python3-idle 3.14.8-1.hum1, python3-libs 3.14.8-1.hum1, +17 morefixed: vendor fix RHSA-2026:74870
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
CISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- partial
- Assessed
- 40 d ago
Exploit prediction
0.34% chance of exploitation in the next 30 days, higher than 28% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 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 |
| CNA | 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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| bitnami | libpython | <3.12.16 >=3.13.0, <3.13.18 >=3.14.0, <3.14.9 |
3.12.16 3.13.18 3.14.9 |
| bitnami | python | <3.12.16 >=3.13.0, <3.13.18 >=3.14.0, <3.14.9 |
3.12.16 3.13.18 3.14.9 |
| bitnami | python-min | <3.12.16 >=3.13.0, <3.13.18 >=3.14.0, <3.14.9 |
3.12.16 3.13.18 3.14.9 |
Affected products
- Python Software Foundation CPython
Classification
- Weakness
-
- CWE-59 Improper Link Resolution Before File Access
References
-
github.com
/python/cpython/pull/157580
patch, web
-
github.com
/python/cpython/commit/5c20517a4fc56683efe63a7751020db9573f538d
patch, web
-
github.com
/python/cpython/commit/458e7134a5af7f86aee9d21b51cf499b41aa4420
patch, web
-
github.com
/python/cpython/commit/e1f3590f155c6d66007e958c98c9d69316551993
patch, web
-
github.com
/python/cpython/commit/06ef3d43fdaf4da97af12fa694b4886092c4b970
patch, web
-
github.com
/python/cpython/commit/58ed0259cae509a19138795df302fe60b544dc74
patch, web
-
github.com
/python/cpython/commit/0478b52788117db4b831b3efd648f56b777628aa
patch, web
-
github.com
/python/cpython/commit/c39b52d00b42200aaadff679e2fe3f1006d57c58
patch, web
-
github.com
/python/cpython/issues/157579
issue-tracking, web
-
openwall.com
/lists/oss-security/2026/09/29/40
web
-
nvd.nist.gov
/vuln/detail/CVE-2026-12345
web
Sources
- CVE List CVE-2026-12345
- NVD CVE-2026-12345
- OSV BIT-libpython-2026-12345
- OSV BIT-python-2026-12345
- OSV BIT-python-min-2026-12345
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.
CPEs and fixed versions use Anchore's correction of NVD's data: Added CPE configurations because not yet analyzed by NVD.