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

Summary

CVECVE-2023-6507
StatePUBLISHED
AssignerPSF
Source PriorityCVE Program / NVD first with legacy fallback
Published2023-12-08 19:15:08 UTC
Updated2026-07-31 15:16:26 UTC
DescriptionAn 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`).

Risk And Classification

Primary CVSS: v3.1 4.9 MEDIUM from [email protected]

CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:H/A:N

EPSS: 0.013260000 probability, percentile 0.681660000 (date 2026-08-03)

Problem Types: CWE-269 | NVD-CWE-noinfo | CWE-269 CWE-269 Improper Privilege Management


VersionSourceTypeScoreSeverityVector
3.1[email protected]Primary4.9MEDIUMCVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:H/A:N
3.1[email protected]Secondary6.1MEDIUMCVSS:3.1/AV:A/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:N
3.1CNACVSS6.1MEDIUMCVSS:3.1/AV:A/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:N

CVSS v3.1 Breakdown

Attack Vector
Network
Attack Complexity
Low
Privileges Required
High
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
High
Availability
None

CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:H/A:N

NVD Known Affected Configurations (CPE 2.3)

TypeVendorProductVersionUpdateEditionLanguage
Application Python Python 3.12.0 - All All
Application Python Python 3.13.0 alpha1 All All
Application Python Python 3.13.0 alpha2 All All

Vendor Declared Affected Products

SourceVendorProductVersionPlatforms
CNA Python Software Foundation CPython affected 3.12.1 python POSIX
CNA Python Software Foundation CPython affected 3.13.0a1 3.13.0a3 python POSIX
ADP Python Cpython affected 3.13.0 Not specified
ADP Python Cpython affected 3.12.0 Not specified

References

ReferenceSourceLinkTags
github.com/python/cpython/commit/10e9bb13b8dcaa414645b9bd10718d8f7179e82b af854a3a-2127-422b-91ae-364da2661108 github.com
github.com/python/cpython/commit/9fe7655c6ce0b8e9adc229daf681b6d30e6b1610 af854a3a-2127-422b-91ae-364da2661108 github.com
mail.python.org/archives/list/[email protected]/thread/AUL7QFHBLIL... af854a3a-2127-422b-91ae-364da2661108 mail.python.org Third Party Advisory
github.com/python/cpython/issues/112334 af854a3a-2127-422b-91ae-364da2661108 github.com Issue Tracking, Patch
github.com/python/cpython/commit/85bbfa8a4bbdbb61a3a84fbd7cb29a4096ab8a06 af854a3a-2127-422b-91ae-364da2661108 github.com
CVE Program record CVE.ORG www.cve.org canonical
NVD vulnerability detail NVD nvd.nist.gov canonical, analysis

© CVE.report 2026

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report