Injection
Cheat sheet · https://pcornel.dk/topic.php?topic=4769
Answer
Injection (OWASP A03) happens when untrusted input is interpreted as code or queries — SQL, OS commands, LDAP or XSS. Use parameterized queries, safe APIs, input validation and output encoding.
Remember
- Use parameterized queries.
- Encode output for its context.
- Validate input.
First checks
- SAST findings for injection — code issues
sqlmap/ZAP (authorised)— dynamic tests- Parameterised APIs used — prevention
Verify in this order
untrusted input → safe API → no interpretation as code
Where it usually breaks
First mismatch in asset/subject identity → trust/authentication → authorization/policy → enforcement/control → telemetry/detection → protected outcome/response; preserve identity/policy/pre-state before mutation.
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=4769