CVE-2023-6507
NixOS vulnerability analysis and mitigation

Overview

CVE-2023-6507 affects CPython 3.12.0's subprocess module on POSIX platforms. The vulnerability was discovered in December 2023 and fixed in CPython 3.12.1. The issue occurs when using the extra_groups= parameter with an empty list as a value (i.e., extra_groups=[]), where the logic fails to call setgroups(0, NULL) before calling exec(), resulting in not dropping the original processes' groups before starting the new process (Python Security).

Technical details

The vulnerability stems from a logic regression in the subprocess module where the code fails to properly handle empty group lists. When extra_groups=[] is passed, the system call setgroups(0, NULL) is not executed before the exec() call. The issue has a CVSS v3.1 Base Score of 4.9 (Medium) with vector string CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:H/A:N. This vulnerability only affects systems where the process has sufficient privileges to make the setgroups system call, typically requiring root access (NVD).

Impact

The vulnerability allows processes to retain their original group permissions when they should have been dropped, potentially leading to privilege escalation or unauthorized access. This issue specifically impacts CPython processes running with sufficient privileges to make the setgroups system call, typically requiring root access (Python Security).

Mitigation and workarounds

The primary mitigation is to upgrade to CPython 3.12.1 or later versions where the issue has been fixed. The vulnerability does not affect other stable releases of Python. For systems that cannot be immediately upgraded, avoiding the use of empty lists with the extra_groups parameter can prevent the issue (Python Security).

Additional resources


SourceThis report was generated using AI

Related NixOS vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-22783HIGH8.1
  • NixOSNixOS
  • iris
NoYesJan 12, 2026
CVE-2026-0821MEDIUM6.9
  • NixOSNixOS
  • quickjs
NoNoJan 10, 2026
CVE-2025-68949MEDIUM5.3
  • NixOSNixOS
  • n8n
NoYesJan 13, 2026
CVE-2026-22784LOW2.3
  • NixOSNixOS
  • lychee
NoYesJan 12, 2026
CVE-2026-23497LOW1.3
  • NixOSNixOS
  • learning
NoYesJan 14, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management