CVE-2023-6597

python: Path traversal on tempfile.TemporaryDirectory

Published Mar 19, 2024 CVSS 3.1 · 7.8 High EPSS < 1% KEV · Not listed
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.

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Debian DLA Debian DLA DLA-3772-1 python3.7 security update
Debian DLA Debian DLA DLA-3948-1 pypy3 security update
Debian DLA Debian DLA DLA-3980-1 python3.9 security update
EUVD EUVD EUVD-2023-58821 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.
Ubuntu USN Ubuntu USN USN-6891-1 Python vulnerabilities
History
Type Values Removed Values Added
CPEs cpe:/a:redhat:openshift:4.18::el9
Type Values Removed Values Added
CPEs cpe:/a:redhat:openshift:4.13::el9
Type Values Removed Values Added
First Time appeared Redhat openshift
CPEs cpe:/a:redhat:openshift:4.12::el8
cpe:/a:redhat:openshift:4.14::el9
cpe:/a:redhat:openshift:4.15::el9
cpe:/a:redhat:openshift:4.16::el9
cpe:/a:redhat:openshift:4.17::el9
Vendors & Products Redhat openshift
Type Values Removed Values Added
First Time appeared Python Software Foundation
Python Software Foundation cpython
CPEs cpe:2.3:a:python_software_foundation:cpython:*:*:*:*:*:*:*:*
Vendors & Products Python Software Foundation
Python Software Foundation cpython
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
CPEs cpe:/a:redhat:rhel_e4s:9.0
Weaknesses

Sources

Status
PUBLISHED
Assigner
PSF
Published
Updated
Nov 3, 2025, 9:50 PM
Reserved
Dec 7, 2023, 8:59 PM
Status
Deferred
Published
Mar 19, 2024, 4:15 PM
Modified
Jun 17, 2026, 6:51 AM
Severity
Important
Public date
Mar 19, 2024, 12:00 AM