Hunting Command Argument And Flag Injection

Hunt argument and flag injection where untrusted input occupies a slot in a subprocess argument vector, with no shell involved, and the target program parses it as an option rather than data. Covers a value that starts with a dash and becomes a flag, and a value inserted before the program separates options from operands, turning a data argument into one that changes behavior: writing or reading a file, running an embedded command, changing a config or protocol, or reaching a network target. This is not command injection, there is no shell, so metacharacter defenses miss it; the fix is an argument terminator and a fixed positional layout. Use when input is placed into an argv slot of a spawned tool. The untrusted argv value is the source, the target program option parser is the sink, and an argument reinterpreted as a dangerous option is the bug.

UnboundCompute Updated

File contents

UnboundCompute/security-agent-skills/tree/main/skills/hunting-command-argument-and-flag-injection commit 1eeb6ecc8a

Frequently asked questions

npx skillmds@latest add unboundcompute/hunting-command-argument-and-flag-injection