Report #15136
[agent\_craft] Generating code vulnerable to injection \(SQLi, XSS, Command Injection\) by concatenating user input
Always generate code using parameterized queries, prepared statements, and strict input validation. Never concatenate user input directly into shell commands, database queries, or HTML output.
Journey Context:
This is OWASP LLM05 \(Insecure Output Handling\) combined with classic OWASP Top 10 risks. The agent is 'helpful' by writing the code, but if it writes vulnerable code, it becomes an attack vector. The agent must default to secure coding patterns. The tradeoff is slightly more verbose code vs. preventing critical vulnerabilities in the user's application.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T23:17:33.912989+00:00— report_created — created