CVE-2023-6597 json
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 pr…
published 2024-03-19 2 y ago modified 2026-06-17 4 mo ago also BIT-libpython-2023-6597 , BIT-python-2023-6597 , BIT-python-min-2023-6597 , EUVD-2023-58821
- cvss
- 7.8
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.3%
- EPSS 0.3% chance of exploitation in 30 days, percentile 24%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- bitnami libpython 3.8.19, 3.9.19, 3.10.14, 3.11.8, 3.12.1
- bitnami python 3.8.19, 3.9.19, 3.10.14, 3.11.8, 3.12.1
- bitnami python-min 3.8.19, 3.9.19, 3.10.14, 3.11.8, 3.12.1
- Python Software Foundation CPython 3.8.19, 3.9.19, 3.10.14, 3.11.8, 3.12.1, 3.13.0a3
- python_software_foundation cpython 3.8.19, 3.9.19, 3.10.14, 3.11.8, 3.12.1, 3.13.0a3
- pypy3 Debian 12 7.3.11+dfsg-2+deb12u2
- pypy3 Debian 14, Debian 13 7.3.13+dfsg-1
- python3.11 Debian 12 3.11.2-6+deb12u2
debian advisories DEBIAN-CVE-2023-6597
- python3.8 Ubuntu 20.04 LTS 3.8.10-0ubuntu1~20.04.10
- python3.10 Ubuntu 22.04 LTS 3.10.12-1~22.04.4
- python3.5 Ubuntu Pro 16.04 LTS 3.5.2-2ubuntu0~16.04.13+esm13
- python3.7 Ubuntu Pro 18.04 LTS 3.7.5-2ubuntu1~18.04.2+esm3
- python3.8 Ubuntu Pro 18.04 LTS 3.8.0-3ubuntu1~18.04.2+esm2
- python3.9 Ubuntu Pro 20.04 LTS 3.9.5-3ubuntu0~20.04.1+esm2
- python3.11 Ubuntu Pro 22.04 LTS 3.11.0~rc1-1~22.04.1~esm1
ubuntu advisories UBUNTU-CVE-2023-6597
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- numpy RHEL 8 1.19.4-3.module+el8.9.0+19644+d68f775d
- scipy RHEL 8 1.5.4-5.module+el8.9.0+19644+d68f775d
- Cython RHEL 8 0.29.21-5.module+el8.9.0+19644+d68f775d
- pytest RHEL 8 6.0.2-2.module+el8.9.0+19644+d68f775d
- PyYAML RHEL 8 5.4.1-1.module+el8.9.0+19644+d68f775d
- mod_wsgi RHEL 8 4.7.1-7.module+el8.9.0+19644+d68f775d
- pybind11 RHEL 8 2.7.1-1.module+el8.9.0+19644+d68f775d
- python39 RHEL 8 3.9.19-1.module+el8.10.0+21815+bb024982
red hat advisories RHSA-2024:3466RHSA-2024:5689RHSA-2024:5535RHSA-2024:4370RHSA-2024:4166RHSA-2024:4078
- python311 Linux Micro 6.1 3.11.12-slfo.1.1_1.1
- python311-core Linux Micro 6.1 3.11.12-slfo.1.1_1.1
- python311 Linux Micro 6.0 3.11.11-1.1
- python311-core Linux Micro 6.0 3.11.11-1.1
- python36 SLES for SAP 12 SP5, SLES 12 SP5 3.6.15-55.1
- python36-core SLES for SAP 12 SP5, SLES 12 SP5, SLE Software Development Kit 12 SP5 3.6.15-55.1
- python311 SLES for SAP 15 SP4, SLES 15 SP4-LTSS, SLE Module for Python 3 15 SP5 +4 more 3.11.9-150400.9.26.1
- python311-core SLES for SAP 15 SP4, SLES 15 SP4-LTSS, SLE Module for Python 3 15 SP5 +4 more 3.11.9-150400.9.26.1
suse advisories SUSE-SU-2025:20374-1SUSE-SU-2025:20154-1SUSE-SU-2024:1847-1SUSE-SU-2024:1556-1SUSE-SU-2024:0782-2SUSE-SU-2024:1162-1
- python38 openSUSE Tumbleweed 3.8.18-5.1
- python310 openSUSE Tumbleweed 3.10.13-5.1
- python311 openSUSE Tumbleweed 3.11.8-3.1
- python39 openSUSE Tumbleweed 3.9.18-5.1
- python312 openSUSE Tumbleweed 3.12.2-4.1
opensuse advisories openSUSE-SU-2024:13736-1openSUSE-SU-2024:13739-1openSUSE-SU-2024:13740-1openSUSE-SU-2024:13741-1openSUSE-SU-2024:13744-1
- python3.11 AlmaLinux 9 3.11.7-1.el9_4.1
- python3.11-idle AlmaLinux 9 3.11.7-1.el9_4.1
- python3.11-libs AlmaLinux 9 3.11.7-1.el9_4.1
- python3.11-test AlmaLinux 9 3.11.7-1.el9_4.1
- python3.11-tkinter AlmaLinux 9 3.11.7-1.el9_4.1
- python3 AlmaLinux 9 3.9.18-3.el9_4.1
- python3-idle AlmaLinux 9 3.9.18-3.el9_4.1
- python3-libs AlmaLinux 9 3.9.18-3.el9_4.1
almalinux advisories ALSA-2024:4077ALSA-2024:4078ALSA-2024:4058ALSA-2024:3466ALSA-2024:3347
- python3.11 Rocky Linux 9 3.11.7-1.el9_4.1
- python3.9 Rocky Linux 9 3.9.18-3.el9_4.1
- numpy Rocky Linux 8 1.19.4-3.module+el8.10.0+1582+bc278001
- scipy Rocky Linux 8 1.5.4-5.module+el8.10.0+1582+bc278001
- Cython Rocky Linux 8 0.29.21-5.module+el8.10.0+1582+bc278001
- pytest Rocky Linux 8 6.0.2-2.module+el8.10.0+1582+bc278001
- PyYAML Rocky Linux 8 5.4.1-1.module+el8.10.0+1582+bc278001
- mod_wsgi Rocky Linux 8 4.7.1-7.module+el8.10.0+1582+bc278001
rocky linux advisories RLSA-2024:4077RLSA-2024:4078RLSA-2024:3466RLSA-2024:3347
- python3 Alpine 3.17, Alpine 3.16 3.10.14-r0
alpine advisories ALPINE-CVE-2023-6597
Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- python3 Azure Linux 3.0 3.12.3-1
- python3 CBL-Mariner 2.0 3.9.19-1
azure linux advisories AZL-35926AZL-35949
Azure Linux vulnerability data, Copyright (c) Microsoft Corporation, from https://github.com/microsoft/AzureLinuxVulnerabilityData via OSV, under the MIT licence; changed: normalised to fixed package versions per release. MIT
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2023-6597 updated cvss 7.8
python: Path traversal on tempfile.TemporaryDirectory
-
Red Hat CodeReady Linux Builder EUS (v.8.8) python3.11 3.11.2-2.el8_8.3, python3.11-idle 3.11.2-2.el8_8.3, python3.11-test 3.11.2-2.el8_8.3, python3.11-tkinter 3.11.2-2.el8_8.3fixed: vendor fix RHSA-2024:4370
-
Red Hat CodeReady Linux Builder EUS (v.9.2) python3 3.9.16-1.el9_2.5, python3.11 3.11.2-2.el9_2.4, python3-idle 3.9.16-1.el9_2.5, python3-test 3.9.16-1.el9_2.5, python3-tkinter 3.9.16-1.el9_2.5, python3.11-idle 3.11.2-2.el9_2.4, +2 morefixed: vendor fix RHSA-2024:5535
-
Red Hat Enterprise Linux AppStream (v. 8) python3.11 3.11.9-1.el8_10, python3-idle 3.6.8-62.el8_10, python3-test 3.6.8-62.el8_10, platform-python 3.6.8-62.el8_10, python3-tkinter 3.6.8-62.el8_10, python3.11-libs 3.11.9-1.el8_10, +57 morefixed: vendor fix RHSA-2024:3466
-
Red Hat Enterprise Linux AppStream (v. 9) python3.11 3.11.7-1.el9_4.1, python3-tkinter 3.9.18-3.el9_4.1, python3.11-libs 3.11.7-1.el9_4.1, python3.11-tkinter 3.11.7-1.el9_4.1, python-unversioned-command 3.9.18-3.el9_4.1fixed: vendor fix RHSA-2024:4078
-
Red Hat Enterprise Linux AppStream AUS (v. 8.2) python3-idle 3.6.8-24.el8_2.3, python3-test 3.6.8-24.el8_2.3, platform-python 3.6.8-24.el8_2.3, python3-tkinter 3.6.8-24.el8_2.3fixed: vendor fix RHSA-2024:4166
-
Red Hat Enterprise Linux AppStream AUS (v.8.4) python3-idle 3.6.8-39.el8_4.5, python3-test 3.6.8-39.el8_4.5, platform-python 3.6.8-39.el8_4.5, python3-tkinter 3.6.8-39.el8_4.5fixed: vendor fix RHSA-2024:4456
-
Red Hat Enterprise Linux AppStream AUS (v.8.6) python3-idle 3.6.8-47.el8_6.6, python3-test 3.6.8-47.el8_6.6, platform-python 3.6.8-47.el8_6.6, python3-tkinter 3.6.8-47.el8_6.6fixed: vendor fix RHSA-2024:4406
-
Red Hat Enterprise Linux AppStream E4S (v.8.4) python3-idle 3.6.8-39.el8_4.5, python3-test 3.6.8-39.el8_4.5, platform-python 3.6.8-39.el8_4.5, python3-tkinter 3.6.8-39.el8_4.5fixed: vendor fix RHSA-2024:4456
show 30 moreshow fewer
-
Red Hat Enterprise Linux AppStream E4S (v.8.6) python3-idle 3.6.8-47.el8_6.6, python3-test 3.6.8-47.el8_6.6, platform-python 3.6.8-47.el8_6.6, python3-tkinter 3.6.8-47.el8_6.6fixed: vendor fix RHSA-2024:4406
-
Red Hat Enterprise Linux AppStream E4S (v.9.0) python3-tkinter 3.9.10-4.el9_0.4, python-unversioned-command 3.9.10-4.el9_0.4fixed: vendor fix RHSA-2024:5689
-
Red Hat Enterprise Linux AppStream EUS (v.8.8) python3.11 3.11.2-2.el8_8.3, python3-idle 3.6.8-51.el8_8.6, python3-test 3.6.8-51.el8_8.6, platform-python 3.6.8-51.el8_8.6, python3-tkinter 3.6.8-51.el8_8.6, python3.11-libs 3.11.2-2.el8_8.3, +2 morefixed: vendor fix RHSA-2024:3391
-
Red Hat Enterprise Linux AppStream EUS (v.9.2) python3.11 3.11.2-2.el9_2.4, python3-tkinter 3.9.16-1.el9_2.5, python3.11-libs 3.11.2-2.el9_2.4, python3.11-tkinter 3.11.2-2.el9_2.4, python-unversioned-command 3.9.16-1.el9_2.5fixed: vendor fix RHSA-2024:5535
-
Red Hat Enterprise Linux AppStream TUS (v.8.4) python3-idle 3.6.8-39.el8_4.5, python3-test 3.6.8-39.el8_4.5, platform-python 3.6.8-39.el8_4.5, python3-tkinter 3.6.8-39.el8_4.5fixed: vendor fix RHSA-2024:4456
-
Red Hat Enterprise Linux AppStream TUS (v.8.6) python3-idle 3.6.8-47.el8_6.6, python3-test 3.6.8-47.el8_6.6, platform-python 3.6.8-47.el8_6.6, python3-tkinter 3.6.8-47.el8_6.6fixed: vendor fix RHSA-2024:4406
-
Red Hat Enterprise Linux BaseOS (v. 8) python3 3.6.8-62.el8_10, python3-libs 3.6.8-62.el8_10, python3-test 3.6.8-62.el8_10, platform-python 3.6.8-62.el8_10fixed: vendor fix RHSA-2024:3347
-
Red Hat Enterprise Linux BaseOS (v. 9) python3 3.9.18-3.el9_4.1, python3.9 3.9.18-3.el9_4.1, python3-libs 3.9.18-3.el9_4.1fixed: vendor fix RHSA-2024:4078
-
Red Hat Enterprise Linux BaseOS AUS (v. 8.2) python3 3.6.8-24.el8_2.3, python3-libs 3.6.8-24.el8_2.3, python3-test 3.6.8-24.el8_2.3, platform-python 3.6.8-24.el8_2.3fixed: vendor fix RHSA-2024:4166
-
Red Hat Enterprise Linux BaseOS AUS (v.8.4) python3 3.6.8-39.el8_4.5, python3-libs 3.6.8-39.el8_4.5, python3-test 3.6.8-39.el8_4.5, platform-python 3.6.8-39.el8_4.5fixed: vendor fix RHSA-2024:4456
-
Red Hat Enterprise Linux BaseOS AUS (v.8.6) python3 3.6.8-47.el8_6.6, python3-libs 3.6.8-47.el8_6.6, python3-test 3.6.8-47.el8_6.6, platform-python 3.6.8-47.el8_6.6fixed: vendor fix RHSA-2024:4406
-
Red Hat Enterprise Linux BaseOS E4S (v.8.4) python3 3.6.8-39.el8_4.5, python3-libs 3.6.8-39.el8_4.5, python3-test 3.6.8-39.el8_4.5, platform-python 3.6.8-39.el8_4.5fixed: vendor fix RHSA-2024:4456
-
Red Hat Enterprise Linux BaseOS E4S (v.8.6) python3 3.6.8-47.el8_6.6, python3-libs 3.6.8-47.el8_6.6, python3-test 3.6.8-47.el8_6.6, platform-python 3.6.8-47.el8_6.6fixed: vendor fix RHSA-2024:4406
-
Red Hat Enterprise Linux BaseOS E4S (v.9.0) python3 3.9.10-4.el9_0.4, python3.9 3.9.10-4.el9_0.4, python3-libs 3.9.10-4.el9_0.4fixed: vendor fix RHSA-2024:5689
-
Red Hat Enterprise Linux BaseOS EUS (v.8.8) python3 3.6.8-51.el8_8.6, python3-libs 3.6.8-51.el8_8.6, python3-test 3.6.8-51.el8_8.6, platform-python 3.6.8-51.el8_8.6fixed: vendor fix RHSA-2024:3391
-
Red Hat Enterprise Linux BaseOS EUS (v.9.2) python3 3.9.16-1.el9_2.5, python3.9 3.9.16-1.el9_2.5, python3-libs 3.9.16-1.el9_2.5fixed: vendor fix RHSA-2024:5535
-
Red Hat Enterprise Linux BaseOS TUS (v.8.4) python3 3.6.8-39.el8_4.5, python3-libs 3.6.8-39.el8_4.5, python3-test 3.6.8-39.el8_4.5, platform-python 3.6.8-39.el8_4.5fixed: vendor fix RHSA-2024:4456
-
Red Hat Enterprise Linux BaseOS TUS (v.8.6) python3 3.6.8-47.el8_6.6, python3-libs 3.6.8-47.el8_6.6, python3-test 3.6.8-47.el8_6.6, platform-python 3.6.8-47.el8_6.6fixed: vendor fix RHSA-2024:4406
-
Red Hat Enterprise Linux CRB (v. 8) python3.11 3.11.9-1.el8_10, python3.11-idle 3.11.9-1.el8_10, python3.11-test 3.11.9-1.el8_10, python3.11-tkinter 3.11.9-1.el8_10, pytest 6.0.2-2.module+el8.9.0+19644+d68f775d, Cython 0.29.21-5.module+el8.9.0+19644+d68f775d, +20 morefixed: vendor fix RHSA-2024:3466
-
Red Hat Enterprise Linux CRB (v. 9) python3 3.9.18-3.el9_4.1, python3.11 3.11.7-1.el9_4.1, python3-idle 3.9.18-3.el9_4.1, python3-test 3.9.18-3.el9_4.1, python3-tkinter 3.9.18-3.el9_4.1, python3.11-idle 3.11.7-1.el9_4.1, +2 morefixed: vendor fix RHSA-2024:4078
-
Red Hat OpenShift Container Platform 4.12 rhcos 412.86.202501011408-0fixed: vendor fix RHSA-2025:0832
-
Red Hat OpenShift Container Platform 4.13 rhcos 413.92.202501201944-0fixed: vendor fix RHSA-2025:1116
-
Red Hat OpenShift Container Platform 4.14 rhcos 414.92.202501150310-0fixed: vendor fix RHSA-2025:0364
-
Red Hat OpenShift Container Platform 4.15 rhcos 415.92.202501152057-0fixed: vendor fix RHSA-2025:0646
-
Red Hat OpenShift Container Platform 4.16 rhcos 416.94.202501220853-0fixed: vendor fix RHSA-2025:0650
-
Red Hat OpenShift Container Platform 4.17 rhcos 417.94.202502051822-0fixed: vendor fix RHSA-2025:1120
-
Red Hat OpenShift Container Platform 4.18 rhcos 418.94.202503102036-0fixed: vendor fix RHSA-2025:2705
-
Red Hat Service Interconnect 1 service-interconnect/skupper-router-rhel9 2.5.3-2fixed: vendor fix RHSA-2024:4871
-
Red Hat Service Interconnect 1.4 service-interconnect/skupper-router-rhel9 2.4.3-5fixed: vendor fix RHSA-2024:4865
-
Red Hat Enterprise Linux 6 python, tkinter, python-libs, python-test, python-tools Red Hat Enterprise Linux 7 python, python3, tkinter, python-libs, python-test, python-tools, +4 more Red Hat Enterprise Linux 8 scipy, python2, python36, python3.12, python-nose, python-wheel, +30 morenot affected: vulnerable code not present
13 more not affected in the full advisory
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
CISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- total
- Assessed
- 2 y ago
Exploit prediction
0.31% chance of exploitation in the next 30 days, higher than 24% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 7.8 | CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:N |
| OSV | 3.1 | 7.8 | CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| bitnami | libpython | <3.8.19 >=3.9.0, <3.9.19 >=3.10.0, <3.10.14 >=3.11.0, <3.11.8 >=3.12.0, <3.12.1 |
3.8.19 3.9.19 3.10.14 3.11.8 3.12.1 |
| bitnami | python | <3.8.19 >=3.9.0, <3.9.19 >=3.10.0, <3.10.14 >=3.11.0, <3.11.8 >=3.12.0, <3.12.1 |
3.8.19 3.9.19 3.10.14 3.11.8 3.12.1 |
| bitnami | python-min | <3.8.19 >=3.9.0, <3.9.19 >=3.10.0, <3.10.14 >=3.11.0, <3.11.8 >=3.12.0, <3.12.1 |
3.8.19 3.9.19 3.10.14 3.11.8 3.12.1 |
Affected products
- Python Software Foundation CPython
- python_software_foundation cpython
References
-
github.com
/python/cpython/commit/81c16cd94ec38d61aa478b9a452436dc3b1b524d
patch, web
-
github.com
/python/cpython/commit/6ceb8aeda504b079fef7a57b8d81472f15cdd9a5
patch, web
-
github.com
/python/cpython/commit/5585334d772b253a01a6730e8202ffb1607c3d25
patch, web
-
github.com
/python/cpython/commit/8eaeefe49d179ca4908d052745e3bb8b6f238f82
patch, web
-
github.com
/python/cpython/commit/d54e22a669ae6e987199bb5d2c69bb5a46b0083b
patch, web
-
github.com
/python/cpython/commit/02a9259c717738dfe6b463c44d7e17f2b6d2cb3a
patch, web
-
mail.python.org
/archives/list/security-announce@python.org/thread/Q5C6ATFC67K53XFV4KE45325S7NS62LD/
vendor-advisory, web
-
github.com
/python/cpython/issues/91133
issue-tracking, web
-
lists.debian.org
/debian-lts-announce/2024/03/msg00025.html
web
-
openwall.com
/lists/oss-security/2024/03/20/5
web
-
lists.fedoraproject.org
/archives/list/package-announce@lists.fedoraproject.org/message/T3IGRX54M7RNCQOXVQO5KQKTGWCOABIM/
web
-
lists.fedoraproject.org
/archives/list/package-announce@lists.fedoraproject.org/message/U5VHWS52HGD743C47UMCSAK2A773M2YE/
web
-
lists.debian.org
/debian-lts-announce/2024/12/msg00000.html
web
-
lists.debian.org
/debian-lts-announce/2024/11/msg00005.html
web
-
nvd.nist.gov
/vuln/detail/CVE-2023-6597
web
Sources
- CVE List CVE-2023-6597
- NVD CVE-2023-6597
- OSV BIT-libpython-2023-6597
- OSV BIT-python-2023-6597
- OSV BIT-python-min-2023-6597
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.
CPEs and fixed versions use Anchore's correction of NVD's data: Added CPE configurations because not yet analyzed by NVD.