CVE-2023-6507
Fixed in a distro release EPSS 1%CVSS 6.1
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`).
Products: Python Software Foundation CPython, cpython
Distro releases
| Release | Package | Fixed in |
|---|---|---|
| Ubuntu 20.04 LTS | python3.8 | 3.8.10-0ubuntu1~20.04.10 |
| Ubuntu 22.04 LTS | python3.10 | 3.10.12-1~22.04.4 |
| Ubuntu Pro 14.04 LTS | python3.5 | 3.5.2-2ubuntu0~16.04.4~14.04.1+esm1 |
| Ubuntu Pro 16.04 LTS | python3.5 | 3.5.2-2ubuntu0~16.04.13+esm13 |
| Ubuntu Pro 18.04 LTS | python3.6 | 3.6.9-1~18.04ubuntu1.13+esm2 |
| Ubuntu Pro 18.04 LTS | python3.7 | 3.7.5-2ubuntu1~18.04.2+esm3 |
| Ubuntu Pro 18.04 LTS | python3.8 | 3.8.0-3ubuntu1~18.04.2+esm2 |
| Ubuntu Pro 20.04 LTS | python3.9 | 3.9.5-3ubuntu0~20.04.1+esm2 |
| Ubuntu Pro 22.04 LTS | python3.11 | 3.11.0~rc1-1~22.04.1~esm1 |
| openSUSE Tumbleweed | python312 | 3.12.1-1.1 |