BIT-libpython-2023-6597: High severity Python Software Foundation CPython vulnerability

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.

Affected Software

1 affected component
Python Software Foundation CPython<=3.12.1, <=3.11.7, <=3.10.13, <=3.9.18, <=3.8.18

Event History

Mar 19, 2024
CVE Published
via OSV·03:44 PM
Data Sourced
via OSV·03:44 PM
DescriptionSeverity

Frequently Asked Questions

1

Who is realistically exposed to this issue?

Systems that run privileged CPython programs using tempfile.TemporaryDirectory are potentially exposed when another user can influence filesystem paths or symlinks involved in temporary-directory cleanup. The issue requires conditions in which the attacker can cause permission-related cleanup errors.

2

What does an attacker need to exploit it?

The attacker needs to be able to run or otherwise interact with a privileged program and arrange symlinks that are followed during TemporaryDirectory cleanup. Exploitation is local and has high attack complexity, with no privileges or user interaction required according to the supplied vector.

3

What could an attacker accomplish?

Under the affected cleanup conditions, an attacker may modify permissions on files referenced by symlinks. The supplied vector indicates high confidentiality and integrity impact, while availability impact is not indicated.

4

Which CPython versions are affected?

The issue affects CPython 3.12.1, 3.11.7, 3.10.13, 3.9.18, and 3.8.18 and prior.

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