CVE-2026-54552
HIGH 7.9CVSS 3.1sh _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.
- Published
- 18 Aug 2026
- Last modified
- 22 Oct 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Deferred
- Weakness
- CWE-273
- Also known as
- GHSA-q38v-wp89-2w55PYSEC-2026-3540
- Sources
- NVDJSONOSV GHSA-q38v-wp89-2w55JSONOSV PYSEC-2026-3540JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | HIGH 7.9 | CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:N |
| OSV | GitHub | CVSS 3.1 | HIGH 7.9 | CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:N |
| OSV | PyPA | CVSS 3.1 | HIGH 7.9 | CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| OSV | PyPI | sh | < 2.2.4 | 2.2.4 |
References
- https://github.com/amoffat/sh/commit/3d855daba91f87a089b490c0d1cf1df3faace2f1
- https://github.com/amoffat/sh/pull/776
- https://github.com/amoffat/sh/releases/tag/2.2.4 · WEB
- https://github.com/amoffat/sh/security/advisories/GHSA-q38v-wp89-2w55 · WEB
- https://github.com/amoffat/sh · PACKAGE
- https://pypi.org/project/sh · PACKAGE
- https://github.com/advisories/GHSA-q38v-wp89-2w55 · ADVISORY
- https://nvd.nist.gov/vuln/detail/CVE-2026-54552 · ADVISORY
History
- 25 Nov 2026 21:04 UTC · NVD: first stored (published 18 Aug 2026)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 23 Jul 2026)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 17 Jul 2026)