CWE
269
EPSS
0.052%
Advisory Published
CVE Published
Updated

CVE-2023-6507: Groups not dropped before running subprocess when using empty 'extra_groups' parameter

First published: Fri Dec 08 2023(Updated: )

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`).

Credit: cna@python.org cna@python.org

Affected SoftwareAffected VersionHow to fix
Python Python=3.12.0
Python Python=3.13.0-alpha1
Python Python=3.13.0-alpha2
debian/python2.7
2.7.18-8+deb11u1
debian/python3.11
3.11.2-6+deb12u4
3.11.2-6+deb12u3
debian/python3.12
3.12.8-3
debian/python3.9
3.9.2-1
3.9.2-1+deb11u2

Never miss a vulnerability like this again

Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2024 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203