sh (Python) CVE-2026-54552
HIGHSeverity by source
AV:L/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:N
Local low-complexity attack needing a privileged root parent using _uid (PR:H); the crossed privilege boundary gives S:C with high confidentiality/integrity impact and no availability effect.
Primary rating from GitHub Advisory.
CVSS VectorGitHub Advisory
CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:N
Lifecycle Timeline
3DescriptionGitHub Advisory
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.
AnalysisAI
Privilege escalation via incomplete privilege drop in the Python 'sh' subprocess library (versions < 2.2.4): when a root/privileged process launches a command with the _uid option, the child changes UID and primary GID but fails to clear the parent's supplementary groups via setgroups(). Any subprocess expected to run unprivileged can therefore retain sensitive parent groups (root, docker, disk, shadow, sudo), reading or writing resources those groups grant. …
Unlock full vulnerability intelligence
- Risk assessment & exploitation conditions
- Attack chain visualization
- Remediation with exact patch versions
- Threat intelligence from 22 sources
- Personal watchlist & email alerts
Free forever · No credit card required
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata
Vulnerability AssessmentAI
| Exploitation | Requires a Linux/Unix host where a privileged parent process (typically root) invokes sh with the _uid=<unprivileged user> option AND relies on _uid as its privilege boundary, while that root process is itself a member of powerful supplementary groups such as docker, disk, shadow, sudo, or root. … Additional conditions and limiting factors are described in the full assessment. |
| Risk Assessment | The vendor CVSS 3.1 vector (AV:L/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:N, 7.9 High) is internally consistent: exploitation is local and low-complexity but requires a high-privilege context (a root parent using _uid), with a scope change reflecting the crossed privilege boundary and high confidentiality/integrity impact. … Full risk analysis with EPSS, KEV, and SSVC signal comparison available after sign-in. |
| Exploit Scenario | A daemon running as root uses sh with _uid to execute a plugin or user-supplied command as an unprivileged account, trusting _uid to sandbox it. Because supplementary groups are never cleared, the command still belongs to the docker group and mounts a container bind-mounting the host filesystem, or belongs to shadow and reads /etc/shadow - achieving full host compromise despite the reduced UID. … |
| Remediation | Vendor-released patch: 2.2.4 - upgrade the sh dependency to version >= 2.2.4 (pip install --upgrade 'sh>=2.2.4') as the primary fix, per GHSA-q38v-wp89-2w55. … Detailed patch versions, workarounds, and compensating controls in full report. |
Recommended ActionAI
Within 24 hours, conduct a complete inventory of systems and applications using the Python 'sh' library and document their versions. …
Sign in for detailed remediation steps and compensating controls.
Threat intelligence, references, and detailed analysis are available after sign-in.
An issue was discovered in Appsmith before 1.52. Rated critical severity (CVSS 9.8), this vulnerability is remotely expl
runc through version 1.0-rc6 (used in Docker before 18.09.2) contains a container escape vulnerability that allows attac
Netmaker makes networks with WireGuard. Rated high severity (CVSS 7.5), this vulnerability is remotely exploitable, no a
Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/
The News & Blog Designer Pack - WordPress Blog Plugin - (Blog Post Grid, Blog Post Slider, Blog Post Carousel, Blog Post
Docker 1.3.2 allows remote attackers to execute arbitrary code with root privileges via a crafted (1) image or (2) build
Remote code execution in NocoBase Workflow Script Node (npm @nocobase/plugin-workflow-javascript) allows authenticated l
Docker Desktop Community Edition before 2.1.0.1 allows local users to gain privileges by placing a Trojan horse docker-c
Vasion Print (formerly PrinterLogic) Virtual Appliance Host prior to version 25.2.169 and Application prior to version 2
An issue in Plone Docker Official Image 5.2.13 (5221) open-source software that could allow for remote code execution du
Tandoor Recipes is an application for managing recipes, planning meals, and building shopping lists. Rated critical seve
Unauthenticated remote code execution in 9router (npm package) versions 0.4.30 through 0.4.36 allows network-adjacent at
Same weakness CWE-273 – Improper Check for Dropped Privileges
View allSame technique Information Disclosure
View allShare
External POC / Exploit Code
Leaving vuln.today