{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2023-6507","id":"CVE-2023-6507","title":"Groups not dropped before running subprocess when using empty 'extra_groups' parameter","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.\n\nWhen 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 ","descriptionLong":"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.\n\nWhen 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.\n\nThis issue only impacts CPython processes run with sufficient privilege to make the `setgroups` system call (typically `root`).","published":"2023-12-08T18:20:49.583Z","updated":"2026-11-10T13:10:35.785982551Z","reserved":"2023-12-04T21:24:50.284Z","status":"Modified","rejected":false,"assigner":"PSF","metric":{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:A/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:N","rating":"medium","source":"PSF"},"metrics":[{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:A/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:N","rating":"medium","source":"PSF"},{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:A/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:N","rating":"medium","source":"python.org"},{"version":"3.1","score":4.9,"vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:H/A:N","rating":"medium","source":"NVD"},{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:A/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:N","rating":"medium","source":"OSV"}],"rating":"medium","products":["Python Software Foundation CPython"],"affectedProducts":[{"vendor":"Python Software Foundation","product":"CPython","defaultStatus":"unaffected","versions":[{"version":"0","lessThan":"3.12.1","status":"affected","versionType":"python"},{"version":"3.13.0a1","lessThan":"3.13.0a3","status":"affected","versionType":"python"}],"platforms":["POSIX"]}],"packages":[],"cwes":["CWE-269"],"aliases":["BIT-libpython-2023-6507","BIT-python-2023-6507","BIT-python-min-2023-6507","PSF-2023-12","PSF-CVE-2023-6507"],"references":[{"url":"https://github.com/python/cpython/issues/112334","tags":["issue-tracking","x_transferred","Issue Tracking","Patch","report"]},{"url":"https://mail.python.org/archives/list/security-announce@python.org/thread/AUL7QFHBLILGISS7U63B47AYSSGJJQZD/","tags":["vendor-advisory","x_transferred","Third Party Advisory","advisory"]},{"url":"https://github.com/python/cpython/commit/9fe7655c6ce0b8e9adc229daf681b6d30e6b1610","tags":["patch","x_transferred","fix"]},{"url":"https://github.com/python/cpython/commit/10e9bb13b8dcaa414645b9bd10718d8f7179e82b","tags":["patch","x_transferred","fix"]},{"url":"https://github.com/python/cpython/commit/85bbfa8a4bbdbb61a3a84fbd7cb29a4096ab8a06","tags":["patch","x_transferred","fix"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/6xxx/CVE-2023-6507.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2023-6507","tags":["advisory"]},{"url":"https://github.com/python/cpython","tags":["package"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2023-6507","tags":["advisory"]},{"url":"https://github.com/python/cpython/pull/112617","tags":["fix"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total"},"epss":0.01337,"epssPercentile":0.71804,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2023-6507","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-6507","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2023-6507","ok":true,"note":"0 packages"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2023-6507","ok":true,"note":"scored 2026-11-18"}],"aiTitle":false,"tech":["python"],"critical":[],"attention":null}