Read the docs
TI-2026-10608 Aliases CVE-2026-12345

Race condition in tempfile.TemporaryDirectory cleanup allows deleting files outside the temporary directory

Priority LOW 26CWE-59Published · Updated

Key facts

Attack vector
Local
Privileges required
None
User interaction
None
Attack complexity
Low
Attack requirements
Present
Impact type
—
Confidentiality · integrity · availability
None · High · High
Fix status
Partial Red Hat: 7 fixed, 10 without a fix

Attack profile from CVSS 4.0 · CNA. Fix status from CNA and Red Hat.

Summary

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.

Why it matters now

Exploitation None reported CISA SSVC · not in CISA KEV
EPSS 0.00344 28th percentileScored 2026-11-07
Fix Partial CPython (Python Software Foundation): 3.12.15, 3.13.18, 3.14.9 +1Red Hat: 6 advisoriesRed Hat: 7 fixed, 10 without a fix

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
None
Automatable
No
Technical impact
Partial

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
Python Software FoundationCPythonbefore 3.12.15; 3.13.0 to before 3.13.18; 3.14.0 to before 3.14.9; 3.15.0a1 to before 3.15.0rc33.12.15, 3.13.18, 3.14.9, 3.15.0rc3Patch availableCNA
  • CPython VendorPython Software Foundation Affected before 3.12.15; 3.13.0 to before 3.13.18; 3.14.0 to before 3.14.9; 3.15.0a1 to before 3.15.0rc3 Fixed in 3.12.15, 3.13.18, 3.14.9, 3.15.0rc3 Patch available CNA

CPE names Threatist (inferred) · 1

Inferred from how NVD named this product before; not given by a source.

CPEVersionsRoleVendor
cpe:2.3:a:python:python:*:*:*:*:*:*:*:*——python-pillow
  • cpe:2.3:a:python:python:*:*:*:*:*:*:*:* Versions — — ·python-pillow

Remediation

  • Fix · CNA CPython (Python Software Foundation) Fixed in 3.12.15, 3.13.18, 3.14.9, 3.15.0rc3

Red Hat 6 advisories

  • RHSA-2026:94802 Released 2026-11-04 · Red Hat rating Critical
    A Subscription Management tool for finding and reporting Red Hat product usage
    • Red Hat Discovery 2 registry.redhat.io/discovery/discovery-server-rhel9, registry.redhat.io/discovery/discovery-ui-rhel9
  • RHSA-2026:89742 Released 2026-10-26 · Red Hat rating Important
    python3.9 security update
    • Red Hat Enterprise Linux AppStream (v. 9) python-unversioned-command-3.9.25-7.el9_8.6, python3-devel-3.9.25-7.el9_8.6, python3-tkinter-3.9.25-7.el9_8.6
    • Red Hat Enterprise Linux BaseOS (v. 9) python3-3.9.25-7.el9_8.6, python3-libs-3.9.25-7.el9_8.6, python3.9-3.9.25-7.el9_8.6
    • Red Hat Enterprise Linux CodeReady Linux Builder (v. 9) python3-3.9.25-7.el9_8.6, python3-debug-3.9.25-7.el9_8.6, python3-idle-3.9.25-7.el9_8.6 +2
  • RHSA-2026:85239 Released 2026-10-19 · Red Hat rating Important
    python3 security update
    • Red Hat Enterprise Linux AppStream (v. 8) platform-python-3.6.8-79.el8_10, platform-python-debug-3.6.8-79.el8_10, platform-python-devel-3.6.8-79.el8_10 +3
    • Red Hat Enterprise Linux BaseOS (v. 8) platform-python-3.6.8-79.el8_10, python3-3.6.8-79.el8_10, python3-libs-3.6.8-79.el8_10 +1
