5.9Media

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

Python Software Foundation CPython Publicada: (hace 1 mes)

Descripción

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.

Debilidad (CWE): CWE-59

Datos: CVE.org, NVD, CISA KEV, FIRST EPSS, Ubuntu. Se publican tal como los indican las fuentes, en inglés.

Productos y versiones afectados

FabricanteProductoVersiones
Python Software Foundation CPython < 3.12.15, 3.13.0 – < 3.13.18, 3.14.0 – < 3.14.9, 3.15.0a1 – < 3.15.0rc3

Referencias y parches