CVE-2023-6507
published medium CVSS 3.1 · 6.1Groups not dropped before running subprocess when using empty 'extra_groups' parameter
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Python Software Foundation | — | CPython0 to < 3.12.1 · 3.13.0a1 to < 3.13.0a3 · Other versions: unaffected · Platforms: POSIX | Affected | Not stated | PSF |
| python | — | cpython3.13.0 · Other versions: unknown | Affected | Not stated | CISA-ADP |
| python | — | cpython3.12.0 · Other versions: unknown | Affected | Not stated | CISA-ADP |
| Amazon Linux | AL2 | Release evaluation | Not Affected | Not required | Amazon Linux assessment |
| Amazon Linux | AL2023 | Release evaluation | Not Affected | Not required | Amazon Linux assessment |
| SUSE / openSUSE | openSUSE-Tumbleweed | python312aarch64 | Advisory build | 3.12.1-1.1 | OPENSUSE-SU-2024:13511-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python312ppc64le | Advisory build | 3.12.1-1.1 | OPENSUSE-SU-2024:13511-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python312s390x | Advisory build | 3.12.1-1.1 | OPENSUSE-SU-2024:13511-1 |
Show 21 more entries
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| SUSE / openSUSE | openSUSE-Tumbleweed | python312x86_64 | Advisory build | 3.12.1-1.1 | OPENSUSE-SU-2024:13511-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python312-cursesaarch64 | Advisory build | 3.12.1-1.1 | OPENSUSE-SU-2024:13511-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python312-cursesppc64le | Advisory build | 3.12.1-1.1 | OPENSUSE-SU-2024:13511-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python312-cursess390x | Advisory build | 3.12.1-1.1 | OPENSUSE-SU-2024:13511-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python312-cursesx86_64 | Advisory build | 3.12.1-1.1 | OPENSUSE-SU-2024:13511-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python312-dbmaarch64 | Advisory build | 3.12.1-1.1 | OPENSUSE-SU-2024:13511-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python312-dbmppc64le | Advisory build | 3.12.1-1.1 | OPENSUSE-SU-2024:13511-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python312-dbms390x | Advisory build | 3.12.1-1.1 | OPENSUSE-SU-2024:13511-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python312-dbmx86_64 | Advisory build | 3.12.1-1.1 | OPENSUSE-SU-2024:13511-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python312-idleaarch64 | Advisory build | 3.12.1-1.1 | OPENSUSE-SU-2024:13511-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python312-idleppc64le | Advisory build | 3.12.1-1.1 | OPENSUSE-SU-2024:13511-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python312-idles390x | Advisory build | 3.12.1-1.1 | OPENSUSE-SU-2024:13511-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python312-idlex86_64 | Advisory build | 3.12.1-1.1 | OPENSUSE-SU-2024:13511-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python312-tkaarch64 | Advisory build | 3.12.1-1.1 | OPENSUSE-SU-2024:13511-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python312-tkppc64le | Advisory build | 3.12.1-1.1 | OPENSUSE-SU-2024:13511-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python312-tks390x | Advisory build | 3.12.1-1.1 | OPENSUSE-SU-2024:13511-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python312-tkx86_64 | Advisory build | 3.12.1-1.1 | OPENSUSE-SU-2024:13511-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python312-x86-64-v3aarch64 | Advisory build | 3.12.1-1.1 | OPENSUSE-SU-2024:13511-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python312-x86-64-v3ppc64le | Advisory build | 3.12.1-1.1 | OPENSUSE-SU-2024:13511-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python312-x86-64-v3s390x | Advisory build | 3.12.1-1.1 | OPENSUSE-SU-2024:13511-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python312-x86-64-v3x86_64 | Advisory build | 3.12.1-1.1 | OPENSUSE-SU-2024:13511-1 |
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`).
Related advisories
Vendor advisories explicitly linked to this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 6.1 / 10
- Severity
- medium
- Provider
- PSF · cna
- Vector string
- CVSS:3.1/AV:A/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:N
- Scenarios
- en: GENERAL
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| Python Software Foundation | CPython | 0 to < 3.12.1 (affected · python)3.13.0a1 to < 3.13.0a3 (affected · python)Default: unaffected | PSF · cna |
| python | cpython | 3.13.0 (affected)Default: unknown | CISA-ADP · adp |
| python | cpython | 3.12.0 (affected)Default: unknown | CISA-ADP · adp |
Weaknesses
1- CWE-269 CWE-269 Improper Privilege Management
References
5- https://github.com/python/cpython/commit/10e9bb13b8dcaa414645b9bd10718d8f7179e82b
- https://github.com/python/cpython/commit/85bbfa8a4bbdbb61a3a84fbd7cb29a4096ab8a06
- https://github.com/python/cpython/commit/9fe7655c6ce0b8e9adc229daf681b6d30e6b1610
- https://github.com/python/cpython/issues/112334
- https://mail.python.org/archives/list/[email protected]/thread/AUL7QFHBLILGISS7U63B47AYSSGJJQZD/
Provider assertions
3PSF · cna
Groups not dropped before running subprocess when using empty 'extra_groups' parameter
CISA-ADP · adp
CISA ADP Vulnrichment
CVE · adp
CVE Program Container
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 8224498b56f65a72a5924e74ae84c5d48202adb2825870a9d2a94f35a577a56c
- Ingested
- 23 Sep 2026, 08:15:42 UTC
- Source record
- Official CVE record