{"answers":{"affected":"3 open source packages ship an affected version, including sh.","exploited":"There is no known exploitation of CVE-2026-54552 in the wild and no public exploit code.","fix":"Upgrade sh to 2.2.4 or later.","what":"CVE-2026-54552 is a high-severity vulnerability in amoffat sh, published on 18 Aug 2026. It can only be exploited from the same machine or local network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2026-54552 and fix it if it is affected.\n\nWhat it is: CVE-2026-54552 is a high-severity vulnerability in amoffat sh, published on 18 Aug 2026. It can only be exploited from the same machine or local network, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2026-54552 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- sh (PyPI): affected all versions; fixed in 2.2.4\n- sh (PyPI): affected all versions; fixed in 2.2.4\n- sh (PyPI): affected all versions; fixed in 2.2.4\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2026-54552/ (Markdown: https://insights.sbomify.com/CVE-2026-54552/index.md)","id":"CVE-2026-54552","markdown":"https://insights.sbomify.com/CVE-2026-54552/index.md","name":"CVE-2026-54552","record":{"aliases":["DEBIAN-CVE-2026-54552","GHSA-q38v-wp89-2w55","PYSEC-2026-3540","SUSE-SU-2026:23112-1","SUSE-SU-2026:23134-1","SUSE-SU-2026:3422-1","UBUNTU-CVE-2026-54552","openSUSE-SU-2026:11372-1","openSUSE-SU-2026:21516-1"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["privilege_escalation","data_read"],"network_reachable":"adjacent_or_local","non_default_config":false,"product_category":"Python sh library","requires_auth":"high_privilege","summary":"The sh library fails to drop supplementary groups when changing user IDs, allowing child processes to retain privileged group access.","user_interaction":"not_required","vuln_class":"privilege_escalation"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[],"cvss":{"score":7.9,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:N","version":"3.1"},"cwes":[{"id":"CWE-273","name":"Improper Check for Dropped Privileges"}],"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.","ecosystems":["PyPI","SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS","SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS","SUSE:Linux Enterprise High Performance Computing 15 SP5-ESPOS","SUSE:Linux Enterprise High Performance Computing 15 SP5-LTSS","SUSE:Linux Enterprise Module for Python 3 15 SP7","SUSE:Linux Enterprise Server 15 SP4-LTSS","SUSE:Linux Enterprise Server 15 SP5-LTSS","SUSE:Linux Enterprise Server 15 SP6-LTSS","SUSE:Linux Enterprise Server 16.0","SUSE:Linux Enterprise Server for SAP Applications 15 SP4","SUSE:Linux Enterprise Server for SAP Applications 15 SP5","SUSE:Linux Enterprise Server for SAP Applications 15 SP6","SUSE:Linux Enterprise Server for SAP applications 16.0","openSUSE:Leap 16.0","openSUSE:Tumbleweed"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"sh _uid does not drop supplementary groups (incomplete privilege drop)","id":"CVE-2026-54552","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"privilege_escalation","year":"2026"},"n_packages":20,"n_references":4,"next":{"headline":"Starlette-Admin's unvalidated `order_by` parameter allows ordering by hidden columns (info-exposure oracle) and HTTP 500 DoS","id":"CVE-2026-54553"},"packages":[{"ecosystem":"PyPI","fixed":["2.2.4"],"introduced":["0"],"last_affected":[],"package":"sh","purl":null,"source":"GHSA-q38v-wp89-2w55"},{"ecosystem":"PyPI","fixed":["2.2.4"],"introduced":["0"],"last_affected":[],"package":"sh","purl":"pkg:pypi/sh","source":"GHSA-q38v-wp89-2w55"},{"ecosystem":"PyPI","fixed":["2.2.4"],"introduced":["0"],"last_affected":[],"package":"sh","purl":"pkg:pypi/sh","source":"PYSEC-2026-3540"},{"ecosystem":"SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS","fixed":["2.0.4-150400.9.6.1"],"introduced":["0"],"last_affected":[],"package":"python-sh","purl":"pkg:rpm/suse/python-sh\u0026distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP4-ESPOS","source":"SUSE-SU-2026:3422-1"},{"ecosystem":"SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS","fixed":["2.0.4-150400.9.6.1"],"introduced":["0"],"last_affected":[],"package":"python-sh","purl":"pkg:rpm/suse/python-sh\u0026distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP4-LTSS","source":"SUSE-SU-2026:3422-1"},{"ecosystem":"SUSE:Linux Enterprise High Performance Computing 15 SP5-ESPOS","fixed":["2.0.4-150400.9.6.1"],"introduced":["0"],"last_affected":[],"package":"python-sh","purl":"pkg:rpm/suse/python-sh\u0026distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP5-ESPOS","source":"SUSE-SU-2026:3422-1"},{"ecosystem":"SUSE:Linux Enterprise High Performance Computing 15 SP5-LTSS","fixed":["2.0.4-150400.9.6.1"],"introduced":["0"],"last_affected":[],"package":"python-sh","purl":"pkg:rpm/suse/python-sh\u0026distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP5-LTSS","source":"SUSE-SU-2026:3422-1"},{"ecosystem":"SUSE:Linux Enterprise Module for Python 3 15 SP7","fixed":["2.0.4-150400.9.6.1"],"introduced":["0"],"last_affected":[],"package":"python-sh","purl":"pkg:rpm/suse/python-sh\u0026distro=SUSE%20Linux%20Enterprise%20Module%20for%20Python%203%2015%20SP7","source":"SUSE-SU-2026:3422-1"},{"ecosystem":"SUSE:Linux Enterprise Server 15 SP4-LTSS","fixed":["2.0.4-150400.9.6.1"],"introduced":["0"],"last_affected":[],"package":"python-sh","purl":"pkg:rpm/suse/python-sh\u0026distro=SUSE%20Linux%20Enterprise%20Server%2015%20SP4-LTSS","source":"SUSE-SU-2026:3422-1"},{"ecosystem":"SUSE:Linux Enterprise Server 15 SP5-LTSS","fixed":["2.0.4-150400.9.6.1"],"introduced":["0"],"last_affected":[],"package":"python-sh","purl":"pkg:rpm/suse/python-sh\u0026distro=SUSE%20Linux%20Enterprise%20Server%2015%20SP5-LTSS","source":"SUSE-SU-2026:3422-1"},{"ecosystem":"SUSE:Linux Enterprise Server 15 SP6-LTSS","fixed":["2.0.4-150400.9.6.1"],"introduced":["0"],"last_affected":[],"package":"python-sh","purl":"pkg:rpm/suse/python-sh\u0026distro=SUSE%20Linux%20Enterprise%20Server%2015%20SP6-LTSS","source":"SUSE-SU-2026:3422-1"},{"ecosystem":"SUSE:Linux Enterprise Server 16.0","fixed":["2.2.2-160000.3.1"],"introduced":["0"],"last_affected":[],"package":"python-sh","purl":"pkg:rpm/suse/python-sh\u0026distro=SUSE%20Linux%20Enterprise%20Server%2016.0","source":"SUSE-SU-2026:23112-1"},{"ecosystem":"SUSE:Linux Enterprise Server 16.0","fixed":["2.2.2-160000.3.1"],"introduced":["0"],"last_affected":[],"package":"python-sh","purl":"pkg:rpm/suse/python-sh\u0026distro=SUSE%20Linux%20Enterprise%20Server%2016.0","source":"SUSE-SU-2026:23134-1"},{"ecosystem":"SUSE:Linux Enterprise Server for SAP Applications 15 SP4","fixed":["2.0.4-150400.9.6.1"],"introduced":["0"],"last_affected":[],"package":"python-sh","purl":"pkg:rpm/suse/python-sh\u0026distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2015%20SP4","source":"SUSE-SU-2026:3422-1"},{"ecosystem":"SUSE:Linux Enterprise Server for SAP Applications 15 SP5","fixed":["2.0.4-150400.9.6.1"],"introduced":["0"],"last_affected":[],"package":"python-sh","purl":"pkg:rpm/suse/python-sh\u0026distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2015%20SP5","source":"SUSE-SU-2026:3422-1"},{"ecosystem":"SUSE:Linux Enterprise Server for SAP Applications 15 SP6","fixed":["2.0.4-150400.9.6.1"],"introduced":["0"],"last_affected":[],"package":"python-sh","purl":"pkg:rpm/suse/python-sh\u0026distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2015%20SP6","source":"SUSE-SU-2026:3422-1"},{"ecosystem":"SUSE:Linux Enterprise Server for SAP applications 16.0","fixed":["2.2.2-160000.3.1"],"introduced":["0"],"last_affected":[],"package":"python-sh","purl":"pkg:rpm/suse/python-sh\u0026distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20applications%2016.0","source":"SUSE-SU-2026:23112-1"},{"ecosystem":"SUSE:Linux Enterprise Server for SAP applications 16.0","fixed":["2.2.2-160000.3.1"],"introduced":["0"],"last_affected":[],"package":"python-sh","purl":"pkg:rpm/suse/python-sh\u0026distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20applications%2016.0","source":"SUSE-SU-2026:23134-1"},{"ecosystem":"openSUSE:Leap 16.0","fixed":["2.2.2-160000.3.1"],"introduced":["0"],"last_affected":[],"package":"python-sh","purl":"pkg:rpm/opensuse/python-sh\u0026distro=openSUSE%20Leap%2016.0","source":"openSUSE-SU-2026:21516-1"},{"ecosystem":"openSUSE:Tumbleweed","fixed":["2.3.0-1.1"],"introduced":["0"],"last_affected":[],"package":"python-sh","purl":"pkg:rpm/opensuse/python-sh\u0026distro=openSUSE%20Tumbleweed","source":"openSUSE-SU-2026:11372-1"}],"prev":{"headline":"Missing authorization in wg-portal","id":"CVE-2026-54551"},"products":["sh"],"published":"2026-08-18","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"PyPA Advisory Database","prefix":"PYSEC"},{"class":"attribution","licence":"CC BY 4.0","name":"SUSE","prefix":"SUSE"},{"class":"attribution","licence":"CC BY 4.0","name":"SUSE","prefix":"openSUSE"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"total"},"state":"PUBLISHED","updated":"2026-08-18","vendors":["amoffat"]},"summary":"The sh library fails to drop supplementary groups when changing user IDs, allowing child processes to retain privileged group access.","url":"https://insights.sbomify.com/CVE-2026-54552/"}