# CVE-2026-12345: Race condition in tempfile.TemporaryDirectory cleanup allows deleting files outside the temporary directory

CVE-2026-12345 is fixed in 35 products on 3 platforms, first by DEBIAN-CVE-2026-12345, released October 16, 2026. 11 other affected products have no fix yet. It is not reported as exploited. Patch Radar priority: High.

- Web page: https://patchblox.com/security/cve/CVE-2026-12345
- Priority: High
- CVSS: 8.1 (Low)
- EPSS: 0.0034
- CISA KEV: not listed
- Exploited (vendor report): no
- Publicly disclosed: no
- Published: Sep 29, 2026
- Weakness: Improper Link Resolution Before File Access ('Link Following')
- Vendor advisory: https://msrc.microsoft.com/update-guide/vulnerability/CVE-2026-12345

## 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.

## Where it's fixed

| Platform | Product | Fixed in | Fix | Released |
|---|---|---|---|---|
| Windows apps | Python 3.14 | 3.14.9 | [Python 3.14 3.14.9](https://patchblox.com/security/data/fix/windows-app/python.python.3.14-3.14.9.md) | Oct 21, 2026 |
| Linux | platform-python RHEL 8 | 0:3.6.8-79.el8_10 | [RHSA-2026:85239](https://patchblox.com/security/data/fix/linux/rhsa-2026-85239.md) | Oct 20, 2026 |
| Linux | platform-python almalinux 8 | 3.6.8-79.el8_10.alma.1 | [ALSA-2026:85239](https://patchblox.com/security/data/fix/linux/alsa-2026-85239.md) | Nov 7, 2026 |
| Linux | platform-python ol 8 | 0:3.6.8-79.0.1.el8_10 | [ELSA-2026-85239](https://patchblox.com/security/data/fix/linux/elsa-2026-85239.md) | Nov 7, 2026 |
| Linux | platform-python-debug RHEL 8 | 0:3.6.8-79.el8_10 | [RHSA-2026:85239](https://patchblox.com/security/data/fix/linux/rhsa-2026-85239.md) | Oct 20, 2026 |
| Linux | platform-python-debug almalinux 8 | 3.6.8-79.el8_10.alma.1 | [ALSA-2026:85239](https://patchblox.com/security/data/fix/linux/alsa-2026-85239.md) | Nov 7, 2026 |
| Linux | platform-python-debug ol 8 | 0:3.6.8-79.0.1.el8_10 | [ELSA-2026-85239](https://patchblox.com/security/data/fix/linux/elsa-2026-85239.md) | Nov 7, 2026 |
| Linux | platform-python-devel RHEL 8 | 0:3.6.8-79.el8_10 | [RHSA-2026:85239](https://patchblox.com/security/data/fix/linux/rhsa-2026-85239.md) | Oct 20, 2026 |
| Linux | platform-python-devel almalinux 8 | 3.6.8-79.el8_10.alma.1 | [ALSA-2026:85239](https://patchblox.com/security/data/fix/linux/alsa-2026-85239.md) | Nov 7, 2026 |
| Linux | platform-python-devel ol 8 | 0:3.6.8-79.0.1.el8_10 | [ELSA-2026-85239](https://patchblox.com/security/data/fix/linux/elsa-2026-85239.md) | Nov 7, 2026 |
| Linux | python-unversioned-command RHEL 9 | 0:3.9.25-7.el9_8.6 | [RHSA-2026:89742](https://patchblox.com/security/data/fix/linux/rhsa-2026-89742.md) | Oct 27, 2026 |
| Linux | python-unversioned-command almalinux 9 | 3.9.25-7.el9_8.6 | [ALSA-2026:89742](https://patchblox.com/security/data/fix/linux/alsa-2026-89742.md) | Nov 7, 2026 |
| Linux | python-unversioned-command ol 9 | 0:3.9.25-7.0.1.el9_8.6 | [ELSA-2026-89742](https://patchblox.com/security/data/fix/linux/elsa-2026-89742.md) | Nov 7, 2026 |
| Linux | python3 RHEL 9 | 0:3.9.25-7.el9_8.6 | [RHSA-2026:89742](https://patchblox.com/security/data/fix/linux/rhsa-2026-89742.md) | Oct 27, 2026 |
| Linux | python3 almalinux 9 | 3.9.25-7.el9_8.6 | [ALSA-2026:89742](https://patchblox.com/security/data/fix/linux/alsa-2026-89742.md) | Nov 7, 2026 |
| Linux | python3 ol 9 | 0:3.9.25-7.0.1.el9_8.6 | [ELSA-2026-89742](https://patchblox.com/security/data/fix/linux/elsa-2026-89742.md) | Nov 7, 2026 |
| Linux | python3 rocky 8 | 0:3.6.8-79.el8_10.rocky.0 | [RLSA-2026:85239](https://patchblox.com/security/data/fix/linux/rlsa-2026-85239.md) | Nov 7, 2026 |
| Linux | python3-debug RHEL 9 | 0:3.9.25-7.el9_8.6 | [RHSA-2026:89742](https://patchblox.com/security/data/fix/linux/rhsa-2026-89742.md) | Oct 27, 2026 |
| Linux | python3-debug almalinux 9 | 3.9.25-7.el9_8.6 | [ALSA-2026:89742](https://patchblox.com/security/data/fix/linux/alsa-2026-89742.md) | Nov 7, 2026 |
| Linux | python3-debug ol 9 | 0:3.9.25-7.0.1.el9_8.6 | [ELSA-2026-89742](https://patchblox.com/security/data/fix/linux/elsa-2026-89742.md) | Nov 7, 2026 |
| Linux | python3-devel RHEL 9 | 0:3.9.25-7.el9_8.6 | [RHSA-2026:89742](https://patchblox.com/security/data/fix/linux/rhsa-2026-89742.md) | Oct 27, 2026 |
| Linux | python3-devel almalinux 9 | 3.9.25-7.el9_8.6 | [ALSA-2026:89742](https://patchblox.com/security/data/fix/linux/alsa-2026-89742.md) | Nov 7, 2026 |
| Linux | python3-devel ol 9 | 0:3.9.25-7.0.1.el9_8.6 | [ELSA-2026-89742](https://patchblox.com/security/data/fix/linux/elsa-2026-89742.md) | Nov 7, 2026 |
| Linux | python3-idle RHEL 8 | 0:3.6.8-79.el8_10 | [RHSA-2026:85239](https://patchblox.com/security/data/fix/linux/rhsa-2026-85239.md) | Oct 20, 2026 |
| Linux | python3-idle RHEL 9 | 0:3.9.25-7.el9_8.6 | [RHSA-2026:89742](https://patchblox.com/security/data/fix/linux/rhsa-2026-89742.md) | Oct 27, 2026 |
| Linux | python3-idle almalinux 8 | 3.6.8-79.el8_10.alma.1 | [ALSA-2026:85239](https://patchblox.com/security/data/fix/linux/alsa-2026-85239.md) | Nov 7, 2026 |
| Linux | python3-idle almalinux 9 | 3.9.25-7.el9_8.6 | [ALSA-2026:89742](https://patchblox.com/security/data/fix/linux/alsa-2026-89742.md) | Nov 7, 2026 |
| Linux | python3-idle ol 8 | 0:3.6.8-79.0.1.el8_10 | [ELSA-2026-85239](https://patchblox.com/security/data/fix/linux/elsa-2026-85239.md) | Nov 7, 2026 |
| Linux | python3-idle ol 9 | 0:3.9.25-7.0.1.el9_8.6 | [ELSA-2026-89742](https://patchblox.com/security/data/fix/linux/elsa-2026-89742.md) | Nov 7, 2026 |
| Linux | python3-libs RHEL 8 | 0:3.6.8-79.el8_10 | [RHSA-2026:85239](https://patchblox.com/security/data/fix/linux/rhsa-2026-85239.md) | Oct 20, 2026 |
| Linux | python3-libs RHEL 9 | 0:3.9.25-7.el9_8.6 | [RHSA-2026:89742](https://patchblox.com/security/data/fix/linux/rhsa-2026-89742.md) | Oct 27, 2026 |
| Linux | python3-libs almalinux 8 | 3.6.8-79.el8_10.alma.1 | [ALSA-2026:85239](https://patchblox.com/security/data/fix/linux/alsa-2026-85239.md) | Nov 7, 2026 |
| Linux | python3-libs almalinux 9 | 3.9.25-7.el9_8.6 | [ALSA-2026:89742](https://patchblox.com/security/data/fix/linux/alsa-2026-89742.md) | Nov 7, 2026 |
| Linux | python3-libs ol 8 | 0:3.6.8-79.0.1.el8_10 | [ELSA-2026-85239](https://patchblox.com/security/data/fix/linux/elsa-2026-85239.md) | Nov 7, 2026 |
| Linux | python3-libs ol 9 | 0:3.9.25-7.0.1.el9_8.6 | [ELSA-2026-89742](https://patchblox.com/security/data/fix/linux/elsa-2026-89742.md) | Nov 7, 2026 |
| Linux | python3-test RHEL 8 | 0:3.6.8-79.el8_10 | [RHSA-2026:85239](https://patchblox.com/security/data/fix/linux/rhsa-2026-85239.md) | Oct 20, 2026 |
| Linux | python3-test RHEL 9 | 0:3.9.25-7.el9_8.6 | [RHSA-2026:89742](https://patchblox.com/security/data/fix/linux/rhsa-2026-89742.md) | Oct 27, 2026 |
| Linux | python3-test almalinux 8 | 3.6.8-79.el8_10.alma.1 | [ALSA-2026:85239](https://patchblox.com/security/data/fix/linux/alsa-2026-85239.md) | Nov 7, 2026 |
| Linux | python3-test almalinux 9 | 3.9.25-7.el9_8.6 | [ALSA-2026:89742](https://patchblox.com/security/data/fix/linux/alsa-2026-89742.md) | Nov 7, 2026 |
| Linux | python3-test ol 8 | 0:3.6.8-79.0.1.el8_10 | [ELSA-2026-85239](https://patchblox.com/security/data/fix/linux/elsa-2026-85239.md) | Nov 7, 2026 |
| Linux | python3-test ol 9 | 0:3.9.25-7.0.1.el9_8.6 | [ELSA-2026-89742](https://patchblox.com/security/data/fix/linux/elsa-2026-89742.md) | Nov 7, 2026 |
| Linux | python3-tkinter RHEL 8 | 0:3.6.8-79.el8_10 | [RHSA-2026:85239](https://patchblox.com/security/data/fix/linux/rhsa-2026-85239.md) | Oct 20, 2026 |
| Linux | python3-tkinter RHEL 9 | 0:3.9.25-7.el9_8.6 | [RHSA-2026:89742](https://patchblox.com/security/data/fix/linux/rhsa-2026-89742.md) | Oct 27, 2026 |
| Linux | python3-tkinter almalinux 8 | 3.6.8-79.el8_10.alma.1 | [ALSA-2026:85239](https://patchblox.com/security/data/fix/linux/alsa-2026-85239.md) | Nov 7, 2026 |
| Linux | python3-tkinter almalinux 9 | 3.9.25-7.el9_8.6 | [ALSA-2026:89742](https://patchblox.com/security/data/fix/linux/alsa-2026-89742.md) | Nov 7, 2026 |
| Linux | python3-tkinter ol 8 | 0:3.6.8-79.0.1.el8_10 | [ELSA-2026-85239](https://patchblox.com/security/data/fix/linux/elsa-2026-85239.md) | Nov 7, 2026 |
| Linux | python3-tkinter ol 9 | 0:3.9.25-7.0.1.el9_8.6 | [ELSA-2026-89742](https://patchblox.com/security/data/fix/linux/elsa-2026-89742.md) | Nov 7, 2026 |
| Linux | python3.12 Fedora 43 | 3.12.16-2.fc43 | [FEDORA-2026-4E3279AF04](https://patchblox.com/security/data/fix/linux/fedora-2026-4e3279af04.md) | Nov 8, 2026 |
| Linux | python3.12-debug Fedora 43 | 3.12.16-2.fc43 | [FEDORA-2026-4E3279AF04](https://patchblox.com/security/data/fix/linux/fedora-2026-4e3279af04.md) | Nov 8, 2026 |
| Linux | python3.12-debuginfo Fedora 43 | 3.12.16-2.fc43 | [FEDORA-2026-4E3279AF04](https://patchblox.com/security/data/fix/linux/fedora-2026-4e3279af04.md) | Nov 8, 2026 |
| Linux | python3.12-debugsource Fedora 43 | 3.12.16-2.fc43 | [FEDORA-2026-4E3279AF04](https://patchblox.com/security/data/fix/linux/fedora-2026-4e3279af04.md) | Nov 8, 2026 |
| Linux | python3.12-devel Fedora 43 | 3.12.16-2.fc43 | [FEDORA-2026-4E3279AF04](https://patchblox.com/security/data/fix/linux/fedora-2026-4e3279af04.md) | Nov 8, 2026 |
| Linux | python3.12-idle Fedora 43 | 3.12.16-2.fc43 | [FEDORA-2026-4E3279AF04](https://patchblox.com/security/data/fix/linux/fedora-2026-4e3279af04.md) | Nov 8, 2026 |
| Linux | python3.12-libs Fedora 43 | 3.12.16-2.fc43 | [FEDORA-2026-4E3279AF04](https://patchblox.com/security/data/fix/linux/fedora-2026-4e3279af04.md) | Nov 8, 2026 |
| Linux | python3.12-test Fedora 43 | 3.12.16-2.fc43 | [FEDORA-2026-4E3279AF04](https://patchblox.com/security/data/fix/linux/fedora-2026-4e3279af04.md) | Nov 8, 2026 |
| Linux | python3.12-tkinter Fedora 43 | 3.12.16-2.fc43 | [FEDORA-2026-4E3279AF04](https://patchblox.com/security/data/fix/linux/fedora-2026-4e3279af04.md) | Nov 8, 2026 |
| Linux | python3.13 Fedora 43 | 3.13.18-1.fc43 | [FEDORA-2026-D6B8383232](https://patchblox.com/security/data/fix/linux/fedora-2026-d6b8383232.md) | Nov 7, 2026 |
| Linux | python3.13-debug Fedora 43 | 3.13.18-1.fc43 | [FEDORA-2026-D6B8383232](https://patchblox.com/security/data/fix/linux/fedora-2026-d6b8383232.md) | Nov 7, 2026 |
| Linux | python3.13-debuginfo Fedora 43 | 3.13.18-1.fc43 | [FEDORA-2026-D6B8383232](https://patchblox.com/security/data/fix/linux/fedora-2026-d6b8383232.md) | Nov 7, 2026 |
| Linux | python3.13-debugsource Fedora 43 | 3.13.18-1.fc43 | [FEDORA-2026-D6B8383232](https://patchblox.com/security/data/fix/linux/fedora-2026-d6b8383232.md) | Nov 7, 2026 |
| Linux | python3.13-devel Fedora 43 | 3.13.18-1.fc43 | [FEDORA-2026-D6B8383232](https://patchblox.com/security/data/fix/linux/fedora-2026-d6b8383232.md) | Nov 7, 2026 |
| Linux | python3.13-freethreading Fedora 43 | 3.13.18-1.fc43 | [FEDORA-2026-D6B8383232](https://patchblox.com/security/data/fix/linux/fedora-2026-d6b8383232.md) | Nov 7, 2026 |
| Linux | python3.13-freethreading-debug Fedora 43 | 3.13.18-1.fc43 | [FEDORA-2026-D6B8383232](https://patchblox.com/security/data/fix/linux/fedora-2026-d6b8383232.md) | Nov 7, 2026 |
| Linux | python3.13-idle Fedora 43 | 3.13.18-1.fc43 | [FEDORA-2026-D6B8383232](https://patchblox.com/security/data/fix/linux/fedora-2026-d6b8383232.md) | Nov 7, 2026 |
| Linux | python3.13-libs Fedora 43 | 3.13.18-1.fc43 | [FEDORA-2026-D6B8383232](https://patchblox.com/security/data/fix/linux/fedora-2026-d6b8383232.md) | Nov 7, 2026 |
| Linux | python3.13-test Fedora 43 | 3.13.18-1.fc43 | [FEDORA-2026-D6B8383232](https://patchblox.com/security/data/fix/linux/fedora-2026-d6b8383232.md) | Nov 7, 2026 |
| Linux | python3.13-tkinter Fedora 43 | 3.13.18-1.fc43 | [FEDORA-2026-D6B8383232](https://patchblox.com/security/data/fix/linux/fedora-2026-d6b8383232.md) | Nov 7, 2026 |
| Linux | python3.14 Debian 14 | 3.14.9-1 | [DEBIAN-CVE-2026-12345](https://patchblox.com/security/data/fix/linux/debian-cve-2026-12345.md) | Oct 16, 2026 |
| Linux | python3.15 Debian 14 | 3.15.0~rc3-1 | [DEBIAN-CVE-2026-12345](https://patchblox.com/security/data/fix/linux/debian-cve-2026-12345.md) | Oct 16, 2026 |
| Linux | python3.9 rocky 9 | 0:3.9.25-7.el9_8.6 | [RLSA-2026:89742](https://patchblox.com/security/data/fix/linux/rlsa-2026-89742.md) | Nov 7, 2026 |

## No fix yet

| Platform | Product | Status |
|---|---|---|
| Windows apps | Python 2 | no-fix |
| Windows apps | Python 3.10 | no-fix |
| Windows apps | Python 3.11 | no-fix |
| Windows apps | Python 3.12 | no-fix |
| Windows apps | Python 3.13 | no-fix |
| Windows apps | Python 3.5 | no-fix |
| Windows apps | Python 3.6 | no-fix |
| Windows apps | Python 3.7 | no-fix |
| Windows apps | Python 3.8 | no-fix |
| Windows apps | Python 3.9 | no-fix |
| macOS | Python3 | no-fix |

---

Data as of 2026-11-09T01:18:40Z UTC. Source: Patchblox Patch Radar (https://patchblox.com/security/patch-radar). Patchblox finds out-of-date software on Windows, macOS and Linux and updates it through release rings: https://patchblox.com/demo

Free to use with attribution: show "Data: Patchblox Patch Radar" with a link to https://patchblox.com/security/patch-radar. Terms, including what needs a written agreement: https://patchblox.com/security/patch-radar/use-the-data

Product names, logos and trademarks shown on Patch Radar belong to their respective owners. They are used only to identify the software each security fix applies to and to help readers find their platform. Their use does not imply any affiliation with, or endorsement by, those owners, and Patchblox is not affiliated with any of them.
