patchminder
No public exploit found CVE-2023-6507

Privilege escalationin Python CPython.

Published 8 Dec 2023 · Updated 31 Jul 2026 · Every fact sourced

JSONCite
Is it exploited?
Not confirmed

No public exploit found; not on exploited lists.

Severity
Medium 6.1
CVSSA severity score from 0 to 10. 9 and higher is critical. 3.1
Attack likelihood
Moderate
EPSSA daily score from FIRST: the chance a hole is attacked in the next 30 days. 1.3% chance in 30 days · 4 Dec 2026
Fix
Available
Fixed in 3.12.1, 3.13.0a3
In plain words

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

What to do now
  • Upgrade CPython to 3.12.1, 3.13.0a3 or later, whichever matches your release line.
Versions

Affected and fixed versions

Product or package
Affected
Fixed in
Source
CPython
before 3.12.1
3.12.1
CVE record
CPython
3.13.0a1 to before 3.13.0a3
3.13.0a3
CVE record

From the CVE record, NVD and package advisories. When no source has versions yet, this table says "not confirmed" instead of guessing.

Timeline

From first report to first attacks

  1. 4 Dec 2023
    CVE ID reserved by PSF.
  2. 8 Dec 2023
    Published in the CVE List.
  3. 31 Jul 2026
    CVE record last updated.
Exploit code

Attack code anyone can find

Exploit maturity: No public exploit found. CISA assessment (SSVC): exploitation none.

Metasploit module
None known
Nuclei scan template
None known
Exploit-DB
None known
GitHub proof of concepts
None known

Listed so defenders can judge how urgent this is and test systems they are authorised to test. Patchminder does not host exploit code; links open the source page. Labels for GitHub repositories come from their public details and are never a promise about the code. Run anything only in an isolated lab.

Related

Other CPython vulnerabilities

Same weakness: Improper privilege management

All CWE-269 vulnerabilities

References
Cite this page

Patchminder. CVE-2023-6507: Privilege escalation in Python CPython. https://patchminder.com/cve/cve-2023-6507/ (accessed 5 December 2026).