{"slug":"agent-tool-exfiltration-channels","title":"Why can a tool designed to block exfiltration still leak your data?","question":"Why can a tool designed to block exfiltration still leak your data?","summary":"Blocking the obvious path, a model encoding secrets into a URL it fetches, is not enough. Claude's web_fetch blocked that, yet a researcher still leaked a user's name, city, and employer by chaining an allowed capability: following links inside fetched pages.","status":"active","cluster":"safety","cluster_label":"Safety and control","updated":"2026-10-06","latest_evidence_added":"2026-07-17","audience":"strong-software-engineer","math_depth":"","sections":[{"heading":"Builder consequence","html":"<p>If an agent tool reads untrusted content (a web page, an email, a shared file) and can take a further action based on it, you have a potential exfiltration channel even after blocking the obvious attack. Stopping the model from putting secrets into a URL is necessary but not sufficient. An attacker can walk the model through individually legitimate actions that add up to the same leak, one small piece at a time.</p>"},{"heading":"Short answer","html":"<p>Closing the most direct exfiltration path does not close the channel. Claude&#x27;s <code>web_fetch</code> already blocked the model from fetching a URL it built to encode private data. Ayush Paul found a second path: <code>web_fetch</code> could follow links found *inside a page it had already fetched*. A honeypot steered Claude through a chain of letter-indexed links and leaked a user&#x27;s <strong>name, home city, and employer</strong>. Anthropic&#x27;s fix removed link-following from fetched content.</p>"},{"heading":"Builder model","html":"<p>Ask two questions of every content-reading tool:</p>\n<ul><li><strong>Can the model build an outbound request that encodes a secret?</strong> This is the obvious attack. Most designs block it, for example by forbidding free-form URLs.</li><li><strong>Can content the tool reads steer it into a sequence of legitimate actions whose path reveals the secret?</strong> This survives the first fix. Each step (&quot;follow this link&quot;) looks normal; only the sequence, chosen by the untrusted page, encodes the leak.</li></ul>\n<p>The source calls the underlying pattern the <strong>lethal trifecta</strong>: private data, untrusted content that can carry instructions, and any exfiltration vector. Closing one vector leaves the trifecta intact if another exists.</p>"},{"heading":"Mechanism","html":"<p><strong>The sequence is the signal.</strong> If untrusted content chooses which link the agent follows next, and that choice depends on a secret the agent knows, the server&#x27;s access log spells out the secret. No single request carries data. In Paul&#x27;s attack, a page posing as a Cloudflare bot check told Claude to &quot;navigate letter by letter&quot; to find the user&#x27;s profile. Repeated fetches over predictable paths recovered three secrets character by character.</p>\n<p><strong>Allowed capabilities can be indistinguishable from attacks.</strong> <code>web_fetch</code> restricted fetches to user-entered URLs or <code>web_search</code> results, which blocked direct URL construction. Following a link inside a fetched page reads as ordinary browsing. The tool cannot tell &quot;the page authored this link to run an exfiltration protocol&quot; from &quot;this is the natural next step&quot;. Anthropic removed the capability rather than trying to classify links.</p>\n<p><strong>Selective targeting evades generic scanning.</strong> The honeypot activated only for <code>Claude-User</code> user-agents. Scanners and human visitors saw nothing unusual, so blanket content filtering would not have caught it.</p>"},{"heading":"How to apply","html":"<ul><li><strong>List every degree of freedom</strong> your untrusted-content tools have, not just the headline capability. The exploited one here looked incidental.</li><li><strong>Treat links, filenames, and record IDs found in untrusted content as instructions,</strong> not data.</li><li><strong>Restrict navigation to the user&#x27;s requested URL or an explicit allowlist,</strong> and require separate authorization for any further hop.</li><li><strong>Watch logs for selective targeting</strong> by user-agent, referrer, or request-pattern anomalies.</li><li><strong>Re-audit whenever you add a follow-up action</strong> (follow a link, open an attachment, query a related record) to a content-reading tool.</li></ul>"},{"heading":"Failure modes","html":"<ul><li>Blocking direct URL construction and declaring the tool safe while a secondary capability reopens the channel.</li><li>Treating &quot;the model is just browsing&quot; as benign when the browsing sequence is the exfiltration mechanism.</li><li>Testing only against generic scanners or single-shot attempts, missing a targeted, many-step attack.</li><li>Assuming a vendor&#x27;s fix for one channel covers every channel in the same tool.</li></ul>"},{"heading":"Related","html":"<p>See <a href=\"/topic/prompt-injection\">prompt injection</a> for the threat model this attack sits inside, and <a href=\"/topic/tool-use\">tool use</a> for how ad-hoc tool integrations create unreviewed degrees of freedom.</p>"}],"evidence":[{"id":"paul-willison-2026-claude-web-fetch-exfiltration","kind":"production-field-report","tier":"production field-report-backed","title":"How I tricked Claude into leaking your deepest, darkest secrets","note":"Ayush Paul's attack on Claude's web_fetch, which already limited fetches to user-entered URLs or web_search results. web_fetch could still follow links inside fetched pages. A honeypot posing as a Cloudflare check had Claude walk alphabetically ordered nested links, leaking name, home city, and employer one hop at a time, and targeted only Claude-User user-agents. Anthropic removed link-following from fetched content and paid no bounty, saying it had found the issue internally.","added":"2026-07-17","url":"https://simonwillison.net/2026/Jul/15/claude-web-fetch-exfiltration/#atom-everything","sid":"5201cdda51e234b5"},{"id":"agent-tool-exfiltration-channels-editorial-synthesis","kind":"editorial-inference","tier":"editorial inference","title":"LLM Digest synthesis","note":"This is the 'lethal trifecta' the source names: private data access, exposure to untrusted content, and any exfiltration vector together are exploitable whichever single vector you close first. Any tool that reads untrusted content and can act on what it read is a potential exfiltration channel, even after the obvious exploit is blocked; the channel just moves slower through a legitimate-looking capability such as link-following.","added":"2026-07-17"}],"related_topics":[{"slug":"prompt-injection","title":"Untrusted input and tools can hijack an agent"},{"slug":"tool-use","title":"Agents reach the outside world through fragile, ad-hoc integrations"}],"related_playbook_cards":["pb-restrict-web-fetch-link-following"],"related_storylines":[]}