Input Injection and Unsafe Interpretation Failures
Untrusted input is interpreted as SQL, NoSQL queries, or commands by downstream components due to missing parameterization or input handling.
Failure explanation
Untrusted API input is interpreted as executable query syntax, commands, templates, or expressions by a downstream component. This includes SQL/NoSQL injection, command injection, unsafe expression evaluation, and path manipulation. The vulnerability often exists beyond the HTTP layer, where values are concatenated into database queries or passed to shell commands.
Example
A search endpoint builds SQL by concatenating a query parameter. A crafted value changes the intended filter and returns records outside the caller’s search scope.
How to test
- Use safe, non-destructive injection test strings in an authorized isolated environment.
- Exercise query, path, header, and JSON fields that reach database or command interpreters.
- Verify parameterized queries, allowlisted operations, validation, and safe error handling.
- Confirm that tests do not execute destructive payloads or target production.
Expected behavior
Input is treated as data, not executable instructions. The API prevents injection at the relevant interpreter boundary and does not reveal sensitive query or system details in errors.
Runnable examples
Each example includes a broken server, a fixed server, an OpenAPI spec, and a clrsig scenario that detects the failure.