T09 · Insecure Skill Coding Practices
- Location
scripts/generate_content.sh:102- Finding
Arbitrary Command Execution Through GNU sed Program Injection
- Content
View full analysis
` as an instruction to execute an operating-system command. This creates a direct path from a command-line title or content value to arbitrary command execution. The same interpolation also allows malformed input to corrupt the generated output or cause the script to fail, even when command execution is not attempted. ### Attack Path 1. An attacker supplies crafted content or a crafted title to `generate_content.sh`. 2. The input contains a replacement terminator, a newline, and a GNU `sed` `e` directive. 3. The script inserts the untrusted value into the `sed` expression at line 102 or 105. 4. GNU `sed` parses the injected newline as the start of another command. 5. The injected `e` directive executes an attacker-selected shell command. 6. The command runs with the operating-system identity and permissions of the user or a ...[truncated 936 chars]- Remediation
View remediation
