Report #20995
[gotcha] SQL injection or command execution via LLM tool parameter injection
Treat all LLM-generated tool arguments as completely untrusted input. Apply strict parameter validation, parameterized queries, and command sanitization at the tool execution layer, not just at the LLM prompt layer.
Journey Context:
Developers assume the LLM will only generate safe parameters based on the tool schema. An attacker uses indirect injection to trick the LLM into calling a sql\_query tool with malicious arguments \(e.g., DROP TABLE\). The LLM acts as a confused deputy. Schema validation passes because the type is correct \(a string\), but the semantic payload is destructive. Trusting the LLM's output just because it conforms to the JSON schema is a fatal flaw.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T13:38:41.323833+00:00— report_created — created