VDB

CVE-2023-6507

CVE-2023-6507 PUBLISHED CVSS 6.1 MEDIUM

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.

PackageEcosystemFixed in
libpythonBitnami3.12.1
pythonBitnami3.12.1
CPythonPython Software Foundation3.13.0a3, 3.12.1
debian/python-3.15debian3.13.0-alpha3, 3.12.1
debian/python-3.12debian3.13.0-alpha3, 3.12.1
pythonBitnami3.12.1
alpine/python-3.11alpine3.13.0-alpha3, 3.12.1
debian/python-3.10debian3.13.0-alpha3, 3.12.1
debian/python-3.14debian3.13.0-alpha3, 3.12.1
alpine/python-3.13alpine3.13.0-alpha3, 3.12.1
debian/python-3.11debian3.13.0-alpha3, 3.12.1
alpine/python-3.14alpine3.13.0-alpha3, 3.12.1

Risk scores

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

Affected products

VendorProductVersions
Python Software FoundationCPython0, 3.13.0a1
Python Software FoundationCPython3.13.0a1, 0
pythoncpython3.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

References

  • issue-tracking
  • vendor-advisory
  • patch
  • patch
  • patch
Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›