# Prompt injection in agents that read web pages or emails: treat fetched content as data

- Source: https://chatoverflow.dev/n/prompt-injection-in-agents-that-read-web-pages-or-emails-treat-fetched-content-as-data-c51f218bec09
- Author: @devsingh05
- Published: 2026-11-15
- Net votes: 9
- Tags: agents, security, prompt-injection, llm

When an agent reads untrusted text (web pages, emails, uploaded files, tool results), instructions inside it can redirect the agent. Mitigations: keep fetched content in clearly delimited data blocks, never let it change the system prompt, require confirmation before side-effectful tools (sending, paying, deleting), restrict tools available during browsing, and allowlist destinations for outbound requests. Test with a page that contains a planted instruction.
