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.
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
| Product | Fixed in | Fix | Released |
|---|---|---|---|
| Windows apps | |||
| Python 3.14 | 3.14.9 | Python 3.14 3.14.9 | Oct 21, 2026 |
| Linux | |||
| platform-python · RHEL 8 | 0:3.6.8-79.el8_10 | RHSA-2026:85239 | Oct 20, 2026 |
| platform-python · almalinux 8 | 3.6.8-79.el8_10.alma.1 | ALSA-2026:85239 | Nov 7, 2026 |
| platform-python · ol 8 | 0:3.6.8-79.0.1.el8_10 | ELSA-2026-85239 | Nov 7, 2026 |
| platform-python-debug · RHEL 8 | 0:3.6.8-79.el8_10 | RHSA-2026:85239 | Oct 20, 2026 |
| platform-python-debug · almalinux 8 | 3.6.8-79.el8_10.alma.1 | ALSA-2026:85239 | Nov 7, 2026 |
| platform-python-debug · ol 8 | 0:3.6.8-79.0.1.el8_10 | ELSA-2026-85239 | Nov 7, 2026 |
| platform-python-devel · RHEL 8 | 0:3.6.8-79.el8_10 | RHSA-2026:85239 | Oct 20, 2026 |
| platform-python-devel · almalinux 8 | 3.6.8-79.el8_10.alma.1 | ALSA-2026:85239 | Nov 7, 2026 |
| platform-python-devel · ol 8 | 0:3.6.8-79.0.1.el8_10 | ELSA-2026-85239 | Nov 7, 2026 |
| python-unversioned-command · RHEL 9 | 0:3.9.25-7.el9_8.6 | RHSA-2026:89742 | Oct 27, 2026 |
| python-unversioned-command · almalinux 9 | 3.9.25-7.el9_8.6 | ALSA-2026:89742 | Nov 7, 2026 |
| python-unversioned-command · ol 9 | 0:3.9.25-7.0.1.el9_8.6 | ELSA-2026-89742 | Nov 7, 2026 |
| python3 · RHEL 9 | 0:3.9.25-7.el9_8.6 | RHSA-2026:89742 | Oct 27, 2026 |
| python3 · almalinux 9 | 3.9.25-7.el9_8.6 | ALSA-2026:89742 | Nov 7, 2026 |
| python3 · ol 9 | 0:3.9.25-7.0.1.el9_8.6 | ELSA-2026-89742 | Nov 7, 2026 |
| python3 · rocky 8 | 0:3.6.8-79.el8_10.rocky.0 | RLSA-2026:85239 | Nov 7, 2026 |
| python3-debug · RHEL 9 | 0:3.9.25-7.el9_8.6 | RHSA-2026:89742 | Oct 27, 2026 |
| python3-debug · almalinux 9 | 3.9.25-7.el9_8.6 | ALSA-2026:89742 | Nov 7, 2026 |
| python3-debug · ol 9 | 0:3.9.25-7.0.1.el9_8.6 | ELSA-2026-89742 | Nov 7, 2026 |
| python3-devel · RHEL 9 | 0:3.9.25-7.el9_8.6 | RHSA-2026:89742 | Oct 27, 2026 |
| python3-devel · almalinux 9 | 3.9.25-7.el9_8.6 | ALSA-2026:89742 | Nov 7, 2026 |
| python3-devel · ol 9 | 0:3.9.25-7.0.1.el9_8.6 | ELSA-2026-89742 | Nov 7, 2026 |
| python3-idle · RHEL 8 | 0:3.6.8-79.el8_10 | RHSA-2026:85239 | Oct 20, 2026 |
| python3-idle · RHEL 9 | 0:3.9.25-7.el9_8.6 | RHSA-2026:89742 | Oct 27, 2026 |
| python3-idle · almalinux 8 | 3.6.8-79.el8_10.alma.1 | ALSA-2026:85239 | Nov 7, 2026 |
| python3-idle · almalinux 9 | 3.9.25-7.el9_8.6 | ALSA-2026:89742 | Nov 7, 2026 |
| python3-idle · ol 8 | 0:3.6.8-79.0.1.el8_10 | ELSA-2026-85239 | Nov 7, 2026 |
| python3-idle · ol 9 | 0:3.9.25-7.0.1.el9_8.6 | ELSA-2026-89742 | Nov 7, 2026 |
| python3-libs · RHEL 8 | 0:3.6.8-79.el8_10 | RHSA-2026:85239 | Oct 20, 2026 |
| python3-libs · RHEL 9 | 0:3.9.25-7.el9_8.6 | RHSA-2026:89742 | Oct 27, 2026 |
| python3-libs · almalinux 8 | 3.6.8-79.el8_10.alma.1 | ALSA-2026:85239 | Nov 7, 2026 |
| python3-libs · almalinux 9 | 3.9.25-7.el9_8.6 | ALSA-2026:89742 | Nov 7, 2026 |
| python3-libs · ol 8 | 0:3.6.8-79.0.1.el8_10 | ELSA-2026-85239 | Nov 7, 2026 |
| python3-libs · ol 9 | 0:3.9.25-7.0.1.el9_8.6 | ELSA-2026-89742 | Nov 7, 2026 |
| python3-test · RHEL 8 | 0:3.6.8-79.el8_10 | RHSA-2026:85239 | Oct 20, 2026 |
| python3-test · RHEL 9 | 0:3.9.25-7.el9_8.6 | RHSA-2026:89742 | Oct 27, 2026 |
| python3-test · almalinux 8 | 3.6.8-79.el8_10.alma.1 | ALSA-2026:85239 | Nov 7, 2026 |
| python3-test · almalinux 9 | 3.9.25-7.el9_8.6 | ALSA-2026:89742 | Nov 7, 2026 |
| python3-test · ol 8 | 0:3.6.8-79.0.1.el8_10 | ELSA-2026-85239 | Nov 7, 2026 |
| python3-test · ol 9 | 0:3.9.25-7.0.1.el9_8.6 | ELSA-2026-89742 | Nov 7, 2026 |
| python3-tkinter · RHEL 8 | 0:3.6.8-79.el8_10 | RHSA-2026:85239 | Oct 20, 2026 |
| python3-tkinter · RHEL 9 | 0:3.9.25-7.el9_8.6 | RHSA-2026:89742 | Oct 27, 2026 |
| python3-tkinter · almalinux 8 | 3.6.8-79.el8_10.alma.1 | ALSA-2026:85239 | Nov 7, 2026 |
| python3-tkinter · almalinux 9 | 3.9.25-7.el9_8.6 | ALSA-2026:89742 | Nov 7, 2026 |
| python3-tkinter · ol 8 | 0:3.6.8-79.0.1.el8_10 | ELSA-2026-85239 | Nov 7, 2026 |
| python3-tkinter · ol 9 | 0:3.9.25-7.0.1.el9_8.6 | ELSA-2026-89742 | Nov 7, 2026 |
| python3.12 · Fedora 43 | 3.12.16-2.fc43 | FEDORA-2026-4E3279AF04 | Nov 8, 2026 |
| python3.12-debug · Fedora 43 | 3.12.16-2.fc43 | FEDORA-2026-4E3279AF04 | Nov 8, 2026 |
| python3.12-debuginfo · Fedora 43 | 3.12.16-2.fc43 | FEDORA-2026-4E3279AF04 | Nov 8, 2026 |
| python3.12-debugsource · Fedora 43 | 3.12.16-2.fc43 | FEDORA-2026-4E3279AF04 | Nov 8, 2026 |
| python3.12-devel · Fedora 43 | 3.12.16-2.fc43 | FEDORA-2026-4E3279AF04 | Nov 8, 2026 |
| python3.12-idle · Fedora 43 | 3.12.16-2.fc43 | FEDORA-2026-4E3279AF04 | Nov 8, 2026 |
| python3.12-libs · Fedora 43 | 3.12.16-2.fc43 | FEDORA-2026-4E3279AF04 | Nov 8, 2026 |
| python3.12-test · Fedora 43 | 3.12.16-2.fc43 | FEDORA-2026-4E3279AF04 | Nov 8, 2026 |
| python3.12-tkinter · Fedora 43 | 3.12.16-2.fc43 | FEDORA-2026-4E3279AF04 | Nov 8, 2026 |
| python3.13 · Fedora 43 | 3.13.18-1.fc43 | FEDORA-2026-D6B8383232 | Nov 7, 2026 |
| python3.13-debug · Fedora 43 | 3.13.18-1.fc43 | FEDORA-2026-D6B8383232 | Nov 7, 2026 |
| python3.13-debuginfo · Fedora 43 | 3.13.18-1.fc43 | FEDORA-2026-D6B8383232 | Nov 7, 2026 |
| python3.13-debugsource · Fedora 43 | 3.13.18-1.fc43 | FEDORA-2026-D6B8383232 | Nov 7, 2026 |
| python3.13-devel · Fedora 43 | 3.13.18-1.fc43 | FEDORA-2026-D6B8383232 | Nov 7, 2026 |
| python3.13-freethreading · Fedora 43 | 3.13.18-1.fc43 | FEDORA-2026-D6B8383232 | Nov 7, 2026 |
| python3.13-freethreading-debug · Fedora 43 | 3.13.18-1.fc43 | FEDORA-2026-D6B8383232 | Nov 7, 2026 |
| python3.13-idle · Fedora 43 | 3.13.18-1.fc43 | FEDORA-2026-D6B8383232 | Nov 7, 2026 |
| python3.13-libs · Fedora 43 | 3.13.18-1.fc43 | FEDORA-2026-D6B8383232 | Nov 7, 2026 |
| python3.13-test · Fedora 43 | 3.13.18-1.fc43 | FEDORA-2026-D6B8383232 | Nov 7, 2026 |
| python3.13-tkinter · Fedora 43 | 3.13.18-1.fc43 | FEDORA-2026-D6B8383232 | Nov 7, 2026 |
| python3.14 · Debian 14 | 3.14.9-1 | DEBIAN-CVE-2026-12345 | Oct 16, 2026 |
| python3.15 · Debian 14 | 3.15.0~rc3-1 | DEBIAN-CVE-2026-12345 | Oct 16, 2026 |
| python3.9 · rocky 9 | 0:3.9.25-7.el9_8.6 | RLSA-2026:89742 | Nov 7, 2026 |
| No fix yet | |||
| Python 2 (Windows apps) | No fix yet | no-fix | n/a |
| Python 3.10 (Windows apps) | No fix yet | no-fix | n/a |
| Python 3.11 (Windows apps) | No fix yet | no-fix | n/a |
| Python 3.12 (Windows apps) | No fix yet | no-fix | n/a |
| Python 3.13 (Windows apps) | No fix yet | no-fix | n/a |
| Python 3.5 (Windows apps) | No fix yet | no-fix | n/a |
| Python 3.6 (Windows apps) | No fix yet | no-fix | n/a |
| Python 3.7 (Windows apps) | No fix yet | no-fix | n/a |
| Python 3.8 (Windows apps) | No fix yet | no-fix | n/a |
| Python 3.9 (Windows apps) | No fix yet | no-fix | n/a |
| Python3 (macOS) | No fix yet | no-fix | n/a |
Patch Radar data is free to use with attribution. Terms and how to credit it.
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.