T09 · Insecure Skill Coding Practices
- Location
references/workflow.md:185- Finding
Shell Injection Through Interpolated User-Controlled Values
- Content
View full analysis
" ``` ```bash git -C "" add . git -C "" commit -m "" git -C "" rev-parse --short HEAD ``` ```bash printf '%s\n' "" > "/static/CNAME" git -C "" add hugo.toml git -C "" add static/CNAME git -C "" commit -m "chore(hugo): configure custom domain" git -C "" push origin "" ``` ### Technical Analysis The workflow inserts values derived from users or repository state—including workspace paths, commit messages, custom domains, and branch names—directly into shell command templates. Double quotation marks prevent ordinary argument splitting but do not make an interpolated shell command safe. If the implementation replaces placeholders and then evaluates the completed command through a shell, shell constructs such as command substitution remain active. For example, a commit message containing `$(malicious-command)` could be evaluated before being passed to Git. The issue applies particularly to: - User-provided commit messages. - User-selected workspace paths. - User-provided custom domains. - Branch names read from repositories that may be attacker-controlled. - Theme names or paths if they are handled using the same substitution model. Whether exploitation succeeds depends on the execution layer. The vulnerability is exploitable when these templates are rendered into command strings and passed to a shell rather than invoked through a structured argument-array API. ### Attack Path 1. An attacker sup ...[truncated 1196 chars]- Remediation
View remediation
