CVE-2026-54552 sh _uid does not drop supplementary groups (incomplete privilege drop)
The sh library fails to drop supplementary groups when changing user IDs, allowing child processes to retain privileged group access.
- Exploited in the wild
- Not known
- Login needed
- An administrator
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2026-54552?
CVE-2026-54552 is a high-severity vulnerability in amoffat sh, published on 18 Aug 2026. It can only be exploited from the same machine or local network, with no action from the victim.
Official description
sh provides Python process launching. Prior to 2.2.4, the _uid option in sh.py performs an incomplete privilege drop on Linux and Unix-like systems. When sh runs from an elevated process and launches a command with _uid set to an unprivileged user, the child changes its UID but can retain the parent process's supplementary groups because the privilege-drop sequence does not fully establish the target user's UID, primary GID, and supplementary groups. The child can therefore retain access to files or resources granted to privileged groups such as root, docker, disk, shadow, or sudo, violating the expected _uid privilege boundary. This issue is fixed in version 2.2.4.
Weakness: CWE-273
Which versions are affected by CVE-2026-54552?
3 open source packages ship an affected version, including sh.
| Package | Affected | Fixed in |
|---|---|---|
sh PyPI | All versions | 2.2.4 |
sh PyPI | All versions | 2.2.4 |
sh PyPI | All versions | 2.2.4 |
Linux distribution packages (17)
python-sh SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS | All versions | 2.0.4-150400.9.6.1 |
python-sh SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS | All versions | 2.0.4-150400.9.6.1 |
python-sh SUSE:Linux Enterprise High Performance Computing 15 SP5-ESPOS | All versions | 2.0.4-150400.9.6.1 |
python-sh SUSE:Linux Enterprise High Performance Computing 15 SP5-LTSS | All versions | 2.0.4-150400.9.6.1 |
python-sh SUSE:Linux Enterprise Module for Python 3 15 SP7 | All versions | 2.0.4-150400.9.6.1 |
python-sh SUSE:Linux Enterprise Server 15 SP4-LTSS | All versions | 2.0.4-150400.9.6.1 |
python-sh SUSE:Linux Enterprise Server 15 SP5-LTSS | All versions | 2.0.4-150400.9.6.1 |
python-sh SUSE:Linux Enterprise Server 15 SP6-LTSS | All versions | 2.0.4-150400.9.6.1 |
python-sh SUSE:Linux Enterprise Server 16.0 | All versions | 2.2.2-160000.3.1 |
python-sh SUSE:Linux Enterprise Server 16.0 | All versions | 2.2.2-160000.3.1 |
python-sh SUSE:Linux Enterprise Server for SAP Applications 15 SP4 | All versions | 2.0.4-150400.9.6.1 |
python-sh SUSE:Linux Enterprise Server for SAP Applications 15 SP5 | All versions | 2.0.4-150400.9.6.1 |
python-sh SUSE:Linux Enterprise Server for SAP Applications 15 SP6 | All versions | 2.0.4-150400.9.6.1 |
python-sh SUSE:Linux Enterprise Server for SAP applications 16.0 | All versions | 2.2.2-160000.3.1 |
python-sh SUSE:Linux Enterprise Server for SAP applications 16.0 | All versions | 2.2.2-160000.3.1 |
python-sh openSUSE:Leap 16.0 | All versions | 2.2.2-160000.3.1 |
python-sh openSUSE:Tumbleweed | All versions | 2.3.0-1.1 |
How do I fix CVE-2026-54552?
Upgrade sh to 2.2.4 or later.
Is CVE-2026-54552 being exploited?
There is no known exploitation of CVE-2026-54552 in the wild and no public exploit code.
Sources
Also known as DEBIAN-CVE-2026-54552, GHSA-q38v-wp89-2w55, PYSEC-2026-3540, SUSE-SU-2026:23112-1, SUSE-SU-2026:23134-1, SUSE-SU-2026:3422-1 and 3 more.