| Name | 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. |
| Source | CVE (at NVD; CERT, ENISA, LWN, oss-sec, fulldisc, Debian ELTS, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more) |
The table below lists information on source packages.
| Source Package | Release | Version | Status |
|---|---|---|---|
| pypy3 (PTS) | bookworm | 7.3.11+dfsg-2+deb12u3 | vulnerable |
| trixie | 7.3.19+dfsg-2 | vulnerable | |
| forky, sid | 8.0.0+dfsg-1 | vulnerable | |
| python3.11 (PTS) | bookworm | 3.11.2-6+deb12u8 | vulnerable |
| bookworm (security) | 3.11.2-6+deb12u3 | vulnerable | |
| python3.13 (PTS) | trixie | 3.13.5-2+deb13u5 | vulnerable |
| forky, sid | 3.13.15-1 | vulnerable | |
| python3.14 (PTS) | forky | 3.14.7-4 | vulnerable |
| sid | 3.14.7-5 | vulnerable | |
| python3.15 (PTS) | forky, sid | 3.15.0~rc2-3 | vulnerable |
The information below is based on the following data on fixed versions.
| Package | Type | Release | Fixed Version | Urgency | Origin | Debian Bugs |
|---|---|---|---|---|---|---|
| pypy3 | source | (unstable) | (unfixed) | |||
| python3.11 | source | (unstable) | (unfixed) | |||
| python3.13 | source | (unstable) | (unfixed) | |||
| python3.14 | source | (unstable) | (unfixed) | |||
| python3.15 | source | (unstable) | (unfixed) |
[trixie] - python3.13 <no-dsa> (Minor issue)
[trixie] - pypy3 <no-dsa> (Minor issue)
https://github.com/python/cpython/issues/157579
https://github.com/python/cpython/pull/157580