CVE-2023-6507
Groups not dropped before running subprocess when using empty 'extra_groups' parameter
Reported by psf · Published December 8, 2023
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`).
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| libpython | Bitnami | 3.12.1 |
| python | Bitnami | 3.12.1 |
| CPython | Python Software Foundation | 3.13.0a3, 3.12.1 |
| debian/python-3.15 | debian | 3.13.0-alpha3, 3.12.1 |
| debian/python-3.12 | debian | 3.13.0-alpha3, 3.12.1 |
| python | Bitnami | 3.12.1 |
| alpine/python-3.11 | alpine | 3.13.0-alpha3, 3.12.1 |
| debian/python-3.10 | debian | 3.13.0-alpha3, 3.12.1 |
| debian/python-3.14 | debian | 3.13.0-alpha3, 3.12.1 |
| alpine/python-3.13 | alpine | 3.13.0-alpha3, 3.12.1 |
| debian/python-3.11 | debian | 3.13.0-alpha3, 3.12.1 |
| alpine/python-3.14 | alpine | 3.13.0-alpha3, 3.12.1 |
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| Python Software Foundation | CPython | 0, 3.13.0a1 |
| Python Software Foundation | CPython | 3.13.0a1, 0 |
| python | cpython | 3.13.0, 3.12.0 |
Timeline
- Dec 8, 2023 CVE Published
- Dec 9, 2023 EPSS Score (30 in total, the first dated here)
- Dec 31, 2023 PoC Published
- Oct 5, 2024 Coalition ESS Score (7 in total, the first dated here)
- May 31, 2026 Security Advisory (4 in total, the first dated here)
- Jul 31, 2026 CVE Updated
- Nov 22, 2026 Distribution Patch (2 in total, the first dated here)
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2023-6507
vulnetix vdb fixes CVE-2023-6507
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2023-6507/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart