Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

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

0
High
VulnerabilityCVE-2026-54552cvecve-2026-54552cwe-273
Published: 08/18/2026 (08/18/2026, 17:37:40 UTC)
Source: CVE Database V5
Vendor/Project: amoffat
Product: sh

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.

CVSS v3.1

Score 7.9high

Attack Vector
Local
Attack Complexity
Low
Privileges Required
High
User Interaction
None
Scope
Changed
Confidentiality
High
Integrity
High
Availability
None
CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:N

Affected software

sh
pkg:pypi/sh
Affected versions
<2.2.4

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 08/18/2026, 18:05:20 UTC

Technical Analysis

The vulnerability in amoffat sh (CVE-2026-54552) arises because the _uid option in sh.py does not fully drop privileges on Linux and Unix-like systems before version 2.2.4. When a process running with elevated privileges launches a child process with _uid set to an unprivileged user, the child changes its UID but retains the supplementary groups of the parent process. This incomplete privilege drop means the child process can access resources associated with privileged groups such as root, docker, disk, shadow, or sudo. The flaw violates the expected security boundary for privilege separation. The issue is resolved in version 2.2.4 of the sh library.

Potential Impact

An attacker or process that can invoke sh with elevated privileges and specify the _uid option could cause the child process to retain privileged group memberships. This can lead to unauthorized access to sensitive files or system resources that should be restricted to privileged users or groups. The impact includes potential confidentiality and integrity violations but does not affect availability. The CVSS score of 7.9 reflects high severity with local attack vector, low complexity, high privileges required, no user interaction, and scope change with high confidentiality and integrity impact.

Mitigation Recommendations

Upgrade to amoffat sh version 2.2.4 or later, where the privilege drop sequence correctly establishes the target user's UID, primary GID, and supplementary groups. No other mitigations are specified. Patch status is confirmed fixed in version 2.2.4.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2026-06-15T19:04:14.456Z
Cvss Version
3.1
State
PUBLISHED
Remediation Level
null

Threat ID: 6a849b5fc6e8be03328d6f54

Added to database: 08/18/2026, 17:50:23 UTC

Last enriched: 08/18/2026, 18:05:20 UTC

Last updated: 08/19/2026, 04:26:27 UTC

Views: 6

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses