6.1
MEDIUM
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.

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.

Affected Products

The following products are affected by CVE-2023-6507 vulnerability. Even if cvefeed.io is aware of the exact versions of the products that are affected, the information is not represented in the table below.

ID Vendor Product Action
1 Python python

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

Updated: 4 months, 3 weeks ago
0 stars 0 fork 0 watcher
Born at : May 12, 2024, 10 a.m. This repo has been linked 31 different CVEs too.

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
EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days. Following chart shows the EPSS score history of the vulnerability.
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.06 }} 0.01%

score

0.24831

percentile

CVSS31 - Vulnerability Scoring System
Attack Vector
Attack Complexity
Privileges Required
User Interaction
Scope
Confidentiality
Integrity
Availability