Security mailing lists by PureSourceCode

CVE-2026-12345

MEDIUM 5.9CVSS 4.0

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

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
29 Sep 2026
Last modified
1 Dec 2026
Assigned by
cna@python.org
NVD status
Awaiting Analysis
Weakness
CWE-59
Sources
NVDJSONCVE ListJSON

Scores

SourceScored byVersionScoreVector / decision
NVD cna@python.org (Secondary) CVSS 4.0 MEDIUM 5.9 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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
CVE List PSF CVSS 4.0 MEDIUM 5.9 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 List CISA-ADP SSVC Exploitation: none; Automatable: no; Technical Impact: partial

Affected

SourceVendor / ecosystemProduct / packageAffected versionsFixed in
CVE List 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 3.12.15, 3.13.18, 3.14.9, 3.15.0rc3

References

History

  • 1 Dec 2026 01:28 UTC · NVD: 3 references added
  • 1 Dec 2026 00:56 UTC · CVE List: 3 references added
  • 25 Nov 2026 20:10 UTC · CVE List: first stored (published 29 Sep 2026)
  • 25 Nov 2026 20:10 UTC · NVD: first stored (published 29 Sep 2026)
An unhandled error has occurred. Reload ×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.