Skip to content
Fencer Vulns
medium 5.9

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

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-tools
    affected: 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 more
    affected: 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.hum1
    affected: 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-rhel9
    affected: workaround, no fix available “Fix deferred”
  • Red Hat OpenShift AI (RHOAI) rhoai/odh-dashboard-rhel9
    under investigation
  • Red Hat Discovery 2 discovery/discovery-ui-rhel9 1793733716, discovery/discovery-server-rhel9 1793734080
    fixed: 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_10
    fixed: 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.6
    fixed: vendor fix RHSA-2026:89742
show 3 more
  • 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_10
    fixed: 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.6
    fixed: 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 more
    fixed: 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

Sources

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.