Update dependency sh to v2 [SECURITY]#321
Open
balena-renovate[bot] wants to merge 1 commit into
Open
Conversation
Update sh from 1.14.3 to 2.2.4 Change-type: patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
==1.14.3→==2.2.4sh _uid does not drop supplementary groups (incomplete privilege drop)
CVE-2026-54552 / GHSA-q38v-wp89-2w55
More information
Details
Impact
The
_uidoption performed an incomplete privilege drop on Linux/Unix-like systems.When
shwas run from a process with elevated privileges, such as root, and a command was launched with_uid=<unprivileged user>, the child process changed its UID and primary GID but did not reset its supplementary groups. As a result, the child process could retain the parent process’s supplementary groups, potentially including privileged groups such as root, docker, disk, shadow, or sudo.This could allow a subprocess that was expected to run with reduced privileges to access files or resources available to the original process’s supplementary groups. Users are impacted if they rely on
_uidas a privilege boundary when launching commands from a privileged parent process.Patches
Upgrade to version >= 2.2.4
Workarounds
Avoid using
_uidwhen the user represents a less-privileged user.Severity
CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Release Notes
amoffat/sh (sh)
v2.2.4Compare Source
gidwas not set on the launched processv2.2.3Compare Source
_uidv2.2.2Compare Source
ok_code#699v2.2.1Compare Source
asyncandreturn_cmddoes not raise exceptions #746v2.2.0Compare Source
return_cmdwithawaitnow works correctly #743v2.1.0Compare Source
sh.contrib.bash#736v2.0.7Compare Source
sh.globarguments #708v2.0.6Compare Source
v2.0.5Compare Source
withcontexts #690v2.0.4Compare Source
ok_codeto be used withfg#665new_groupnever creates a new session #675v2.0.3Compare Source
_in#650v2.0.2Compare Source
_in#650v2.0.1Compare Source
v2.0.0Compare Source
_asyncRunningCommand.__eq__no longer has the side effect of executing the command #518_teenow supports both "err" and "out" #215cdlink_no_outisn't allowed with_iter="err"#638Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate.