# CVE-2026-54552: sh _uid does not drop supplementary groups (incomplete privilege drop)

- Severity: High 7.9 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.13%, higher than 2% of CVEs (2026-12-01)
- Published: 2026-07-17T18:41:38.000Z
- Modified: 2026-10-22T22:10:00.250Z
- Also known as: GHSA-q38v-wp89-2w55, PYSEC-2026-3540
- Weaknesses: CWE-273
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- amoffat sh: < 2.2.4
- sh (PyPI): before 2.2.4

## Every score

- GitHub_M: 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`
- GitHub: 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`
- PyPA Advisory Database: 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`

## References

- <https://github.com/amoffat/sh/security/advisories/GHSA-q38v-wp89-2w55> (web)
- <https://github.com/amoffat/sh/pull/776>
- <https://github.com/amoffat/sh/commit/3d855daba91f87a089b490c0d1cf1df3faace2f1>
- <https://github.com/amoffat/sh/releases/tag/2.2.4> (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)

## Sources

- CVE List: [CVE-2026-54552](https://www.cve.org/CVERecord?id=CVE-2026-54552), CVE Terms of Use, modified 2026-08-18
- GitHub Advisory Database: [GHSA-q38v-wp89-2w55](https://github.com/advisories/GHSA-q38v-wp89-2w55), CC-BY-4.0, modified 2026-07-23
- NVD: [CVE-2026-54552](https://nvd.nist.gov/vuln/detail/CVE-2026-54552), Public domain, modified 2026-10-22
- PyPA Advisory Database: [PYSEC-2026-3540](https://osv.dev/vulnerability/PYSEC-2026-3540), CC-BY-4.0, modified 2026-07-23

---

Page: https://cve.day/CVE-2026-54552 · Whole record: https://cve.day/CVE-2026-54552.json · Rebuilt by cve.day 2026-11-25T22:59:33.538Z
