Skip to content
Fencer Vulns
medium 6.1

CVE-2023-6507 json

Groups not dropped before running subprocess when using empty 'extra_groups' parameter

published 2023-12-08 2 y ago modified 2026-09-10 59 d ago also BIT-libpython-2023-6507 , BIT-python-2023-6507 , BIT-python-min-2023-6507 , EUVD-2023-58738

cvss
6.1
version 3.1, CNA
cisa kev
Not listed
not in CISA's catalog
epss
1.3%
EPSS 1.3% chance of exploitation in 30 days, percentile 71%
public exploits
0
none known

Summary

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`).

Patch / fix

  • bitnami libpython 3.12.1
  • bitnami python 3.12.1
  • bitnami python-min 3.12.1
  • Python Software Foundation CPython 3.12.1, 3.13.0a3
  • python312 openSUSE Tumbleweed 3.12.1-1.1

opensuse advisories openSUSE-SU-2024:13511-1

  • python3 Azure Linux 3.0 3.12.3-1

azure linux advisories AZL-35143

Azure Linux vulnerability data, Copyright (c) Microsoft Corporation, from https://github.com/microsoft/AzureLinuxVulnerabilityData via OSV, under the MIT licence; changed: normalised to fixed package versions per release. MIT

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2023-6507 updated cvss 6.1

python: Improper privileges drop on subprocess module

  • Red Hat Enterprise Linux 6 python, tkinter, python-libs, python-test, python-tools Red Hat Enterprise Linux 7 python, python3, tkinter, python-libs, python-test, python-tools, +4 more Red Hat Enterprise Linux 8 numpy, scipy, PyYAML, python2, python3, mod_wsgi, +94 more Red Hat Enterprise Linux 9 python3, python3.9, python3.11, python3.12, python3-idle, python3-libs, +11 more Red Hat Enterprise Linux 10 python3.12
    not affected: vulnerable code not present

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

CISA SSVC

Exploitation
none
Automatable
no
Technical impact
total
Assessed
2 y ago

Exploit prediction

1.34% chance of exploitation in the next 30 days, higher than 71% of all scored CVEs (FIRST EPSS, 2026-11-08).

CVSS scores

assigned by version score vector
CNA 3.1 6.1 CVSS:3.1/AV:A/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:N
NVD 3.1 4.9 CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:H/A:N
OSV 3.1 6.1 CVSS:3.1/AV:A/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:N

Affected packages

ecosystem package affected fixed in
bitnami libpython
>=3.12.0, <3.12.1
3.12.1
bitnami python
>=3.12.0, <3.12.1
3.12.1
bitnami python-min
>=3.12.0, <3.12.1
3.12.1

Affected products

  • Python Software Foundation CPython
  • python cpython

Classification

Weakness
  • CWE-269 Improper Privilege Management

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.

CPEs and fixed versions use Anchore's correction of NVD's data: Improve version ranges to indicate fix.