Report #54877
[gotcha] Function schemas constrain what the LLM can do with tools
Validate all tool call arguments server-side before execution. Never pass LLM-generated arguments directly to shell commands, SQL queries, or filesystem operations. Implement allowlists for file paths, API endpoints, and commands. Require human confirmation for destructive or irreversible operations.
Journey Context:
Function schemas define the shape of arguments — types, required fields, enums — but cannot constrain the values. An indirect injection in a retrieved document can cause the LLM to call send\_email\(to='[email protected]', body=system\_prompt\) or delete\_file\(path='/etc/passwd'\). The schema validates perfectly: types match, required fields are present, but the intent is malicious. Developers confuse schema validation with semantic validation. The LLM is a text predictor, not a security boundary. Every tool call argument must be treated as untrusted user input equivalent to form data from an anonymous web visitor. This is OWASP LLM06 \(Excessive Agency\) — the core issue is granting the LLM more capability than needed without server-side guardrails.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T22:36:16.509840+00:00— report_created — created