Show 3 more Red Hat advisories
  • RHSA-2026:75119 Released 2026-10-03 · Red Hat rating Moderate
    Red Hat Hardened Images RPMs bug fix and enhancement update
    • Red Hat Hardened Images python3.13-3.13.16-1.hum1@aarch64, python3.13-3.13.16-1.hum1@src, python3.13-3.13.16-1.hum1@x86_64 +16
  • RHSA-2026:74922 Released 2026-10-02 · Red Hat rating Moderate
    Red Hat Hardened Images RPMs bug fix and enhancement update
    • Red Hat Hardened Images python3.12-3.12.15-1.hum1@aarch64, python3.12-3.12.15-1.hum1@src, python3.12-3.12.15-1.hum1@x86_64 +12
  • RHSA-2026:74870 Released 2026-10-02 · Red Hat rating Moderate
    Red Hat Hardened Images RPMs bug fix and enhancement update
    • Red Hat Hardened Images python-unversioned-command-3.14.8-1.hum1@noarch@public-hummingbird-aarch64-rpms, python-unversioned-command-3.14.8-1.hum1@noarch@public-hummingbird-x86_64-rpms, python3-3.14.8-1.hum1@aarch64 +28

Vendor assessments

Red Hat

Red Hat rating: Moderate. Red Hat's page for this CVE →

ProductStatusPlan or fix
Red Hat Enterprise Linux 10AffectedNo fix yet
Red Hat Enterprise Linux 6AffectedNo fix planned: Out of support scope
Red Hat Enterprise Linux 7AffectedNo fix yet: Fix deferred
Red Hat Enterprise Linux 8AffectedNo fix yet: Fix deferred
Red Hat Enterprise Linux 9AffectedNo fix yet: Fix deferred
Red Hat Enterprise Linux AI (RHEL AI) 3AffectedNo fix yet: Fix deferred
Red Hat Hardened ImagesAffectedNo fix yet
Red Hat OpenShift AI (RHOAI)Affected—
Red Hat OpenShift Virtualization 4AffectedNo fix yet: Fix deferred
Self-service automation portal 2AffectedNo fix yet: Fix deferred
Red Hat Discovery 2Fixed RHSA-2026:94802
Red Hat Enterprise Linux AppStream (v. 8)Fixed RHSA-2026:85239
Red Hat Enterprise Linux AppStream (v. 9)Fixed RHSA-2026:89742
Red Hat Enterprise Linux BaseOS (v. 8)Fixed RHSA-2026:85239
Red Hat Enterprise Linux BaseOS (v. 9)Fixed RHSA-2026:89742
Red Hat Enterprise Linux CodeReady Linux Builder (v. 9)Fixed RHSA-2026:89742
Red Hat Hardened ImagesFixed RHSA-2026:74870, RHSA-2026:74922, RHSA-2026:75119

Timeline

  1. 2026-10-02 Threatist record created from CVE-2026-12345
  2. 2026-10-07 Affected versions changed · Red Hat
  3. 2026-10-10 1 new reference · CNA
  4. 2026-10-20 Fix available: RHSA-2026:85239 · Red Hat
  5. 2026-10-20 Fix available: Red Hat Enterprise Linux AppStream (v. 8), Red Hat Enterprise Linux BaseOS (v. 8) · Red Hat
  6. 2026-10-22 Fix available: Python Software Foundation/[email protected] · CNA
  7. 2026-10-26 Fix available: Python Software Foundation/[email protected] · CNA
  8. 2026-10-26 2 new references · CNA
  9. 2026-10-26 Fix available: RHSA-2026:89742 · Red Hat
  10. 2026-10-26 Fix available: Red Hat Enterprise Linux AppStream (v. 9), Red Hat Enterprise Linux BaseOS (v. 9), Red Hat Enterprise Linux CodeReady Linux Builder (v. 9) · Red Hat
  11. 2026-11-04 Fix available: RHSA-2026:94802 · Red Hat
  12. 2026-11-04 Fix available: Red Hat Discovery 2 · Red Hat
  13. 2026-11-06 Affected versions changed · Red Hat

References

  • TI-2024-07037 Quadratic complexity parsing cookies with backslashes CVSS 3.1HIGH 7.5
  • TI-2024-11791 Bypass extraction filter to modify file metadata outside extraction directory CVSS 3.1MEDIUM 5.3
  • TI-2024-00411 Quoted zip-bomb protection for zipfile CVSS 3.1MEDIUM 6.2
  • TI-2026-13296 `HTTPPasswordMgr` can send saved HTTPS credentials via HTTP because of incorrect scheme matching CVSS 4.0MEDIUM 6.0
  • TI-2024-06422 Email header injection due to unquoted newlines CVSS 3.1MEDIUM 5.5
  • TI-2026-04606 Possible to hijack modules in current working directory CVSS 4.0MEDIUM 5.6
See all 83 →

Sources