[ CVE-2026-12345 · Published 29 Sep 2026 ]
Vulnerability in Python Software Foundation CPython
CVSS 5.9
EPSS <1%2 agency advisoriesFix available
[ Description ]Official 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.
[ Fixes ]Fixes and patches
- Security bulletin: Python PSF-2026-42Vendor patch or bulletin · CERT-FR · raw.githubusercontent.com/psf/advisory-database/main/advisories/python, cited by CERT-FR CERTFR-2026-AVI-1239
[ Advisories ]Government CERT advisories
-
CERT-FRCERTFR-2026-AVI-1239
Vulnerability in CPython Translated from French
A vulnerability has been discovered in CPython. It allows an attacker to cause a breach of data integrity.
-
BSI CERT-BundWID-SEC-2026-3656
CPython: Vulnerability allows bypassing security measures and file manipulation Translated from German
[ References ]References
- github.com/python/cpython/commit/06ef3d43fdaf4da97af12fa694b4886092c4b970
- github.com/python/cpython/commit/458e7134a5af7f86aee9d21b51cf499b41aa4420
- github.com/python/cpython/commit/58ed0259cae509a19138795df302fe60b544dc74
- github.com/python/cpython/commit/5c20517a4fc56683efe63a7751020db9573f538d
- github.com/python/cpython/commit/e1f3590f155c6d66007e958c98c9d69316551993
- github.com/python/cpython/issues/157579
- github.com/python/cpython/pull/157580
- www.openwall.com/lists/oss-security/2026/09/29/40