CVE-2023-6597: Python Software Foundation Cpython

High severity, CVSS 7.8. EPSS: 0.3% chance of exploitation in the next 30 days.

An issue was found in the CPython `tempfile.TemporaryDirectory` class affecting versions 3.12.1, 3.11.7, 3.10.13, 3.9.18, and 3.8.18 and prior. The tempfile.TemporaryDirectory class would dereference symlinks during cleanup of permissions-related errors. This means users which can run privileged programs are potentially able to modify permissions of files referenced by symlinks in some circumstances.

Affected products

  • Python Software Foundation Cpython: before 3.8.19 (fixed in 3.8.19); from 3.9.0, before 3.9.19 (fixed in 3.9.19); from 3.10.0, before 3.10.14 (fixed in 3.10.14); from 3.11.0, before 3.11.8 (fixed in 3.11.8); from 3.12.0, before 3.12.1 (fixed in 3.12.1); from 3.13.0a1, before 3.13.0a3 (fixed in 3.13.0a3)

Published 2024-03-19. Last modified 2026-06-17.