PT-2023-8833 · Python+11 · Cpython+11

Ee Durbin

·

Published

2023-12-08

·

Updated

2025-08-11

·

CVE-2023-6597

CVSS v3.1

7.8

High

VectorAV:L/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:N
Name of the Vulnerable Software and Affected Versions CPython versions 3.12.1 through 3.12.1 CPython versions 3.11.7 through 3.11.7 CPython versions 3.10.13 through 3.10.13 CPython versions 3.9.18 through 3.9.18 CPython versions 3.8.18 and prior
Description The issue is related to the tempfile.TemporaryDirectory class in CPython, which would dereference symlinks during cleanup of permissions-related errors. This could allow users who can run privileged programs to modify permissions of files referenced by symlinks in some circumstances.
Recommendations For CPython versions 3.12.1, 3.11.7, 3.10.13, 3.9.18, and 3.8.18 and prior, consider disabling the tempfile.TemporaryDirectory class until a patch is available. Restrict access to the tempfile module to minimize the risk of exploitation. Avoid using the tempfile.TemporaryDirectory class in situations where symlinks are involved until the issue is resolved. At the moment, there is no information about a newer version that contains a fix for this vulnerability.

Exploit

Found an issue in the description? Have something to add? Feel free to write us 👾

Weakness Enumeration

Related Identifiers

ALSA-2024:3347
ALSA-2024:3466
ALSA-2024:4058
ALSA-2024:4077
ALSA-2024:4078
AZL-35926
AZL-35949
BDU:2024-02120
BIT-LIBPYTHON-2023-6597
BIT-PYTHON-2023-6597
BIT-PYTHON-MIN-2023-6597
CESA-2024_3347
CESA-2024_3466
CESA-2024_4058
CVE-2023-6597
DLA-3772-1
DLA-3948-1
DLA-3980-1
INFSA-2024_3347
INFSA-2024_3466
INFSA-2024_4058
INFSA-2024_4077
INFSA-2024_4078
MGASA-2024-0096
OESA-2024-2190
OESA-2024-2191
OESA-2024-2192
OESA-2024-2193
OPENSUSE-SU-2024:13736-1
OPENSUSE-SU-2024:13739-1
OPENSUSE-SU-2024:13740-1
OPENSUSE-SU-2024:13741-1
OPENSUSE-SU-2024:13744-1
OPENSUSE-SU-2024_0784-1
OPENSUSE-SU-2024_1162-1
PSF-2024-1
RHSA-2024:3347
RHSA-2024:3391
RHSA-2024:3466
RHSA-2024:4058
RHSA-2024:4077
RHSA-2024:4078
RHSA-2024:4166
RHSA-2024:4370
RHSA-2024:4406
RHSA-2024:4456
RHSA-2024:4896
RHSA-2024:5535
RHSA-2024:5689
RHSA-2024_3347
RHSA-2024_3466
RHSA-2024_4058
RHSA-2024_4077
RHSA-2024_4078
RLSA-2024:3347
RLSA-2024:3466
RLSA-2024:4077
RLSA-2024:4078
SUSE-SU-2024:0782-1
SUSE-SU-2024:0782-2
SUSE-SU-2024:0784-1
SUSE-SU-2024:0785-1
SUSE-SU-2024:0820-1
SUSE-SU-2024:0850-1
SUSE-SU-2024:0901-1
SUSE-SU-2024:1009-1
SUSE-SU-2024:1162-1
SUSE-SU-2024:1556-1
SUSE-SU-2024:1847-1
SUSE-SU-2024_0820-1
SUSE-SU-2024_0850-1
SUSE-SU-2025:20154-1
SUSE-SU-2025:20374-1
USN-6891-1

Affected Products

Almalinux
Astra Linux
Cpython
Centos
Ibm Aix
Linuxmint
Red Hat
Red Os
Rocky Linux
Suse
Ubuntu
Zvirt Node