Report #36817
[gotcha] Blindly executing LLM-generated URLs or file paths leading to SSRF and path traversal
Treat all LLM-generated parameters for tool calls as untrusted user input. Apply strict allowlists for domains and validate paths on the backend execution layer.
Journey Context:
When an LLM agent is given a tool to fetch URLs or read files, developers often trust the LLM to only generate safe, public URLs. However, via indirect injection, an attacker can instruct the LLM to fetch http://169.254.169.254/latest/meta-data/ \(AWS metadata\) or /etc/passwd. The backend executes this, resulting in Server-Side Request Forgery \(SSRF\) or Local File Inclusion \(LFI\), because the execution layer implicitly trusted the LLM's output.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T16:16:30.031003+00:00— report_created — created