{"answers":{"affected":"3 open source packages ship an affected version, including libpython, python and python-min. It affects 1 product.","exploited":"There is no known exploitation of CVE-2023-6507 in the wild and no public exploit code.","fix":"Upgrade libpython to 3.12.1 or later.","what":"CVE-2023-6507 is a medium-severity vulnerability in Python Python, published on 8 Dec 2023. It can only be exploited from the same machine or local network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2023-6507 and fix it if it is affected.\n\nWhat it is: CVE-2023-6507 is a medium-severity vulnerability in Python Python, published on 8 Dec 2023. It can only be exploited from the same machine or local network, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2023-6507 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- libpython (Bitnami): affected from 3.12.0; fixed in 3.12.1\n- python (Bitnami): affected from 3.12.0; fixed in 3.12.1\n- python-min (Bitnami): affected from 3.12.0; fixed in 3.12.1\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2023-6507/ (Markdown: https://insights.sbomify.com/CVE-2023-6507/index.md)","id":"CVE-2023-6507","markdown":"https://insights.sbomify.com/CVE-2023-6507/index.md","name":"CVE-2023-6507","record":{"aliases":["AZL-35143","BIT-libpython-2023-6507","BIT-python-2023-6507","BIT-python-min-2023-6507","GHSA-4wxh-fpjf-c8wf","PSF-2023-12","PSF-CVE-2023-6507","openSUSE-SU-2024:13511-1"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["privilege_escalation"],"network_reachable":"adjacent_or_local","non_default_config":true,"product_category":"Python standard library","requires_auth":"high_privilege","summary":"Attackers can retain original group privileges when spawning subprocesses with empty extra_groups in privileged Python applications.","user_interaction":"not_required","vuln_class":"privilege_escalation"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"PSF","cpe":[{"product":"python","vendor":"python"}],"cvss":{"score":6.1,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:A/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:N","version":"3.1"},"cwes":[{"id":"CWE-269","name":"Improper Privilege Management"}],"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 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`).","ecosystems":["Bitnami","openSUSE:Tumbleweed"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"Groups not dropped before running subprocess when using empty 'extra_groups' parameter","id":"CVE-2023-6507","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Bitnami","product":"python:python","products":["python:python"],"type":"privilege_escalation","year":"2023"},"n_packages":4,"n_references":5,"next":{"headline":"Use after free in Chrome","id":"CVE-2023-6508"},"packages":[{"ecosystem":"Bitnami","fixed":["3.12.1"],"introduced":["3.12.0"],"last_affected":[],"package":"libpython","purl":"pkg:bitnami/libpython","source":"BIT-libpython-2023-6507"},{"ecosystem":"Bitnami","fixed":["3.12.1"],"introduced":["3.12.0"],"last_affected":[],"package":"python","purl":"pkg:bitnami/python","source":"BIT-python-2023-6507"},{"ecosystem":"Bitnami","fixed":["3.12.1"],"introduced":["3.12.0"],"last_affected":[],"package":"python-min","purl":"pkg:bitnami/python-min","source":"BIT-python-min-2023-6507"},{"ecosystem":"openSUSE:Tumbleweed","fixed":["3.12.1-1.1"],"introduced":["0"],"last_affected":[],"package":"python312","purl":"pkg:rpm/opensuse/python312\u0026distro=openSUSE%20Tumbleweed","source":"openSUSE-SU-2024:13511-1"}],"prev":{"headline":"WP 2FA \u003c= 2.5.0 - Insecure Direct Object Reference to Arbitrary Email Sending","id":"CVE-2023-6506"},"products":["CPython"],"published":"2023-12-08","related":[{"cvss_score":10,"headline":"Integer overflow in n/a","id":"CVE-2008-5031","kev_date_added":null,"published":"2008-11-10"},{"cvss_score":9.8,"headline":"Path traversal in n/a","id":"CVE-2014-4650","kev_date_added":null,"published":"2020-02-20"},{"cvss_score":9.8,"headline":"Integer overflow in n/a","id":"CVE-2016-5636","kev_date_added":null,"published":"2016-09-02"},{"cvss_score":9.8,"headline":"Path traversal in n/a","id":"CVE-2007-4559","kev_date_added":null,"published":"2007-08-28"},{"cvss_score":8.8,"headline":"Command injection in n/a","id":"CVE-2017-17522","kev_date_added":null,"published":"2017-12-14"},{"cvss_score":8.7,"headline":"Incremental HTMLParser feed() allows CPU-exhaustion DoS via repeated unterminated markup declarations","id":"CVE-2026-15308","kev_date_added":null,"published":"2026-07-09"},{"cvss_score":7.8,"headline":"Privilege escalation in n/a","id":"CVE-2019-13404","kev_date_added":null,"published":"2019-07-08"}],"sources":[{"class":"attribution","licence":"Apache-2.0","name":"Bitnami","prefix":"BIT"},{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"SUSE","prefix":"openSUSE"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"total"},"state":"PUBLISHED","updated":"2026-07-31","vendors":["Python Software Foundation"]},"summary":"Attackers can retain original group privileges when spawning subprocesses with empty extra_groups in privileged Python applications.","url":"https://insights.sbomify.com/CVE-2023-6507/"}