The underlying weakness is a failed boundary between instructions and data. It can appear when applications construct commands from requests, imported content, stored records, or information received from another service. Input does not become trustworthy simply because it was stored earlier.
The Open Worldwide Application Security Project (OWASP) places injection at A05:2025 in its released 2025 Top 10; it was A03 in 2021. Affected contexts include Structured Query Language (SQL) statements, operating-system commands, dynamically evaluated code, Lightweight Directory Access Protocol (LDAP) filters, “not only SQL” (NoSQL) queries, and server-side templates.
Key points
Interpreter boundaryThe affected parser and execution context determine which characters, structures, or expressions can change the operation’s meaning.
Safer constructionInterfaces that keep values separate from instructions, fixed command structures, and context-appropriate encoding reduce unsafe interpretation; avoiding an interpreter can remove particular attack paths.
Consequence reductionNarrow service permissions and restricted downstream access limit what an injected operation can read, change, or execute.
Important limitationGeneric input filtering, escaping, or a web application firewall cannot guarantee protection across different interpreters and nested contexts. Validation supplements safe construction rather than replacing it.