Attacks and Exploits

A web form passes a host value to an OS utility. A filter rejects semicolons and ampersands in the value. Which input approach BEST still chains an extra command?

Show the answer

Correct answerB. Use a pipe or newline as the separator

AWhy not this: Traversal sequences change which file is reached; they do not make the shell run another command.

BWhy this is right: Pipe and newline are other shell metacharacters that chain commands, so a short blocklist misses them.

CWhy not this: A template expression is evaluated by a template engine, not by the OS shell running the utility.

DWhy not this: Quote-and-UNION syntax targets a SQL query, but this value goes to an OS utility.

The shell accepts several metacharacters that join or separate commands, including the pipe and the newline, so a filter blocking only semicolons and ampersands leaves other separators open. Traversal sequences only change file paths and do not chain commands.