Report #77600
[gotcha] Directly executing LLM output \(SQL, bash, Python\) without validation
Treat LLM outputs as untrusted user input. Apply standard injection defenses \(parameterized queries, sandboxing, AST validation\) to any code or query generated by the LLM before execution.
Journey Context:
The focus is often on what goes \*into\* the LLM, but what comes \*out\* is equally dangerous. If an LLM generates a SQL query and it's executed directly, an indirect prompt injection in a retrieved document can cause the LLM to generate a DROP TABLE statement. The LLM did its job \(generated a query based on context\), but the execution environment failed to validate it.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T12:51:10.404240+00:00— report_created — created