CVEfocus › CVE database › CVE-2023-6507

CVE-2023-6507Groups not dropped before running subprocess when using empty 'extra_groups' parameter

CVSS 6.1 MediumEPSS 1.3% (higher than 72% of CVEs)Published 2023-12-08Updated 2026-07-31Assigner: PSF

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

CWE-269

What to do

Ubuntu has not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

1Fix pending
173Not affected

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 24.04python3.12Not affected
vulnerable_code_not_present
Ubuntu 22.04python3.10Not affected
vulnerable_code_not_present
Ubuntu 16.04python2.7Fix pending
Red Hat Enterprise Linux 10python-unversioned-commandNot affected
Red Hat Enterprise Linux 10python3Not affected
Red Hat Enterprise Linux 10python3-debugNot affected
Red Hat Enterprise Linux 10python3-develNot affected
Red Hat Enterprise Linux 10python3-idleNot affected
Red Hat Enterprise Linux 10python3-libsNot affected
Red Hat Enterprise Linux 10python3-testNot affected
Red Hat Enterprise Linux 10python3-tkinterNot affected
Red Hat Enterprise Linux 10python3.12Not affected
Red Hat Enterprise Linux 9python-unversioned-commandNot affected
Red Hat Enterprise Linux 9python3Not affected
Red Hat Enterprise Linux 9python3-debugNot affected
Red Hat Enterprise Linux 9python3-develNot affected
Red Hat Enterprise Linux 9python3-idleNot affected
Red Hat Enterprise Linux 9python3-libsNot affected
Red Hat Enterprise Linux 9python3-testNot affected
Red Hat Enterprise Linux 9python3-tkinterNot affected
Red Hat Enterprise Linux 9python3.11Not affected
Red Hat Enterprise Linux 9python3.11-debugNot affected
Red Hat Enterprise Linux 9python3.11-develNot affected
Red Hat Enterprise Linux 9python3.11-idleNot affected
Red Hat Enterprise Linux 9python3.11-libsNot affected
Red Hat Enterprise Linux 9python3.11-testNot affected
Red Hat Enterprise Linux 9python3.11-tkinterNot affected
Red Hat Enterprise Linux 9python3.12Not affected
Red Hat Enterprise Linux 9python3.12-debugNot affected
Red Hat Enterprise Linux 9python3.12-develNot affected
Red Hat Enterprise Linux 9python3.12-idleNot affected
Red Hat Enterprise Linux 9python3.12-libsNot affected
Red Hat Enterprise Linux 9python3.12-testNot affected
Red Hat Enterprise Linux 9python3.12-tkinterNot affected
Red Hat Enterprise Linux 9python3.9Not affected
Red Hat Enterprise Linux 8PyYAMLNot affected
Red Hat Enterprise Linux 8mod_wsgiNot affected
Red Hat Enterprise Linux 8numpyNot affected
Red Hat Enterprise Linux 8platform-pythonNot affected
Red Hat Enterprise Linux 8platform-python-debugNot affected
Red Hat Enterprise Linux 8platform-python-develNot affected
Red Hat Enterprise Linux 8python-PyMySQLNot affected
Red Hat Enterprise Linux 8python-cffiNot affected
Red Hat Enterprise Linux 8python-chardetNot affected
Red Hat Enterprise Linux 8python-cryptographyNot affected
Red Hat Enterprise Linux 8python-distroNot affected
Red Hat Enterprise Linux 8python-docsNot affected
Red Hat Enterprise Linux 8python-docutilsNot affected
Red Hat Enterprise Linux 8python-idnaNot affected
Red Hat Enterprise Linux 8python-lxmlNot affected
Red Hat Enterprise Linux 8python-noseNot affected
Red Hat Enterprise Linux 8python-nose-docsNot affected
Red Hat Enterprise Linux 8python-plyNot affected
Red Hat Enterprise Linux 8python-psutilNot affected
Red Hat Enterprise Linux 8python-psycopg2Not affected
Red Hat Enterprise Linux 8python-pycparserNot affected
Red Hat Enterprise Linux 8python-pygmentsNot affected
Red Hat Enterprise Linux 8python-pymongoNot affected
Red Hat Enterprise Linux 8python-pymongo-docNot affected
Red Hat Enterprise Linux 8python-pysocksNot affected
Red Hat Enterprise Linux 8python-requestsNot affected
Red Hat Enterprise Linux 8python-sqlalchemyNot affected
Red Hat Enterprise Linux 8python-sqlalchemy-docNot affected
Red Hat Enterprise Linux 8python-tomlNot affected
Red Hat Enterprise Linux 8python-urllib3Not affected
Red Hat Enterprise Linux 8python-virtualenvNot affected
Red Hat Enterprise Linux 8python-virtualenv-docNot affected
Red Hat Enterprise Linux 8python-wheelNot affected
Red Hat Enterprise Linux 8python2Not affected
Red Hat Enterprise Linux 8python2-debugNot affected
Red Hat Enterprise Linux 8python2-develNot affected
Red Hat Enterprise Linux 8python2-libsNot affected
Red Hat Enterprise Linux 8python2-testNot affected
Red Hat Enterprise Linux 8python2-tkinterNot affected
Red Hat Enterprise Linux 8python2-toolsNot affected
Red Hat Enterprise Linux 8python3Not affected
Red Hat Enterprise Linux 8python3-PyMySQLNot affected
Red Hat Enterprise Linux 8python3-bsonNot affected
Red Hat Enterprise Linux 8python3-distroNot affected
Red Hat Enterprise Linux 8python3-docsNot affected
Red Hat Enterprise Linux 8python3-docutilsNot affected
Red Hat Enterprise Linux 8python3-idleNot affected
Red Hat Enterprise Linux 8python3-libsNot affected
Red Hat Enterprise Linux 8python3-noseNot affected
Red Hat Enterprise Linux 8python3-pygmentsNot affected
Red Hat Enterprise Linux 8python3-pymongoNot affected
Red Hat Enterprise Linux 8python3-pymongo-gridfsNot affected
Red Hat Enterprise Linux 8python3-scipyNot affected
Red Hat Enterprise Linux 8python3-sqlalchemyNot affected
Red Hat Enterprise Linux 8python3-testNot affected
Red Hat Enterprise Linux 8python3-tkinterNot affected
Red Hat Enterprise Linux 8python3-virtualenvNot affected
Red Hat Enterprise Linux 8python3-wheelNot affected
Red Hat Enterprise Linux 8python3-wheel-wheelNot affected
Red Hat Enterprise Linux 8python3.11Not affected
Red Hat Enterprise Linux 8python3.11-debugNot affected
Red Hat Enterprise Linux 8python3.11-develNot affected
Red Hat Enterprise Linux 8python3.11-idleNot affected
Red Hat Enterprise Linux 8python3.11-libsNot affected
Red Hat Enterprise Linux 8python3.11-rpm-macrosNot affected
Red Hat Enterprise Linux 8python3.11-testNot affected
Red Hat Enterprise Linux 8python3.11-tkinterNot affected
Red Hat Enterprise Linux 8python3.12Not affected
Red Hat Enterprise Linux 8python3.12-debugNot affected
Red Hat Enterprise Linux 8python3.12-develNot affected
Red Hat Enterprise Linux 8python3.12-idleNot affected
Red Hat Enterprise Linux 8python3.12-libsNot affected
Red Hat Enterprise Linux 8python3.12-rpm-macrosNot affected
Red Hat Enterprise Linux 8python3.12-testNot affected
Red Hat Enterprise Linux 8python3.12-tkinterNot affected
Red Hat Enterprise Linux 8python36Not affected
Red Hat Enterprise Linux 8python36-debugNot affected
Red Hat Enterprise Linux 8python36-develNot affected
Red Hat Enterprise Linux 8python36-rpm-macrosNot affected
Red Hat Enterprise Linux 8python39Not affected
Red Hat Enterprise Linux 8python39-PyMySQLNot affected
Red Hat Enterprise Linux 8python39-cffiNot affected
Red Hat Enterprise Linux 8python39-chardetNot affected
Red Hat Enterprise Linux 8python39-cryptographyNot affected
Red Hat Enterprise Linux 8python39-develNot affected
Red Hat Enterprise Linux 8python39-idleNot affected
Red Hat Enterprise Linux 8python39-idnaNot affected
Red Hat Enterprise Linux 8python39-libsNot affected
Red Hat Enterprise Linux 8python39-lxmlNot affected
Red Hat Enterprise Linux 8python39-mod_wsgiNot affected
Red Hat Enterprise Linux 8python39-numpyNot affected
Red Hat Enterprise Linux 8python39-numpy-docNot affected
Red Hat Enterprise Linux 8python39-numpy-f2pyNot affected
Red Hat Enterprise Linux 8python39-pipNot affected
Red Hat Enterprise Linux 8python39-pip-wheelNot affected
Red Hat Enterprise Linux 8python39-plyNot affected
Red Hat Enterprise Linux 8python39-psutilNot affected
Red Hat Enterprise Linux 8python39-psycopg2Not affected
Red Hat Enterprise Linux 8python39-psycopg2-docNot affected
Red Hat Enterprise Linux 8python39-psycopg2-testsNot affected
Red Hat Enterprise Linux 8python39-pycparserNot affected
Red Hat Enterprise Linux 8python39-pysocksNot affected
Red Hat Enterprise Linux 8python39-pyyamlNot affected
Red Hat Enterprise Linux 8python39-requestsNot affected
Red Hat Enterprise Linux 8python39-rpm-macrosNot affected
Red Hat Enterprise Linux 8python39-scipyNot affected
Red Hat Enterprise Linux 8python39-setuptoolsNot affected
Red Hat Enterprise Linux 8python39-setuptools-wheelNot affected
Red Hat Enterprise Linux 8python39-sixNot affected
Red Hat Enterprise Linux 8python39-testNot affected
Red Hat Enterprise Linux 8python39-tkinterNot affected
Red Hat Enterprise Linux 8python39-tomlNot affected
Red Hat Enterprise Linux 8python39-urllib3Not affected
Red Hat Enterprise Linux 8python39-wheelNot affected
Red Hat Enterprise Linux 8python39-wheel-wheelNot affected
Red Hat Enterprise Linux 8python3x-pipNot affected
Red Hat Enterprise Linux 8python3x-setuptoolsNot affected
Red Hat Enterprise Linux 8python3x-sixNot affected
Red Hat Enterprise Linux 8scipyNot affected
Red Hat Enterprise Linux 7pythonNot affected
Red Hat Enterprise Linux 7python-debugNot affected
Red Hat Enterprise Linux 7python-develNot affected
Red Hat Enterprise Linux 7python-libsNot affected
Red Hat Enterprise Linux 7python-testNot affected
Red Hat Enterprise Linux 7python-toolsNot affected
Red Hat Enterprise Linux 7python3Not affected
Red Hat Enterprise Linux 7python3-debugNot affected
Red Hat Enterprise Linux 7python3-develNot affected
Red Hat Enterprise Linux 7python3-idleNot affected
Red Hat Enterprise Linux 7python3-libsNot affected
Red Hat Enterprise Linux 7python3-testNot affected
Red Hat Enterprise Linux 7python3-tkinterNot affected
Red Hat Enterprise Linux 7tkinterNot affected
Red Hat Enterprise Linux 6pythonNot affected
Red Hat Enterprise Linux 6python-develNot affected
Red Hat Enterprise Linux 6python-libsNot affected
Red Hat Enterprise Linux 6python-testNot affected
Red Hat Enterprise Linux 6python-toolsNot affected
Red Hat Enterprise Linux 6tkinterNot affected

What the vendor says

As published in the CVE record by PSF, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

Vendor advisories:

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.