treat the model output as untrusted input.
The threat
the LLM response is reused downstream without validation: HTML/JS rendering (XSS), query building (SQLi), string handed to a shell or interpreter (code execution), tool or API input (tool command injection), constructed URL (SSRF). Since the output is attacker-influenceable (via injection, see F15/F16), it becomes the impact vector: the real damage happens at the downstream component.
Blind spotWhy classic frameworks miss it
classic grids validate the prompt input, never the output; they treat model answers as trusted data flowing to components. An unsanitized output turns an injection into real impact (XSS, SQLi, RCE, tool abuse) as soon as it reaches a critical component.
MitigationProposed approach
treat model output as untrusted input. Per-sink validation and sanitization: HTML/JS encoding, parameterized queries, typed schemas and allowlists for tool inputs, no direct execution of the answer, context isolation (CSP), logging of output to sink flows.
The proposed control
no model output reaches a critical component without passing a deterministic validator.
Expected evidence
a tampered output (via injection) produces no harmful action or sink; end to end test from adversarial input to output to component.