Injection & Untrusted Input
The same bug in six costumes: data crossing a boundary and being interpreted as instructions — SQL, shell, paths, URLs, serialized objects.
Every lesson below identifies the asset, attacker capability and boundary before naming the vulnerability. Controls are split into prevention, detection and recovery; residual risk is explicit.
SQL injection is a boundary failure: user data is concatenated into query syntax and the database interprets it as instructions.
A shell is an interpreter: when user data becomes part of a command string, punctuation can become behavior.
Unsafe path construction lets an identifier escape the directory the developer intended as its boundary.
A user-controlled URL turns the backend’s network position and credentials into an attacker-controlled capability.
URL parsing is only one layer; destination policy, DNS/IP checks, redirect handling, egress rules and workload identity constrain the real capability.
Untrusted serialized bytes should become validated data, not native objects with executable hooks and surprising behavior.