CVE-2023-6597

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.

Published: 2024-03-19 Last update: 2026-06-17 Assigner: [email protected] Source: [email protected]

Conclusion & alert: CVE-2023-6597 is rated Low Risk (39.4/100): CVSS High severity, with low exploitation likelihood (EPSS 0.31%). Mandatory action: Monitor for updates and reassess as exploit intelligence or EPSS changes.

Risk is dynamic; we continuously reassess and refresh what is shown on this page as upstream context changes.

Exploit prediction scoring system (EPSS) score for CVE-2023-6597

EPSS lead: Daily EPSS estimates relative likelihood of exploitation; percentile ranks this CVE among scored vulnerabilities (higher = more severe relative rank).

# Date Old EPSS score New EPSS score Delta (New - Old)
1 2026-06-15 0.06% 0.31% +0.25%
2 2025-04-14 0.04% 0.06% +0.02%
3 2025-03-30 0.04%

Full EPSS history (7 records total)

Common vulnerability scoring system (CVSS) metrics for CVE-2023-6597

CVSS metrics for this CVE.

Base score Version Severity Vector Exploitability Impact Score source
7.8 3.1 HIGH
CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:N Click to expand
Attack vector (AV:L)
They already need access on the box, or another person has to do something wrong; it’s not a remote drive-by.
Attack complexity (AC:H)
Even with access, the exploit needs extra luck, timing, or a fussy environment to actually work.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:C)
Breaking this can reach past the original component and bite other resources—bigger blast radius.
Confidentiality (C:H)
Serious risk that confidential data gets exposed in a big way.
Integrity (I:H)
They could widely tamper with or forge data—trust in the data is badly hurt.
Availability (A:N)
Service keeps running; no real outage angle.
1.4 5.8 [email protected]

Weakness enumeration for CVE-2023-6597

OS Trackers for CVE-2023-6597

vendor priority summary link
alpine CVE-2023-6597: 1 source package rows (python3); 1 state rows across 1 repos (3.17-main); fixed 1, open 0. https://security.alpinelinux.org/vuln/CVE-2023-6597
debian unimportant CVE-2023-6597 unimportant priority: Debian including 4 source packages (pypy3, python2.7, python3.11, python3.9), 8 status rows across 5 suites (bookworm, bullseye, forky, sid, trixie): resolved 8. https://security-tracker.debian.org/tracker/CVE-2023-6597
gentoo high CVE-2023-6597: 1 GLSA(s) (202405-01), 4 atom(s) (dev-lang/python, dev-python/pypy3, dev-python/pypy3_10, dev-python/pypy3_9); latest impact high. https://bugs.gentoo.org/buglist.cgi?quicksearch=CVE-2023-6597
redhat high https://access.redhat.com/security/cve/CVE-2023-6597
suse high CVE-2023-6597 severity important: SUSE including 540 source package names (0.0.17-1.1:libpython3_6m1_0-3.6.15-150300.10.57.1, 0.0.17-1.1:python3-3.6.15-150300.10.57.1, …), 2327 product×package rows across 408 product lines (Container bci/bci-base-fips, Container bci/bci-sle15-kernel-module-devel, … (408 product lines)): Fixed 2019, Known Affected 200, Known Not Affected 108. https://www.suse.com/security/cve/CVE-2023-6597/
ubuntu medium CVE-2023-6597 medium priority: Ubuntu including 10 source packages (python2.7, python3.10, …), 89 status rows across 11 suites (bionic, focal, jammy, mantic, noble, oracular, plucky, questing, trusty, upstream, xenial): DNE 60, released 12, not-affected 9, needs-triage 8. https://ubuntu.com/security/CVE-2023-6597

Affected software / configurations for CVE-2023-6597

Vendor Product Version Raw CPE
No affected products in dataset.

References for CVE-2023-6597

URL Tags
http://www.openwall.com/lists/oss-security/2024/03/20/5
https://github.com/python/cpython/commit/02a9259c717738dfe6b463c44d7e17f2b6d2cb3a
https://github.com/python/cpython/commit/5585334d772b253a01a6730e8202ffb1607c3d25
https://github.com/python/cpython/commit/6ceb8aeda504b079fef7a57b8d81472f15cdd9a5
https://github.com/python/cpython/commit/81c16cd94ec38d61aa478b9a452436dc3b1b524d
https://github.com/python/cpython/commit/8eaeefe49d179ca4908d052745e3bb8b6f238f82
https://github.com/python/cpython/commit/d54e22a669ae6e987199bb5d2c69bb5a46b0083b
https://github.com/python/cpython/issues/91133
https://lists.debian.org/debian-lts-announce/2024/03/msg00025.html
https://lists.fedoraproject.org/archives/list/[email protected]/message/T3IGRX54M7RNCQOXVQO5KQKTGWCOABIM/
https://lists.fedoraproject.org/archives/list/[email protected]/message/U5VHWS52HGD743C47UMCSAK2A773M2YE/
https://mail.python.org/archives/list/[email protected]/thread/Q5C6ATFC67K53XFV4KE45325S7NS62LD/
https://lists.debian.org/debian-lts-announce/2024/11/msg00005.html
https://lists.debian.org/debian-lts-announce/2024/12/msg00000.html
cvelogic Threat Intelligence