CVE-2023-6507
Python Subprocess Issue: Empty Extra Groups Parameter Dropping Privileges
Description
An issue was found in CPython 3.12.0 `subprocess` module on POSIX platforms. The issue was fixed in CPython 3.12.1 and does not affect other stable releases. When using the `extra_groups=` parameter with an empty list as a value (ie `extra_groups=[]`) the logic regressed to not call `setgroups(0, NULL)` before calling `exec()`, thus not dropping the original processes' groups before starting the new process. There is no issue when the parameter isn't used or when any value is used besides an empty list. This issue only impacts CPython processes run with sufficient privilege to make the `setgroups` system call (typically `root`).
INFO
Published Date :
Dec. 8, 2023, 7:15 p.m.
Last Modified :
May 7, 2024, 10:15 p.m.
Source :
[email protected]
Remotely Exploitable :
No
Impact Score :
5.2
Exploitability Score :
0.9
Public PoC/Exploit Available at Github
CVE-2023-6507 has a 1 public PoC/Exploit
available at Github.
Go to the Public Exploits
tab to see the list.
References to Advisories, Solutions, and Tools
Here, you will find a curated list of external links that provide in-depth
information, practical solutions, and valuable tools related to
CVE-2023-6507
.
We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).
CLI utility to query Shodan's CVE DB
cve-search shodan shodan-client
Go
Results are limited to the first 15 repositories due to potential performance issues.
The following list is the news that have been mention
CVE-2023-6507
vulnerability anywhere in the article.
The following table lists the changes that have been made to the
CVE-2023-6507
vulnerability over time.
Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.
-
CVE Modified by [email protected]
May. 14, 2024
Action Type Old Value New Value -
CVE Modified by [email protected]
May. 07, 2024
Action Type Old Value New Value Added Reference Python Software Foundation https://github.com/python/cpython/commit/9fe7655c6ce0b8e9adc229daf681b6d30e6b1610 [No types assigned] Added Reference Python Software Foundation https://github.com/python/cpython/commit/10e9bb13b8dcaa414645b9bd10718d8f7179e82b [No types assigned] Added Reference Python Software Foundation https://github.com/python/cpython/commit/85bbfa8a4bbdbb61a3a84fbd7cb29a4096ab8a06 [No types assigned] Removed Reference Python Software Foundation https://github.com/python/cpython/pull/112617 -
Initial Analysis by [email protected]
Dec. 13, 2023
Action Type Old Value New Value Added CVSS V3.1 NIST AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:H/A:N Changed Reference Type https://github.com/python/cpython/issues/112334 No Types Assigned https://github.com/python/cpython/issues/112334 Issue Tracking, Patch Changed Reference Type https://github.com/python/cpython/pull/112617 No Types Assigned https://github.com/python/cpython/pull/112617 Issue Tracking, Patch Changed Reference Type https://mail.python.org/archives/list/[email protected]/thread/AUL7QFHBLILGISS7U63B47AYSSGJJQZD/ No Types Assigned https://mail.python.org/archives/list/[email protected]/thread/AUL7QFHBLILGISS7U63B47AYSSGJJQZD/ Third Party Advisory Added CWE NIST NVD-CWE-noinfo Added CPE Configuration OR *cpe:2.3:a:python:python:3.12.0:-:*:*:*:*:*:* *cpe:2.3:a:python:python:3.13.0:alpha1:*:*:*:*:*:* *cpe:2.3:a:python:python:3.13.0:alpha2:*:*:*:*:*:* -
CVE Received by [email protected]
Dec. 08, 2023
Action Type Old Value New Value Added Description An issue was found in CPython 3.12.0 `subprocess` module on POSIX platforms. The issue was fixed in CPython 3.12.1 and does not affect other stable releases. When using the `extra_groups=` parameter with an empty list as a value (ie `extra_groups=[]`) the logic regressed to not call `setgroups(0, NULL)` before calling `exec()`, thus not dropping the original processes' groups before starting the new process. There is no issue when the parameter isn't used or when any value is used besides an empty list. This issue only impacts CPython processes run with sufficient privilege to make the `setgroups` system call (typically `root`). Added Reference Python Software Foundation https://github.com/python/cpython/pull/112617 [No types assigned] Added Reference Python Software Foundation https://github.com/python/cpython/issues/112334 [No types assigned] Added Reference Python Software Foundation https://mail.python.org/archives/list/[email protected]/thread/AUL7QFHBLILGISS7U63B47AYSSGJJQZD/ [No types assigned] Added CWE Python Software Foundation CWE-269 Added CVSS V3.1 Python Software Foundation AV:A/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:N
CWE - Common Weakness Enumeration
While CVE identifies
specific instances of vulnerabilities, CWE categorizes the common flaws or
weaknesses that can lead to vulnerabilities. CVE-2023-6507
is
associated with the following CWEs:
Common Attack Pattern Enumeration and Classification (CAPEC)
Common Attack Pattern Enumeration and Classification
(CAPEC)
stores attack patterns, which are descriptions of the common attributes and
approaches employed by adversaries to exploit the CVE-2023-6507
weaknesses.
Exploit Prediction
EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days.
0.07 }} 0.01%
score
0.30936
percentile