DHI-itr5-nyfq-tybe-u3q4
The cleanup of tempfile.TemporaryDirectory is vulnerable to a race condition. An attacker who can modify the tree…
UnscoredFix available
- CVSS
- —
- EPSS
- —
- Published
- 2026-11-19
- Age
- 14d old
- Modified
- 2026-12-01
- Product
- Docker Hardened Images:Alpine:3.23 python-3.10
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.
Fixed in
3.12.16-0 · 3.12.16-r0 · 3.13.18-0 · 3.13.18-r0 · 3.14.10-0 · 3.14.10-r0 · 3.15.0-r0
Affected packages
| Ecosystem | Package | Range | Fixed |
|---|---|---|---|
| Docker Hardened Images:Alpine:3.23 | python-3.12 | >=0, <3.12.16-r0 | 3.12.16-r0 |
| Docker Hardened Images:Alpine:3.23 | python-3.13 | >=0, <3.13.18-r0 | 3.13.18-r0 |
| Docker Hardened Images:Alpine:3.23 | python-3.14 | >=0, <3.14.10-r0 | 3.14.10-r0 |
| Docker Hardened Images:Alpine:3.23 | python-3.15 | >=0, <3.15.0-r0 | 3.15.0-r0 |
| Docker Hardened Images:Alpine:3.24 | python-3.12 | >=0, <3.12.16-r0 | 3.12.16-r0 |
| Docker Hardened Images:Alpine:3.24 | python-3.13 | >=0, <3.13.18-r0 | 3.13.18-r0 |
| Docker Hardened Images:Alpine:3.24 | python-3.14 | >=0, <3.14.10-r0 | 3.14.10-r0 |
| Docker Hardened Images:Debian:13 | python-3.12 | >=0, <3.12.16-0 | 3.12.16-0 |
| Docker Hardened Images:Debian:13 | python-3.13 | >=0, <3.13.18-0 | 3.13.18-0 |
| Docker Hardened Images:Debian:13 | python-3.14 | >=0, <3.14.10-0 | 3.14.10-0 |
Sources
- OSV · first seen 14d ago · CC-BY 4.0
References
- https://scout.docker.com/v/DHI-itr5-nyfq-tybe-u3q4 advisory
- https://github.com/python/cpython/pull/157580 fix
- https://github.com/python/cpython/commit/e1f3590f155c6d66007e958c98c9d69316551993 fix
- https://github.com/python/cpython/commit/c39b52d00b42200aaadff679e2fe3f1006d57c58 fix
- https://github.com/python/cpython/commit/5c20517a4fc56683efe63a7751020db9573f538d fix
- https://github.com/python/cpython/commit/58ed0259cae509a19138795df302fe60b544dc74 fix
- https://github.com/python/cpython/commit/458e7134a5af7f86aee9d21b51cf499b41aa4420 fix
- https://github.com/python/cpython/commit/06ef3d43fdaf4da97af12fa694b4886092c4b970 fix
- https://github.com/python/cpython/commit/0478b52788117db4b831b3efd648f56b777628aa fix
- https://github.com/python/cpython/issues/157579 web
- https://errata.almalinux.org/8/ALSA-2026-85239.html advisory
- https://access.redhat.com/errata/RHSA-2026:85239 advisory
- https://errata.almalinux.org/9/ALSA-2026-89742.html advisory
- https://access.redhat.com/errata/RHSA-2026:89742 advisory
- https://security.alpinelinux.org/vuln/CVE-2026-12345 advisory
- https://alas.aws.amazon.com/AL2023/ALAS-2026-3406.html advisory
- http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2026-87910 advisory
- http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2026-12345 advisory
- http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2026-115557 advisory
- http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2026-114583 advisory
- https://alas.aws.amazon.com/AL2023/ALAS-2026-3407.html advisory
- https://alas.aws.amazon.com/AL2023/ALAS-2026-3408.html advisory
- https://nvd.nist.gov/vuln/detail/CVE-2026-12345 advisory
- https://security-tracker.debian.org/tracker/CVE-2026-12345 advisory
- https://linux.oracle.com/cve/ELSA-2026-85239.html advisory