CVE-2026-54552
sh _uid does not drop supplementary groups (incomplete privilege drop)
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.
Attack profile
How easy it is to exploit
- Attack vector
- Local
- Complexity
- Low
- Privileges needed
- High
- User interaction
- None
What an attacker can affect
- Confidentiality
- High
- Integrity
- High
- Availability
- None
Exploit likelihood
What each source reports
CVE List Score used
7.9
sh _uid does not drop supplementary groups (incomplete privilege drop)
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.
- Record
CVE-2026-54552- CVSS 3.1
- 7.9 High
CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:N - Weakness
- CWE-273
- Updated
- 2026-11-02
EUVDEUVD-2026-61127
7.9
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.
- Record
EUVD-2026-61127- CVSS 3.1
- 7.9 High
CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:N - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-q38v-wp89-2w55
7.9
sh _uid does not drop supplementary groups (incomplete privilege drop)
Impact
The _uid option performed an incomplete privilege drop on Linux/Unix-like systems.
When sh was run from a process with elevated privileges, such as root, and a command was launched with _uid=<unprivileged user>, the child process changed its UID and primary GID but did not reset its supplementary groups. As a result, the child process could retain the parent process’s supplementary groups, potentially including privileged groups such as root, docker, disk, shadow, or sudo.
This could allow a subprocess that was expected to run with reduced privileges to access files or resources available to the original process’s supplementary groups. Users are impacted if they rely on _uid as a privilege boundary when launching commands from a privileged parent process.
Patches
Upgrade to version >= 2.2.4
Workarounds
Avoid using _uid when the user represents a less-privileged user.
- Record
GHSA-q38v-wp89-2w55- CVSS 3.1
- 7.9 High
CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:N - Weakness
- CWE-273
- Updated
- 2026-11-02
NVD
7.9
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.
- Record
CVE-2026-54552- CVSS 3.1
- 7.9 High
CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:N - Weakness
- CWE-273
- Updated
- 2026-11-02
OSV
7.9
sh _uid does not drop supplementary groups (incomplete privilege drop)
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.
- Record
CVE-2026-54552- CVSS 3.1
- 7.9 High
CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:N - Weakness
- CWE-273
- Updated
- 2026-11-02
OSVDEBIAN-CVE-2026-54552
7.9
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.
- Record
DEBIAN-CVE-2026-54552- CVSS 3.1
- 7.9 High
CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:N - Updated
- 2026-11-02
Show 8 moreShow less
OSVGHSA-q38v-wp89-2w55
7.9
sh _uid does not drop supplementary groups (incomplete privilege drop)
Impact
The _uid option performed an incomplete privilege drop on Linux/Unix-like systems.
When sh was run from a process with elevated privileges, such as root, and a command was launched with _uid=<unprivileged user>, the child process changed its UID and primary GID but did not reset its supplementary groups. As a result, the child process could retain the parent process’s supplementary groups, potentially including privileged groups such as root, docker, disk, shadow, or sudo.
This could allow a subprocess that was expected to run with reduced privileges to access files or resources available to the original process’s supplementary groups. Users are impacted if they rely on _uid as a privilege boundary when launching commands from a privileged parent process.
Patches
Upgrade to version >= 2.2.4
Workarounds
Avoid using _uid when the user represents a less-privileged user.
- Record
GHSA-q38v-wp89-2w55- CVSS 3.1
- 7.9 High
CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:N - Weakness
- CWE-273
- Updated
- 2026-11-02
OSVPYSEC-2026-3540
7.9
sh _uid does not drop supplementary groups (incomplete privilege drop)
Impact
The _uid option performed an incomplete privilege drop on Linux/Unix-like systems.
When sh was run from a process with elevated privileges, such as root, and a command was launched with _uid=<unprivileged user>, the child process changed its UID and primary GID but did not reset its supplementary groups. As a result, the child process could retain the parent process’s supplementary groups, potentially including privileged groups such as root, docker, disk, shadow, or sudo.
This could allow a subprocess that was expected to run with reduced privileges to access files or resources available to the original process’s supplementary groups. Users are impacted if they rely on _uid as a privilege boundary when launching commands from a privileged parent process.
Patches
Upgrade to version >= 2.2.4
Workarounds
Avoid using _uid when the user represents a less-privileged user.
- Record
PYSEC-2026-3540- CVSS 3.1
- 7.9 High
CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:N - Updated
- 2026-11-02
OSVUBUNTU-CVE-2026-54552
7.9
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.
- Record
UBUNTU-CVE-2026-54552- CVSS 3.1
- 7.9 High
CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:N - Updated
- 2026-11-02
OSVopenSUSE-SU-2026:11372-1 No score
python313-sh-2.3.0-1.1 on GA media
These are all security issues fixed in the python313-sh-2.3.0-1.1 package on the GA media of openSUSE Tumbleweed.
- Record
openSUSE-SU-2026:11372-1- Updated
- 2026-11-02
OSVopenSUSE-SU-2026:21516-1 No score
Security update for python-sh
This update for python-sh fixes the following issue
- CVE-2026-54552:
_uidoption performs an incomplete privilege drop on Linux/Unix-like systems and allows for privilege escalation (bsc#1272424).
- Record
openSUSE-SU-2026:21516-1- Updated
- 2026-11-02
OSVSUSE-SU-2026:23112-1 No score
Security update for python-sh
This update for python-sh fixes the following issue
- CVE-2026-54552:
_uidoption performs an incomplete privilege drop on Linux/Unix-like systems and allows for privilege escalation (bsc#1272424).
- Record
SUSE-SU-2026:23112-1- Updated
- 2026-11-02
OSVSUSE-SU-2026:23134-1 No score
Security update for python-sh
This update for python-sh fixes the following issue
- CVE-2026-54552:
_uidoption performs an incomplete privilege drop on Linux/Unix-like systems and allows for privilege escalation (bsc#1272424).
- Record
SUSE-SU-2026:23134-1- Updated
- 2026-11-02
OSVSUSE-SU-2026:3422-1 No score
Security update for python-sh
This update for python-sh fixes the following issues:
- CVE-2026-54552: incomplete privilege drop in the _uid option can allow a subprocess to retain parent supplementary groups (bsc#1272424).
- Record
SUSE-SU-2026:3422-1- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
shPyPI |
before 2.2.4 | 2.2.4 |
python-shDebian:12 |
All versions, plus listed versions 1.14.2-12.0.7-12.2.1-12.2.1-22.4.0-1 |
None known |
python-shDebian:13 |
All versions, plus listed versions 2.2.1-12.2.1-22.4.0-1 |
None known |
python-shDebian:14 |
before 2.4.0-1, plus listed versions 2.2.1-12.2.1-2 |
2.4.0-1 |
shPyPI |
before 2.2.4, plus listed versions 0.010.1060.1070.1081.0 Show 45 moreShow less1.011.021.031.041.051.061.071.081.091.101.111.12.01.12.11.12.101.12.111.12.121.12.131.12.141.12.21.12.31.12.41.12.51.12.61.12.71.12.81.12.91.13.01.13.11.14.01.14.11.14.21.14.32.0.02.0.12.0.22.0.32.0.42.0.52.0.62.0.72.1.02.2.02.2.12.2.22.2.3 |
2.2.4 |
python-shSUSE:Linux Enterprise Server 16.0 |
before 2.2.2-160000.3.1 | 2.2.2-160000.3.1 |
python-shSUSE:Linux Enterprise Server for SAP applications 16.0 |
before 2.2.2-160000.3.1 | 2.2.2-160000.3.1 |
python-shSUSE:Linux Enterprise Module for Python 3 15 SP7 |
before 2.0.4-150400.9.6.1 | 2.0.4-150400.9.6.1 |
python-shSUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS |
before 2.0.4-150400.9.6.1 | 2.0.4-150400.9.6.1 |
python-shSUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS |
before 2.0.4-150400.9.6.1 | 2.0.4-150400.9.6.1 |
Show 17 moreShow less
| Package | Affected | Fixed |
|---|---|---|
python-shSUSE:Linux Enterprise High Performance Computing 15 SP5-ESPOS |
before 2.0.4-150400.9.6.1 | 2.0.4-150400.9.6.1 |
python-shSUSE:Linux Enterprise High Performance Computing 15 SP5-LTSS |
before 2.0.4-150400.9.6.1 | 2.0.4-150400.9.6.1 |
python-shSUSE:Linux Enterprise Server 15 SP4-LTSS |
before 2.0.4-150400.9.6.1 | 2.0.4-150400.9.6.1 |
python-shSUSE:Linux Enterprise Server 15 SP5-LTSS |
before 2.0.4-150400.9.6.1 | 2.0.4-150400.9.6.1 |
python-shSUSE:Linux Enterprise Server 15 SP6-LTSS |
before 2.0.4-150400.9.6.1 | 2.0.4-150400.9.6.1 |
python-shSUSE:Linux Enterprise Server for SAP Applications 15 SP4 |
before 2.0.4-150400.9.6.1 | 2.0.4-150400.9.6.1 |
python-shSUSE:Linux Enterprise Server for SAP Applications 15 SP5 |
before 2.0.4-150400.9.6.1 | 2.0.4-150400.9.6.1 |
python-shSUSE:Linux Enterprise Server for SAP Applications 15 SP6 |
before 2.0.4-150400.9.6.1 | 2.0.4-150400.9.6.1 |
python-shUbuntu:16.04:LTS |
All versions, plus listed versions 1.11-1 |
None known |
python-shUbuntu:18.04:LTS |
All versions, plus listed versions 1.11-1 |
None known |
python-shUbuntu:20.04:LTS |
All versions, plus listed versions 1.12.14-2 |
None known |
python-shUbuntu:22.04:LTS |
All versions, plus listed versions 1.14.1-11.14.2-1 |
None known |
python-shUbuntu:24.04:LTS |
All versions, plus listed versions 1.14.2-1 |
None known |
python-shUbuntu:26.10 |
All versions, plus listed versions 2.2.1-12.2.1-2 |
None known |
python-shUbuntu:26.04:LTS |
All versions, plus listed versions 2.2.1-1 |
None known |
python-shopenSUSE:Tumbleweed |
before 2.3.0-1.1 | 2.3.0-1.1 |
python-shopenSUSE:Leap 16.0 |
before 2.2.2-160000.3.1 | 2.2.2-160000.3.1 |
History
| Recorded | Changed | Sources |
|---|---|---|
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2026-54552 is a high vulnerability (CVSS 7.9) in Amoffat Sh, published July 17, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.17%, the 6th percentile. Fixed in sh 2.2.4.
References
github.com/amoffat/sh/security/advisories/GHSA-q38v-wp89-2w55
github.com/amoffat/sh/pull/776
github.com/amoffat/sh/commit/3d855daba91f87a089b490c0d1cf1df3faace2f1
github.com/amoffat/sh/releases/tag/2.2.4
github.com/advisories/GHSA-q38v-wp89-2w55
github.com/CVEProject/cvelistV5/tree/main/cves/2026/54xxx/CVE-2026-54552.json
Show 11 moreShow less
nvd.nist.gov/vuln/detail/CVE-2026-54552
security-tracker.debian.org/tracker/CVE-2026-54552
github.com/amoffat/sh
pypi.org/project/sh
suse.com/support/update/announcement/2026/suse-su-202623112-1
bugzilla.suse.com/1272424
suse.com/security/cve/CVE-2026-54552
suse.com/support/update/announcement/2026/suse-su-202623134-1
suse.com/support/update/announcement/2026/suse-su-20263422-1
ubuntu.com/security/CVE-2026-54552
cve.org/CVERecord?id=CVE-2026-54552