CVE-2026-54552 sh _uid does not drop supplementary groups (incomplete privilege drop)
HighCVSS 7.9
EPSS 0.17%
- Published
- Updated
- Exploit status
- No public exploit known
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.
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| amoffat sh | = < 2.2.4 | No fix listed |
| pypi sh(PyPI) | < 2.2.4 | 2.2.4 |
| pypi sh(PyPI) | = 0.01 | No fix listed |
| pypi sh(PyPI) | = 0.106 | No fix listed |
| pypi sh(PyPI) | = 0.107 | No fix listed |
| pypi sh(PyPI) | = 0.108 | No fix listed |
| pypi sh(PyPI) | = 1.0 | No fix listed |
| pypi sh(PyPI) | = 1.01 | No fix listed |
| pypi sh(PyPI) | = 1.02 | No fix listed |
| pypi sh(PyPI) | = 1.03 | No fix listed |
| pypi sh(PyPI) | = 1.04 | No fix listed |
| pypi sh(PyPI) | = 1.05 | No fix listed |
| pypi sh(PyPI) | = 1.06 | No fix listed |
| pypi sh(PyPI) | = 1.07 | No fix listed |
| pypi sh(PyPI) | = 1.08 | No fix listed |
| pypi sh(PyPI) | = 1.09 | No fix listed |
| pypi sh(PyPI) | = 1.10 | No fix listed |
| pypi sh(PyPI) | = 1.11 | No fix listed |
| pypi sh(PyPI) | = 1.12.0 | No fix listed |
| pypi sh(PyPI) | = 1.12.1 | No fix listed |
| pypi sh(PyPI) | = 1.12.10 | No fix listed |
| pypi sh(PyPI) | = 1.12.11 | No fix listed |
| pypi sh(PyPI) | = 1.12.12 | No fix listed |
| pypi sh(PyPI) | = 1.12.13 | No fix listed |
| pypi sh(PyPI) | = 1.12.14 | No fix listed |
Show 44 more
| Product | Affected versions | Fixed in |
|---|---|---|
| pypi sh(PyPI) | = 1.12.2 | No fix listed |
| pypi sh(PyPI) | = 1.12.3 | No fix listed |
| pypi sh(PyPI) | = 1.12.4 | No fix listed |
| pypi sh(PyPI) | = 1.12.5 | No fix listed |
| pypi sh(PyPI) | = 1.12.6 | No fix listed |
| pypi sh(PyPI) | = 1.12.7 | No fix listed |
| pypi sh(PyPI) | = 1.12.8 | No fix listed |
| pypi sh(PyPI) | = 1.12.9 | No fix listed |
| pypi sh(PyPI) | = 1.13.0 | No fix listed |
| pypi sh(PyPI) | = 1.13.1 | No fix listed |
| pypi sh(PyPI) | = 1.14.0 | No fix listed |
| pypi sh(PyPI) | = 1.14.1 | No fix listed |
| pypi sh(PyPI) | = 1.14.2 | No fix listed |
| pypi sh(PyPI) | = 1.14.3 | No fix listed |
| pypi sh(PyPI) | = 2.0.0 | No fix listed |
| pypi sh(PyPI) | = 2.0.1 | No fix listed |
| pypi sh(PyPI) | = 2.0.2 | No fix listed |
| pypi sh(PyPI) | = 2.0.3 | No fix listed |
| pypi sh(PyPI) | = 2.0.4 | No fix listed |
| pypi sh(PyPI) | = 2.0.5 | No fix listed |
| pypi sh(PyPI) | = 2.0.6 | No fix listed |
| pypi sh(PyPI) | = 2.0.7 | No fix listed |
| pypi sh(PyPI) | = 2.1.0 | No fix listed |
| pypi sh(PyPI) | = 2.2.0 | No fix listed |
| pypi sh(PyPI) | = 2.2.1 | No fix listed |
| pypi sh(PyPI) | = 2.2.2 | No fix listed |
| pypi sh(PyPI) | = 2.2.3 | No fix listed |
| debian/python-sh(Debian:12) | All versions | No fix listed |
| debian/python-sh(Debian:12) | = 1.14.2-1 | No fix listed |
| debian/python-sh(Debian:12) | = 2.0.7-1 | No fix listed |
| debian/python-sh(Debian:12) | = 2.2.1-1 | No fix listed |
| debian/python-sh(Debian:12) | = 2.2.1-2 | No fix listed |
| debian/python-sh(Debian:12) | = 2.4.0-1 | No fix listed |
| debian/python-sh(Debian:13) | All versions | No fix listed |
| debian/python-sh(Debian:13) | = 2.2.1-1 | No fix listed |
| debian/python-sh(Debian:13) | = 2.2.1-2 | No fix listed |
| debian/python-sh(Debian:13) | = 2.4.0-1 | No fix listed |
| debian/python-sh(Debian:14) | < 2.4.0-1 | 2.4.0-1 |
| debian/python-sh(Debian:14) | = 2.2.1-1 | No fix listed |
| debian/python-sh(Debian:14) | = 2.2.1-2 | No fix listed |
| ubuntu/python-sh(Ubuntu:22.04) | All versions | No fix listed |
| ubuntu/python-sh(Ubuntu:24.04) | All versions | No fix listed |
| ubuntu/python-sh(Ubuntu:26.04) | All versions | No fix listed |
| ubuntu/python-sh(Ubuntu:26.10) | All versions | No fix listed |
References
- https://github.com/amoffat/sh/security/advisories/GHSA-q38v-wp89-2w55 vendor-advisory
- https://github.com/amoffat/sh/pull/776
- https://github.com/amoffat/sh/commit/3d855daba91f87a089b490c0d1cf1df3faace2f1
- https://github.com/amoffat/sh/releases/tag/2.2.4
- github.com product
- pypi.org product
- github.com vendor-advisory
- nvd.nist.gov vendor-advisory
- Red Hat CVE page mitigation vendor-advisory
- Red Hat Bugzilla 2518108 issue-tracking
- www.cve.org
- Debian Security Tracker CVE-2026-54552 vendor-advisory
- Ubuntu CVE tracker vendor-advisory
- bugs.debian.org issue-tracking