
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2023-6507 affects CPython 3.12.0's subprocess module on POSIX platforms. The vulnerability was discovered in December 2023 and fixed in CPython 3.12.1. The issue occurs when using the extra_groups= parameter with an empty list as a value (i.e., extra_groups=[]), where the logic fails to call setgroups(0, NULL) before calling exec(), resulting in not dropping the original processes' groups before starting the new process (Python Security).
The vulnerability stems from a logic regression in the subprocess module where the code fails to properly handle empty group lists. When extra_groups=[] is passed, the system call setgroups(0, NULL) is not executed before the exec() call. The issue has a CVSS v3.1 Base Score of 4.9 (Medium) with vector string CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:H/A:N. This vulnerability only affects systems where the process has sufficient privileges to make the setgroups system call, typically requiring root access (NVD).
The vulnerability allows processes to retain their original group permissions when they should have been dropped, potentially leading to privilege escalation or unauthorized access. This issue specifically impacts CPython processes running with sufficient privileges to make the setgroups system call, typically requiring root access (Python Security).
The primary mitigation is to upgrade to CPython 3.12.1 or later versions where the issue has been fixed. The vulnerability does not affect other stable releases of Python. For systems that cannot be immediately upgraded, avoiding the use of empty lists with the extra_groups parameter can prevent the issue (Python Security).
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."