T09 · Insecure Skill Coding Practices
- Location
SKILL.md:91- Finding
Command Injection Through Shell Interpolation of Generated Personalization
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 91-95
Vulnerability Type: Shell command injection
Risk Level: HighVulnerable Code:
bash echo "YOUR_PERSONALIZATION_HERE" | vardoger write --platform openclaw --scope globalThe accompanying instruction states:
text Replace `YOUR_PERSONALIZATION_HERE` with the actual personalization markdown you generated.Technical Analysis
The skill directs the agent to place generated personalization text directly inside a double-quoted shell argument. Although double quotes prevent ordinary word splitting, they do not prevent shell command substitution through constructs such as
$(command)or backticks.The personalization is synthesized from historical conversation content. If untrusted conversation text influences the generated Markdown, shell syntax could be preserved in the personalization and then inserted into the documented command. The shell would evaluate command substitutions before passing the resulting text to
echoandvardoger.For example, personalization text containing a construct equivalent to
$(malicious-command)could cause that command to execute rather than being treated purely as Markdown.Attack Path
- An attacker introduces specially crafted text containing shell command-substitution syntax into conversation history.
vardoger prepareexposes that historical text to the assistant during batch analysis.- The malicious syntax survives summarization and appears in the generated personalization.
- The assistant replaces
YOUR_PERSONALIZATION_HEREwith that generated content in the documented shell command. - The shell evaluates the embedded command substitution.
- The injected command executes with the privileges of the user running the agent.
Impact Assessment
Successful exploitation permits arbitrary command execution under the account running the skill. The resulting process c ...[truncated 509 chars]
- Remediation
View remediation
Remediation Suggestions
- Never interpolate generated or conversation-derived content into shell source code.
- Prefer invoking
vardogerthrough a process API with an explicit argument array and supplying the personalization through standard input. - If a shell must be used, place the personalization in a securely created file using a file-writing API, then redirect that file to the command.
- A quoted heredoc may be used only if its delimiter is fixed and guaranteed not to occur in the content. A direct file API is safer.
- Validate that generated personalization contains only expected Markdown, but do not rely on validation as the primary command-injection defense.
- Add documentation explicitly prohibiting construction of commands such as
echo "$GENERATED_CONTENT". - Execute the write operation with the minimum filesystem and network permissions required.
