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

Published Dec 8, 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 extragroups= parameter with an empty list as a value (ie extragroups=[]) 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).

Affected Software

7 affected componentsFixes available
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+deb12u53.11.2-6+deb12u3
debian/python3.12
3.12.10-1
debian/python3.9
3.9.2-13.9.2-1+deb11u3

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade debian/python2.7 to a version that resolves this vulnerability.

    Fixed in 2.7.18-8+deb11u1
  2. Upgrade

    Upgrade debian/python3.11 to a version that resolves this vulnerability.

    Fixed in 3.11.2-6+deb12u5Fixed in 3.11.2-6+deb12u3
  3. Upgrade

    Upgrade debian/python3.12 to a version that resolves this vulnerability.

    Fixed in 3.12.10-1
  4. Upgrade

    Upgrade debian/python3.9 to a version that resolves this vulnerability.

    Fixed in 3.9.2-1Fixed in 3.9.2-1+deb11u3
  5. Upgrade

    Upgrade CPython 3.12.0 subprocess module (POSIX) to a version that resolves this vulnerability.

    Fixed in 3.12.1

Event History

Dec 8, 2023
CVE Published
via MITRE·06:20 PM
Data Sourced
via MITRE·06:20 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·07:15 PM
RemedyDescriptionSeverityWeaknessAffected Software
Jul 15, 2024
Data Sourced
via Launchpad·12:45 PM
Description
Sep 17, 2024
Data Sourced
via Ubuntu·12:56 PM
RemedyDescriptionSeverityAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2023-6507?

CVE-2023-6507 has been classified with a medium severity due to its potential impact on POSIX systems using Python 3.12.0.

2

How do I fix CVE-2023-6507?

To fix CVE-2023-6507, upgrade to CPython version 3.12.1 or later, as it addresses the vulnerability.

3

Which versions of Python are affected by CVE-2023-6507?

CVE-2023-6507 specifically affects Python 3.12.0 and does not impact previous stable releases.

4

Is CVE-2023-6507 relevant for Python 2.7?

CVE-2023-6507 does not affect Python 2.7, as it is specific to CPython 3.12.0.

5

What specific issue does CVE-2023-6507 address?

CVE-2023-6507 addresses a regression in the 'subprocess' module when an empty list is passed to the 'extra_groups=' parameter.

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.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203