Skip to content
OpenAdvisories
High · 7.9 CVE-2026-54552 EUVD-2026-61127GHSA-q38v-wp89-2w55PYSEC-2026-3540

sh _uid does not drop supplementary groups (incomplete privilege drop)

Published Aug 18, 2026 · Updated Aug 18, 2026 · Assigned by GitHub_M

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

VendorProductAffectedFixed
amoffat sh < 2.2.4 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 python-sh 2.4.0-1 —
Debian 13 python-sh No fix yet —
Debian 12 python-sh No fix yet —
ReleasePackageFixed inAdvisory
Ubuntu 26.10 python-sh No fix yet —
Ubuntu 26.04 LTS python-sh No fix yet —
Ubuntu 24.04 LTS python-sh No fix yet —
Ubuntu 22.04 LTS python-sh No fix yet —
Ubuntu 20.04 LTS python-sh No fix yet —
Show 2 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu 18.04 LTS python-sh No fix yet —
Ubuntu 16.04 LTS python-sh No fix yet —
ReleasePackageFixed inAdvisory
SLES 15 SP6 python-sh 2.0.4-150400.9.6.1 SUSE-SU-2026:3422-1
SLES 15 SP5 python-sh 2.0.4-150400.9.6.1 SUSE-SU-2026:3422-1
SLES 15 SP4 python-sh 2.0.4-150400.9.6.1 SUSE-SU-2026:3422-1
SLES 3 python-sh 2.0.4-150400.9.6.1 SUSE-SU-2026:3422-1
Show 7 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
SLES for SAP 16.0 python-sh 2.2.2-160000.3.1 SUSE-SU-2026:23134-1, SUSE-SU-2026:23112-1
SLES for SAP 15 SP6 python-sh 2.0.4-150400.9.6.1 SUSE-SU-2026:3422-1
SLES for SAP 15 SP5 python-sh 2.0.4-150400.9.6.1 SUSE-SU-2026:3422-1
SLES for SAP 15 SP4 python-sh 2.0.4-150400.9.6.1 SUSE-SU-2026:3422-1
SLES 16.0 python-sh 2.2.2-160000.3.1 SUSE-SU-2026:23134-1, SUSE-SU-2026:23112-1
SLE HPC 15 SP5 python-sh 2.0.4-150400.9.6.1 SUSE-SU-2026:3422-1
SLE HPC 15 SP4 python-sh 2.0.4-150400.9.6.1 SUSE-SU-2026:3422-1
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed python-sh 2.3.0-1.1 openSUSE-SU-2026:11372-1
openSUSE Leap 16.0 python-sh 2.2.2-160000.3.1 openSUSE-SU-2026:21516-1

Affected packages

EcosystemPackageAffectedFixedRecord
PyPI sh < 2.2.4 2.2.4 GHSA-q38v-wp89-2w55

Advisories 5

References