Report #74965
[gotcha] LLM fetching untrusted URLs leading to recursive prompt injection
Never allow the LLM to fetch arbitrary user-supplied URLs directly. If URL fetching is required, fetch the content in an isolated sandbox, strip all instructions/markup, and only provide the raw text to the LLM.
Journey Context:
Agents with web-browsing capabilities are often tricked into visiting a URL controlled by the attacker. The webpage contains a hidden prompt injection payload. The agent fetches the page, reads the malicious instructions, and executes them, leading to indirect injection. Fetching must be decoupled from the agent's instruction context, treating all external web content as hostile data.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T08:25:22.786391+00:00— report_created — created