Model output is attacker-influenced input to whatever consumes it next, whether a browser, a shell, a database, or a terminal. When applications pass it along without encoding or validation, prompt injection turns into classic bugs like cross-site scripting, SQL injection, and remote code execution.
Read in this order
- OfficialLLM05:2025 Improper Output HandlingStart here: the standard definition, examples, and prevention steps.
- ArticleWhen prompts become shells: RCE vulnerabilities in AI agent frameworks (Microsoft Security)How model output reaches file writes and code execution inside agent frameworks, May 2026.
- CoursePortSwigger Web Security Academy: Web LLM attacks (with labs)Free labs where you exploit output handling and excessive agency yourself.