Skip to content

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

ProductAffected versionsFixed 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
ProductAffected versionsFixed 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