5.9

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

Awaiting analysis
AliasesRHSA-2026:74870RHSA-2026:74922RHSA-2026:75119
Published 29-09-2026Last modified 01-12-2026

Vulnerability summary

CVE-2026-12345 is a medium (CVSS 5.9) vulnerability in python software foundation cpython. EPSS estimates a 0.36% chance of exploitation in the next 30 days, higher than 31.4% of scored vulnerabilities.

Priority
Routine

Not severe (CVSS 5.9, local access); no exploitation reported by the 5 checked sources

Source freshness unavailable

How is this decided?
CVSS score
5.9/10
010
Medium · v4.0 (CVE.org)
EPSS score
0.36%
0%100%
Low · +0.01 pp in 30 days
KEVNot listedNot listed by any tracked catalog.
RansomwareNot flaggedNo ransomware use recorded.
Public exploits0No public exploits recorded

Advisory lineage

Upstream 0 · Downstream 7 · Related 3

Timeline

  1. 29-09-2026
    PublishedVulnerability first disclosed.
  2. 01-12-2026
    Last modifiedVulnerability information updated.

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.

CVSS metrics

8 scores · 8 sources · 2 versions

EPSS trend

Probability

0.36%

Chance of exploitation in the next 30 days

Percentile

31%

Versus all other CVEs

30-day change

Increase +0.01 pp

From 0.34% on 04-11-2026

04-11-202604-12-2026

Known exploited

Compare KEV catalogs
CISA KEV

Not in the CISA KEV catalog.

ENISA CNW

Not in the ENISA CNW catalog.

CIRCL

Not in the CIRCL catalog.

Public exploits

0 found

No public exploits indexed.

Weaknesses

CWE · root cause

Affected systems

Version check

Known conditions: local access, no authentication, no user interaction (CVSS vector). Other conditions: not stated in public data.

Redhat34 products
  • python-unversioned-command< 0:3.12.15-1.el10_2.2 | < 0:3.14.8-1.hum1 | < 0:3.12.16-2.el10_3
  • python3< 0:3.12.15-1.el10_2.2 | < 0:3.14.8-1.hum1 | < 0:3.12.16-2.el10_3
  • python3-debug< 0:3.12.15-1.el10_2.2 | < 0:3.14.8-1.hum1 | < 0:3.12.16-2.el10_3
  • python3-devel< 0:3.12.15-1.el10_2.2 | < 0:3.14.8-1.hum1 | < 0:3.12.16-2.el10_3
  • python3-idle< 0:3.12.15-1.el10_2.2 | < 0:3.14.8-1.hum1 | < 0:3.12.16-2.el10_3
Ubuntu11 products
  • python2.7All versions (No fix recorded)
  • python3.10All versions (No fix recorded)
  • python3.11All versions (No fix recorded)
  • python3.12All versions (No fix recorded)
  • python3.14All versions (No fix recorded)
Chainguard6 products
  • python-3.10All versions (No fix recorded)
  • python-3.11All versions (No fix recorded)
  • python-3.12All versions (No fix recorded) | < 3.12.16-r0
  • python-3.13All versions (No fix recorded) | < 3.13.18_git20261030-r0
  • python-3.14All versions (No fix recorded) | < 3.14.8_git20261014-r0
Wolfi6 products
  • python-3.10All versions (No fix recorded)
  • python-3.11All versions (No fix recorded)
  • python-3.12All versions (No fix recorded) | < 3.12.16-r0
  • python-3.13All versions (No fix recorded) | < 3.13.18_git20261030-r0
  • python-3.14All versions (No fix recorded) | < 3.14.8_git20261014-r0
Debian5 products
  • pypy3All versions (No fix recorded)
  • python3.11All versions (No fix recorded)
  • python3.13All versions (No fix recorded)
  • python3.14All versions (No fix recorded) | < 3.14.9-1
  • python3.15All versions (No fix recorded) | < 3.15.0~rc3-1
Alpine1 product
  • python3< 3.12.16-r0 | < 3.14.10-r0 | < 3.14.9-r2
Python software foundation1 product
  • cpython< 3.12.15 | ≥ 3.13.0, < 3.13.18 | ≥ 3.14.0, < 3.14.9 | ≥ 3.15.0a1, < 3.15.0rc3

7 vendors · 64 products

References

36 links
Show all 36 references