T01 · Skill Instruction Hijacking
- Location
SKILL.md:65- Finding
User-Controlled Reminder Text Is Promoted to a Main-Session System Event
- Content
View full analysis
`, `<` - Double quotes: `"` (breaks CLI quoting) - Newlines: `\n` (can inject multiple commands) - Dangerous command prefixes: `sudo`, `rm`, `wget`, `curl`, `bash`, etc. 2. **Sanitization Script**: Use `scripts/sanitize-message.sh` to validate input: ```bash ./scripts/sanitize-message.sh "user's task content" # Exit code 0 = safe, non-zero = rejected ``` 3. **If rejected**: Tell user the task contains invalid characters and ask them to rephrase without: $() ` ; | & > < " or dangerous commands. ``` The validator only detects shell syntax and a limited set of command prefixes: ```bash sanitize_message() { local input="$1" # Check for command substitution pa ...[truncated 4359 chars]- Remediation
View remediation
