CVE-2023-6597: Security fixes in Python 3.10.14, 3.9.19, and 3.8.19 (CVE-2023-6597 & CVE-2024-0450)

Published Mar 19, 2024
·
Updated

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.

Other sources

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.

— NVD

Affected Software

9 affected componentsFixes available
debian/pypy3<=7.3.5+dfsg-2+deb11u2
7.3.5+dfsg-2+deb11u47.3.11+dfsg-2+deb12u37.3.19+dfsg-2
debian/python2.7
2.7.18-8+deb11u1
debian/python3.11
3.11.2-6+deb12u53.11.2-6+deb12u3
debian/python3.12
3.12.10-1
debian/python3.9<=3.9.2-1
3.9.2-1+deb11u3
Microsoft azl3 python3 3.12.3-1
Microsoft cbl2 python3 3.9.14-8
Microsoft azl3 python3 3.12.0-4
Microsoft cbl2 python3 3.9.19-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade debian/pypy3 to a version that resolves this vulnerability.

    Fixed in 7.3.5+dfsg-2+deb11u4Fixed in 7.3.11+dfsg-2+deb12u3Fixed in 7.3.19+dfsg-2
  2. Upgrade

    Upgrade debian/python2.7 to a version that resolves this vulnerability.

    Fixed in 2.7.18-8+deb11u1
  3. Upgrade

    Upgrade debian/python3.11 to a version that resolves this vulnerability.

    Fixed in 3.11.2-6+deb12u5Fixed in 3.11.2-6+deb12u3
  4. Upgrade

    Upgrade debian/python3.12 to a version that resolves this vulnerability.

    Fixed in 3.12.10-1
  5. Upgrade

    Upgrade debian/python3.9 to a version that resolves this vulnerability.

    Fixed in 3.9.2-1+deb11u3
  6. Upgrade

    Upgrade CPython (tempfile.TemporaryDirectory) to a version that resolves this vulnerability.

    Fixed in 3.10.14Patch CVE-2023-6597
  7. Upgrade

    Upgrade CPython (tempfile.TemporaryDirectory) to a version that resolves this vulnerability.

    Fixed in 3.9.19Patch CVE-2024-0450
  8. Upgrade

    Upgrade CPython (tempfile.TemporaryDirectory) to a version that resolves this vulnerability.

    Fixed in 3.8.19Patch CVE-2023-6597

Event History

Mar 19, 2024
CVE Published
via MITRE·03:44 PM
Data Sourced
via MITRE·03:44 PM
DescriptionSeverity
Data Sourced
via NVD·04:15 PM
DescriptionSeverity
Apr 22, 2024
Data Sourced
via Red Hat·08:19 PM
DescriptionSeverityAffected Software
Jun 30, 2024
Data Sourced
via Microsoft·02:00 PM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2023-6597?

CVE-2023-6597 has a medium severity rating due to its impact on users who can create symbolic links.

2

How do I fix CVE-2023-6597?

To fix CVE-2023-6597, upgrade to the latest version of the affected Python packages, such as python3.12 version 3.12.8-5 or higher.

3

Which versions of Python are affected by CVE-2023-6597?

CVE-2023-6597 affects Python versions 3.12.1, 3.11.7, 3.10.13, 3.9.18, and 3.8.18 and prior.

4

What is the main issue with CVE-2023-6597?

The main issue with CVE-2023-6597 is that the tempfile.TemporaryDirectory class dereferences symlinks during cleanup of permissions-related errors.

5

Who is impacted by CVE-2023-6597?

In CVE-2023-6597, users who can create symbolic links are impacted due to potential security risks during temporary directory cleanup.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203