CVE-2026-54552: CWE-273: Improper Check for Dropped Privileges in amoffat sh
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.
AI Analysis
Technical Summary
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.
CVE-2026-54552: CWE-273: Improper Check for Dropped Privileges in amoffat 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
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
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.
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 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
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
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.