CVE-2026-12345

NameCVE-2026-12345
DescriptionThe 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.
SourceCVE (at NVD; CERT, ENISA, LWN, oss-sec, fulldisc, Debian ELTS, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more)

Vulnerable and fixed packages

The table below lists information on source packages.

Source PackageReleaseVersionStatus
pypy3 (PTS)bookworm7.3.11+dfsg-2+deb12u3vulnerable
trixie7.3.19+dfsg-2vulnerable
forky, sid8.0.0+dfsg-1vulnerable
python3.11 (PTS)bookworm3.11.2-6+deb12u8vulnerable
bookworm (security)3.11.2-6+deb12u3vulnerable
python3.13 (PTS)trixie3.13.5-2+deb13u5vulnerable
forky, sid3.13.15-1vulnerable
python3.14 (PTS)forky3.14.7-4vulnerable
sid3.14.7-5vulnerable
python3.15 (PTS)forky, sid3.15.0~rc2-3vulnerable

The information below is based on the following data on fixed versions.

PackageTypeReleaseFixed VersionUrgencyOriginDebian Bugs
pypy3source(unstable)(unfixed)
python3.11source(unstable)(unfixed)
python3.13source(unstable)(unfixed)
python3.14source(unstable)(unfixed)
python3.15source(unstable)(unfixed)

Notes

[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

Search for package or bug name: Reporting problems