You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
sandbox-escape-ssh-self misses an ssh-to-self call inside a double-quoted command substitution #36904
I searched open issues and this is not already reported.
KiroCrew version
main at 9b39b80 (source checkout, not a release build)
Release channel
Not sure
How is it installed?
From source
Platform
Not platform-specific
What happened
The ssh-to-self guard (sandbox-escape-ssh-self) lets an ssh-to-this-host call through when it sits in a command substitution inside double quotes. Bash runs a $(...) inside double quotes, so the ssh runs.
The -p 22 keeps the rule's catalog pattern from matching, so only the argv floor judges these lines. The floor refuses the unquoted $(...) and the double-quoted backtick, and misses the double-quoted $(...).
Steps to reproduce
On main, call kiro_crew.security.deny_gate.is_denied with both lines above.
The first is refused with rule=sandbox-escape-ssh-self component=argv-floor.
The second is allowed, although bash runs the same ssh.
Anything else
Expected: a $(...) or backtick substitution inside double quotes is read as a command, the same as an unquoted one, so the second line is refused too. A substitution inside single quotes stays plain text (#36887).
Found while working on #36887; the gap is on main before that change and after it.
Still allowed on main 3397952, on #37037's head and on #34056's head (fb6373c): echo "$(ssh -p 22 <self> id)" and x="$(ssh -p 22 <self> id)". A fix PR for this issue is being prepared now.
Activity
CrysisDeu commentedon Nov 14, 2026
Tracking only: buluoray's open PR #36903 lists this issue in its closing references and may close it. No separate fix from our side.
buluoray commentedon Nov 15, 2026
Still allowed on main 3397952, on #37037's head and on #34056's head (fb6373c):
echo "$(ssh -p 22 <self> id)"andx="$(ssh -p 22 <self> id)". A fix PR for this issue is being prepared now.fix(security): read a double-quoted $( ) as a command in ssh floor
fix(security): read a double-quoted $( ) as a command in ssh floor
fix(security): read a double-quoted $( ) as a command in ssh floor
fix(security): read a double-quoted $( ) as a command in ssh floor
fix(security): read a double-quoted $( ) as a command in ssh floor (k…
fix(security): read a double-quoted $( ) as a command in ssh floor (#…
fix(security): read a double-quoted $( ) as a command in ssh floor (#…