Vulnerability · Published Mar 19, 2024 · Assigned by PSF

CVE-2023-6597

High 7.8

In plain English

A high-severity security flaw in CPython from Python Software Foundation. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.3% (higher than 24% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)7.8High
Exploit odds (30 days)0.3%top 75.7% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official description

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 packages & fixed versions

EcosystemPackageFixed inAdvisory
AlmaLinux:8platform-python3.6.8-62.el8_10.alma.1ALSA-2024:3347
AlmaLinux:8platform-python-debug3.6.8-62.el8_10.alma.1ALSA-2024:3347
AlmaLinux:8platform-python-devel3.6.8-62.el8_10.alma.1ALSA-2024:3347
AlmaLinux:9python-unversioned-command3.9.18-3.el9_4.1ALSA-2024:4078
AlmaLinux:9python33.9.18-3.el9_4.1ALSA-2024:4078
AlmaLinux:9python3-debug3.9.18-3.el9_4.1ALSA-2024:4078
AlmaLinux:9python3-devel3.9.18-3.el9_4.1ALSA-2024:4078
AlmaLinux:8python3-idle3.6.8-62.el8_10.alma.1ALSA-2024:3347
AlmaLinux:9python3-idle3.9.18-3.el9_4.1ALSA-2024:4078
AlmaLinux:8python3-libs3.6.8-62.el8_10.alma.1ALSA-2024:3347
AlmaLinux:9python3-libs3.9.18-3.el9_4.1ALSA-2024:4078
AlmaLinux:8python3-test3.6.8-62.el8_10.alma.1ALSA-2024:3347
AlmaLinux:9python3-test3.9.18-3.el9_4.1ALSA-2024:4078
AlmaLinux:8python3-tkinter3.6.8-62.el8_10.alma.1ALSA-2024:3347
AlmaLinux:9python3-tkinter3.9.18-3.el9_4.1ALSA-2024:4078
AlmaLinux:8python3.113.11.9-1.el8_10ALSA-2024:4058
AlmaLinux:9python3.113.11.7-1.el9_4.1ALSA-2024:4077
AlmaLinux:8python3.11-debug3.11.9-1.el8_10ALSA-2024:4058
AlmaLinux:9python3.11-debug3.11.7-1.el9_4.1ALSA-2024:4077
AlmaLinux:8python3.11-devel3.11.9-1.el8_10ALSA-2024:4058
AlmaLinux:9python3.11-devel3.11.7-1.el9_4.1ALSA-2024:4077
AlmaLinux:8python3.11-idle3.11.9-1.el8_10ALSA-2024:4058
AlmaLinux:9python3.11-idle3.11.7-1.el9_4.1ALSA-2024:4077
AlmaLinux:8python3.11-libs3.11.9-1.el8_10ALSA-2024:4058
AlmaLinux:9python3.11-libs3.11.7-1.el9_4.1ALSA-2024:4077
AlmaLinux:8python3.11-rpm-macros3.11.9-1.el8_10ALSA-2024:4058
AlmaLinux:8python3.11-test3.11.9-1.el8_10ALSA-2024:4058
AlmaLinux:9python3.11-test3.11.7-1.el9_4.1ALSA-2024:4077
AlmaLinux:8python3.11-tkinter3.11.9-1.el8_10ALSA-2024:4058
AlmaLinux:9python3.11-tkinter3.11.7-1.el9_4.1ALSA-2024:4077
AlmaLinux:8python393.9.19-1.module_el8.10.0+3849+a48d89aaALSA-2024:3466
AlmaLinux:8python39-Cython0.29.21-5.module_el8.6.0+2780+a40f65e1ALSA-2024:3466
AlmaLinux:8python39-Cython0.29.21-5.module_el8.6.0+3248+c431e88cALSA-2024:3466
AlmaLinux:8python39-PyMySQL0.10.1-2.module_el8.6.0+2780+a40f65e1ALSA-2024:3466
AlmaLinux:8python39-attrs20.3.0-2.module_el8.6.0+2780+a40f65e1ALSA-2024:3466
AlmaLinux:8python39-cffi1.14.3-2.module_el8.6.0+2780+a40f65e1ALSA-2024:3466
AlmaLinux:8python39-cffi1.14.3-2.module_el8.6.0+3248+c431e88cALSA-2024:3466
AlmaLinux:8python39-chardet3.0.4-19.module_el8.6.0+2780+a40f65e1ALSA-2024:3466
AlmaLinux:8python39-cryptography3.3.1-3.module_el8.10.0+3765+2f9a457dALSA-2024:3466
AlmaLinux:8python39-debug3.9.19-1.module_el8.10.0+3849+a48d89aaALSA-2024:3466
AlmaLinux:8python39-devel3.9.19-1.module_el8.10.0+3849+a48d89aaALSA-2024:3466
AlmaLinux:8python39-idle3.9.19-1.module_el8.10.0+3849+a48d89aaALSA-2024:3466
AlmaLinux:8python39-idna2.10-4.module_el8.10.0+3849+a48d89aaALSA-2024:3466
AlmaLinux:8python39-iniconfig1.1.1-2.module_el8.6.0+2780+a40f65e1ALSA-2024:3466
AlmaLinux:8python39-libs3.9.19-1.module_el8.10.0+3849+a48d89aaALSA-2024:3466
AlmaLinux:8python39-lxml4.6.5-1.module_el8.6.0+3248+c431e88cALSA-2024:3466
AlmaLinux:8python39-lxml4.6.5-1.module_el8.6.0+2780+a40f65e1ALSA-2024:3466
AlmaLinux:8python39-mod_wsgi4.7.1-7.module_el8.9.0+3634+fb2a896cALSA-2024:3466
AlmaLinux:8python39-more-itertools8.5.0-2.module_el8.6.0+2780+a40f65e1ALSA-2024:3466
AlmaLinux:8python39-numpy1.19.4-3.module_el8.6.0+3248+c431e88cALSA-2024:3466
AlmaLinux:8python39-numpy1.19.4-3.module_el8.6.0+2780+a40f65e1ALSA-2024:3466
AlmaLinux:8python39-numpy-doc1.19.4-3.module_el8.6.0+2780+a40f65e1ALSA-2024:3466
AlmaLinux:8python39-numpy-f2py1.19.4-3.module_el8.6.0+2780+a40f65e1ALSA-2024:3466
AlmaLinux:8python39-numpy-f2py1.19.4-3.module_el8.6.0+3248+c431e88cALSA-2024:3466
AlmaLinux:8python39-packaging20.4-4.module_el8.6.0+2780+a40f65e1ALSA-2024:3466
AlmaLinux:8python39-pip20.2.4-9.module_el8.10.0+3765+2f9a457dALSA-2024:3466
AlmaLinux:8python39-pip-wheel20.2.4-9.module_el8.10.0+3765+2f9a457dALSA-2024:3466
AlmaLinux:8python39-pluggy0.13.1-3.module_el8.6.0+2780+a40f65e1ALSA-2024:3466
AlmaLinux:8python39-ply3.11-10.module_el8.6.0+2780+a40f65e1ALSA-2024:3466
AlmaLinux:8python39-psutil5.8.0-4.module_el8.6.0+2780+a40f65e1ALSA-2024:3466
AlmaLinux:8python39-psutil5.8.0-4.module_el8.6.0+3248+c431e88cALSA-2024:3466
AlmaLinux:8python39-psycopg22.8.6-3.module_el8.10.0+3765+2f9a457dALSA-2024:3466
AlmaLinux:8python39-psycopg2-doc2.8.6-3.module_el8.10.0+3765+2f9a457dALSA-2024:3466
AlmaLinux:8python39-psycopg2-tests2.8.6-3.module_el8.10.0+3765+2f9a457dALSA-2024:3466
AlmaLinux:8python39-py1.10.0-1.module_el8.6.0+2780+a40f65e1ALSA-2024:3466
AlmaLinux:8python39-pybind112.7.1-1.module_el8.6.0+2780+a40f65e1ALSA-2024:3466
AlmaLinux:8python39-pybind112.7.1-1.module_el8.6.0+3248+c431e88cALSA-2024:3466
AlmaLinux:8python39-pybind11-devel2.7.1-1.module_el8.6.0+3248+c431e88cALSA-2024:3466
AlmaLinux:8python39-pybind11-devel2.7.1-1.module_el8.6.0+2780+a40f65e1ALSA-2024:3466
AlmaLinux:8python39-pycparser2.20-3.module_el8.6.0+2780+a40f65e1ALSA-2024:3466
AlmaLinux:8python39-pyparsing2.4.7-5.module_el8.6.0+2780+a40f65e1ALSA-2024:3466
AlmaLinux:8python39-pysocks1.7.1-4.module_el8.6.0+2780+a40f65e1ALSA-2024:3466
AlmaLinux:8python39-pytest6.0.2-2.module_el8.6.0+2780+a40f65e1ALSA-2024:3466
AlmaLinux:8python39-pyyaml5.4.1-1.module_el8.6.0+2780+a40f65e1ALSA-2024:3466
AlmaLinux:8python39-pyyaml5.4.1-1.module_el8.6.0+3248+c431e88cALSA-2024:3466
AlmaLinux:8python39-requests2.25.0-3.module_el8.9.0+3634+fb2a896cALSA-2024:3466
AlmaLinux:8python39-rpm-macros3.9.19-1.module_el8.10.0+3849+a48d89aaALSA-2024:3466
AlmaLinux:8python39-scipy1.5.4-5.module_el8.9.0+3634+fb2a896cALSA-2024:3466
AlmaLinux:8python39-setuptools50.3.2-5.module_el8.10.0+3765+2f9a457dALSA-2024:3466
AlmaLinux:8python39-setuptools-wheel50.3.2-5.module_el8.10.0+3765+2f9a457dALSA-2024:3466
AlmaLinux:8python39-six1.15.0-3.module_el8.6.0+2780+a40f65e1ALSA-2024:3466
AlmaLinux:8python39-test3.9.19-1.module_el8.10.0+3849+a48d89aaALSA-2024:3466
AlmaLinux:8python39-tkinter3.9.19-1.module_el8.10.0+3849+a48d89aaALSA-2024:3466
AlmaLinux:8python39-toml0.10.1-5.module_el8.6.0+2780+a40f65e1ALSA-2024:3466
AlmaLinux:8python39-urllib31.25.10-5.module_el8.10.0+3765+2f9a457dALSA-2024:3466
AlmaLinux:8python39-wcwidth0.2.5-3.module_el8.6.0+2780+a40f65e1ALSA-2024:3466
AlmaLinux:8python39-wheel1:0.35.1-4.module_el8.6.0+2780+a40f65e1ALSA-2024:3466
AlmaLinux:8python39-wheel-wheel1:0.35.1-4.module_el8.6.0+2780+a40f65e1ALSA-2024:3466
Debian:12pypy37.3.11+dfsg-2+deb12u2DEBIAN-CVE-2023-6597
Debian:13pypy37.3.13+dfsg-1DEBIAN-CVE-2023-6597
Debian:14pypy37.3.13+dfsg-1DEBIAN-CVE-2023-6597
Debian:12python3.113.11.2-6+deb12u2DEBIAN-CVE-2023-6597
Rocky Linux:8python30:3.6.8-62.el8_10.rocky.0RLSA-2024:3347
Rocky Linux:9python3.110:3.11.7-1.el9_4.1RLSA-2024:4077
Rocky Linux:9python3.90:3.9.18-3.el9_4.1RLSA-2024:4078
Ubuntu:22.04:LTSpython3.103.10.12-1~22.04.4USN-6891-1
Ubuntu:22.04:LTSpython3.103.10.12-1~22.04.4UBUNTU-CVE-2023-6597

Affected products (as reported)

VendorProductVersions
Python Software Foundation CPython 0 – before 3.8.193.9.0 – before 3.9.193.10.0 – before 3.10.143.11.0 – before 3.11.83.12.0 – before 3.12.13.13.0a1 – before 3.13.0a3

References