Command-line parsing is the process a program uses to interpret the options and arguments supplied when it starts. These inputs can select actions, set configuration, or provide data. A parser turns the input into values the program can use, so rules about quoting, separators, and allowed options matter.
In cyber security, inconsistent parsing or weak validation can let an attacker supply input that a program interprets differently than its caller intended. This is especially risky when a privileged service launches another program: options that appear harmless to one component may be treated as powerful instructions by the next. Defenses include validating inputs against an explicit allowlist, using safe process-launch APIs rather than assembling command strings, and ensuring validation matches the target program’s parsing rules.


