cve.bz

CVE-2026-54552 amoffat sh: Improper Check for Dropped Privileges

7.9 highEPSS 0.2%Fix available

High (7.9) in amoffat sh. EPSS 0.2% estimated probability of exploitation activity in the next 30 days. Fixed in sh 2.2.4.

On this page
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.

Severity

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
EPSS
0.2% (unchanged from 0.2% a week ago; 0.2% 30 days ago) estimated probability of exploitation activity in the next 30 days; 4th percentile. Scored 2026-11-30. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: total, assessed 2026-08-18. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-273 Improper Check for Dropped Privileges
Published
Modified
NVD analysis
Deferred: the NVD does not plan to analyze it
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2026-54552 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2026-54552?via=ask-ai-copy and https://cve.bz/cve/CVE-2026-54552?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2026-54552 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
amoffat sh< 2.2.4

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-q38v-wp89-2w55PyPIsh<2.2.42.2.4
PYSEC-2026-3540PyPIsh<2.2.42.2.4

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12, 13python-shno fix listedDEBIAN-CVE-2026-54552
Debian14python-sh2.4.0-1DEBIAN-CVE-2026-54552
Ubuntu16.04:LTS, 18.04:LTS, 20.04:LTS and 4 morepython-shno fix listedUBUNTU-CVE-2026-54552
SUSELinux Enterprise High Performance Computing 15 SP4-ESPOS, Linux Enterprise High Performance Computing 15 SP4-LTSS, Linux Enterprise High Performance Computing 15 SP5-ESPOS and 8 morepython-sh2.0.4-150400.9.6.1SUSE-SU-2026:3422-1
SUSELinux Enterprise Server 16.0, Linux Enterprise Server for SAP applications 16.0python-sh2.2.2-160000.3.1SUSE-SU-2026:23112-1 SUSE-SU-2026:23134-1
openSUSELeap 16.0python-sh2.2.2-160000.3.1openSUSE-SU-2026:21516-1
openSUSETumbleweedpython-sh2.3.0-1.1openSUSE-SU-2026:11372-1

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; SUSE security data, CC BY 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · SUSE · openSUSE.

Red Hat

Red Hat rates this Important.

Red Hat's statement

A flaw of IMPORTANT severity was found in the sh Python library for process launching, which is bundled in the OpenShift Virtualization ocp-virt-validation-checkup-rhel9 container image (cnv-4.22 update stream). The _uid option in sh 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 process 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. As a result, the child process can retain access to files and resources granted to privileged groups such as root, docker, disk, shadow, or sudo, violating the expected _uid privilege boundary and allowing unauthorized access and potential privilege escalation. Exploitation requires local access to an already-elevated process that uses the _uid option (CVSS 7.9, CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:N), which matches the upstream severity. Within Red Hat, only the OpenShift Virtualization component listed above is flagged as affected; its resolution is delegated to the OpenShift Virtualization team, whose assessment concluded that the vulnerable code is not in the execute path for that container. Other Red Hat offerings that bundle sh, the Insights host-inventory service and the subscription-central-automation container image, are not affected because the sh versions they ship are outside the affected range (vulnerable code not present).

Red Hat's mitigation

Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base, or stability.

ProductPackageStateAdvisory
Red Hat OpenShift Virtualization 4container-native-virtualization/ocp-virt-validation-checkup-rhel9Not affected

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2026-54552.

References

Check your stackJSON