Skip to content

fix: avoid interpolating args into bash -c in execute package#2252

Open
RobertoLuzanilla wants to merge 3 commits intoasdf-vm:masterfrom
RobertoLuzanilla:fix/avoid-bash-arg-interpolation
Open

fix: avoid interpolating args into bash -c in execute package#2252
RobertoLuzanilla wants to merge 3 commits intoasdf-vm:masterfrom
RobertoLuzanilla:fix/avoid-bash-arg-interpolation

Conversation

@RobertoLuzanilla
Copy link

Prevents shell command injection by avoiding interpolation of arguments into the bash -c command string.

Passes arguments via $0/$@ instead of formatting them into the shell command.

Adds a regression test covering the reported payload pattern.

Security note: this PR addresses the primary reported issue (CWE-78 via user-controlled plugin URL arguments). Other findings (e.g., $SHELL and ASDF_DATA_DIR cases) are intentionally out of scope and can be handled separately if desired.

@RobertoLuzanilla RobertoLuzanilla requested a review from a team as a code owner March 2, 2026 19:40
@RobertoLuzanilla RobertoLuzanilla changed the title execute: avoid interpolating args into bash -c fix(execute): avoid interpolating args into bash -c Mar 3, 2026
@RobertoLuzanilla RobertoLuzanilla changed the title fix(execute): avoid interpolating args into bash -c fix: avoid interpolating args into bash -c in execute package Mar 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant