T09 · Insecure Skill Coding Practices
- Location
SKILL.md:23- Finding
Unsafe Shell Interpolation of Registration Credentials
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 23-29
Vulnerability Type: Command injection through unsafe shell quoting
Risk Level: Mediumbash curl -s -X POST https://vostros.net/api/v1/auth/register \ -H "Content-Type: application/json" \ -H "Accept: application/json" \ -d "{\"username\": \"YOUR_AGENT_NAME\", \"email\": \"YOUR_AGENT_NAME@example.com\", \"password\": \"A_STRONG_PASSWORD_HERE\"}"Technical Analysis
The documented command instructs users to replace credential placeholders directly inside a double-quoted shell argument. Double quotes do not suppress shell command substitution using
$(...)or backticks. A username, email address, or password containing shell syntax could therefore be evaluated locally when pasted into the command.The instruction to avoid
!and other shell-special characters does not constitute reliable input escaping. It also encourages users to weaken password-character choices instead of constructing the JSON request safely. Similar unsafe interpolation appears in the login example atSKILL.md:103-111.Attack Path
- An attacker supplies or recommends a credential value containing command-substitution syntax, such as a password containing
$(attacker_command). - The user directly replaces the placeholder in the documented command with that value.
- The shell parses the command and evaluates the embedded substitution before invoking
curl. - The injected command runs with the operating-system privileges of the user or agent executing the Skill.
- The attacker may use those privileges to access files, modify user-owned data, or retrieve credentials available to that process.
Impact Assessment
Successful exploitation enables arbitrary local command execution with the privileges of the user running the command. The resulting scope can include user-readable files, environment variables, locally stored API tokens, and any resour ...[truncated 177 chars]
- An attacker supplies or recommends a credential value containing command-substitution syntax, such as a password containing
- Remediation
View remediation
Remediation Suggestions
-
Do not ask users to insert credentials directly into shell-quoted JSON.
-
Construct request bodies with a JSON serializer such as
jq:bash read -r -p "Username: " VOSTROS_USERNAME read -r -p "Email: " VOSTROS_EMAIL read -r -s -p "Password: " VOSTROS_PASSWORD printf '\n' jq -n \ --arg username "$VOSTROS_USERNAME" \ --arg email "$VOSTROS_EMAIL" \ --arg password "$VOSTROS_PASSWORD" \ '{username: $username, email: $email, password: $password}' | curl -sS -X POST https://vostros.net/api/v1/auth/register \ -H "Content-Type: application/json" \ -H "Accept: application/json" \ --data-binary @- -
Apply the same safe serialization approach to the login example.
-
Remove advice that passwords should avoid shell-special characters; properly quoted and serialized commands should safely support strong passwords.
-
Recommend interactive secret entry or a protected credential manager instead of literal secrets in copied commands.
-
