PT-2023-9621 · Python+3 · Cpython+3

Seth Larson

·

Published

2023-12-08

·

Updated

2025-08-11

·

CVE-2023-6507

CVSS v2.0

7.1

High

VectorAV:A/AC:L/Au:S/C:C/I:C/A:N
Name of the Vulnerable Software and Affected Versions CPython version 3.12.0
Description The issue is related to errors in privilege management in the subprocess module of the CPython interpreter. When using the extra groups= parameter with an empty list as a value, the logic regressed to not call setgroups(0, NULL) before calling exec(), thus not dropping the original processes' groups before starting the new process. This issue only impacts CPython processes run with sufficient privilege to make the setgroups system call, typically root.
Recommendations For CPython version 3.12.0, update to CPython 3.12.1 to resolve the issue. As a temporary workaround, consider avoiding the use of the extra groups= parameter with an empty list until a patch is available. Restrict access to the subprocess module to minimize the risk of exploitation.

Exploit

Fix

Improper Privilege Management

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

Weakness Enumeration

Related Identifiers

ALT-PU-2024-1300
AZL-35143
BDU:2024-08865
BIT-LIBPYTHON-2023-6507
BIT-PYTHON-2023-6507
BIT-PYTHON-MIN-2023-6507
CVE-2023-6507
OPENSUSE-SU-2024:13511-1
PSF-2023-12
USN-6891-1

Affected Products

Alt Linux
Cpython
Linuxmint
Ubuntu