Groups not dropped before running subprocess when using empty 'extra_groups' parameter
Summary
| CVE | CVE-2023-6507 |
|---|---|
| State | PUBLISHED |
| Assigner | PSF |
| Source Priority | CVE Program / NVD first with legacy fallback |
| Published | 2023-12-08 19:15:08 UTC |
| Updated | 2026-07-31 15:16:26 UTC |
| 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`). |
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
| Version | Source | Type | Score | Severity | Vector |
|---|---|---|---|---|---|
| 3.1 | [email protected] | Primary | 4.9 | MEDIUM | CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:H/A:N |
| 3.1 | [email protected] | Secondary | 6.1 | MEDIUM | CVSS:3.1/AV:A/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:N |
| 3.1 | CNA | CVSS | 6.1 | MEDIUM | CVSS:3.1/AV:A/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:N |
CVSS v3.1 Breakdown
Attack Vector
NetworkAttack Complexity
LowPrivileges Required
HighUser Interaction
NoneScope
UnchangedConfidentiality
NoneIntegrity
HighAvailability
NoneCVSS: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)
Vendor Declared Affected Products
| Source | Vendor | Product | Version | Platforms |
|---|---|---|---|---|
| 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
| Reference | Source | Link | Tags |
|---|---|---|---|
| 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 |
No vendor comments have been submitted for this CVE.
There are currently no legacy QID mappings associated with this CVE.