Skip to content

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 sy...

HighCVSS 7.8 EPSS 0.31%
Published
Updated
Exploit status
No public exploit known

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 products

ProductAffected versionsFixed in
debian/pypy3(Debian:12) < 7.3.11+dfsg-2+deb12u2 7.3.11+dfsg-2+deb12u2
debian/pypy3(Debian:12) = 7.3.11+dfsg-2 No fix listed
debian/pypy3(Debian:12) = 7.3.11+dfsg-2+deb12u1 No fix listed
debian/pypy3(Debian:13) < 7.3.13+dfsg-1 7.3.13+dfsg-1
debian/pypy3(Debian:14) < 7.3.13+dfsg-1 7.3.13+dfsg-1
debian/python3.11(Debian:12) < 3.11.2-6+deb12u2 3.11.2-6+deb12u2
debian/python3.11(Debian:12) = 3.11.2-6 No fix listed
debian/python3.11(Debian:12) = 3.11.2-6+deb12u1 No fix listed
Python Software Foundation CPython < 3.8.19 3.8.19
Python Software Foundation CPython >= 3.9.0, < 3.9.19 3.9.19
Python Software Foundation CPython >= 3.10.0, < 3.10.14 3.10.14
Python Software Foundation CPython >= 3.11.0, < 3.11.8 3.11.8
Python Software Foundation CPython >= 3.12.0, < 3.12.1 3.12.1
Python Software Foundation CPython >= 3.13.0a1, < 3.13.0a3 3.13.0a3
ubuntu/python3.10(Ubuntu:22.04) < 3.10.12-1~22.04.4 3.10.12-1~22.04.4
ubuntu/python3.11(Ubuntu:22.04) < 3.11.0~rc1-1~22.04.1~esm1 3.11.0~rc1-1~22.04.1~esm1
alpine/python3(Alpine:v3.16) < 3.10.14-r0 3.10.14-r0
alpine/python3(Alpine:v3.17) < 3.10.14-r0 3.10.14-r0

References