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.
Published: 2026-09-29
Score: 5.9 Medium
EPSS: < 1% Very Low
KEV: No
AI Analysis

Analysis and contextual insights are available on OpenCVE Cloud.

Remediation

No solution or workaround provided in the CVE record.

Additional remediation guidance may be available on OpenCVE Cloud.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Mon, 26 Oct 2026 02:15:00 +0100


Sat, 10 Oct 2026 03:15:00 +0200


Sat, 03 Oct 2026 03:15:00 +0200


Wed, 30 Sep 2026 23:15:00 +0200


Wed, 30 Sep 2026 02:15:00 +0200

Type Values Removed Values Added
References
Metrics threat_severity

None

cvssV3_1

{'score': 6.3, 'vector': 'CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:H/A:H'}

threat_severity

Moderate


Wed, 30 Sep 2026 00:30:00 +0200

Type Values Removed Values Added
References

Wed, 30 Sep 2026 00:00:00 +0200

Type Values Removed Values Added
First Time appeared Python
Python cpython
Vendors & Products Python
Python cpython

Tue, 29 Sep 2026 21:30:00 +0200

Type Values Removed Values Added
Weaknesses CWE-59
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Tue, 29 Sep 2026 20:15:00 +0200


Tue, 29 Sep 2026 20:00:00 +0200

Type Values Removed Values Added
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.
Title Race condition in tempfile.TemporaryDirectory cleanup allows deleting files outside the temporary directory
References
Metrics cvssV4_0

{'score': 5.9, 'vector': 'CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:N/VI:H/VA:H/SC:N/SI:N/SA:N'}


cve-icon MITRE

Status: PUBLISHED

Assigner: PSF

Published:

Updated: 2026-10-26T00:36:23.425Z

Reserved: 2026-06-15T19:08:01.497Z

Link: CVE-2026-12345

cve-icon Vulnrichment

Updated: 2026-09-29T21:07:55.567Z

cve-icon NVD

Status : Awaiting Analysis

Published: 2026-09-29T18:17:14.707

Modified: 2026-10-26T01:17:15.940

Link: CVE-2026-12345

cve-icon Redhat

Severity : Moderate

Publid Date: 2026-09-29T17:46:01Z

Links: CVE-2026-12345 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-09-30T00:45:18Z

Weaknesses
  • CWE-59

    Improper Link Resolution Before File Access ('Link Following')