I tricked Claude into leaking your deepest, darkest secrets
TL;DR Highlight
Abusing web_fetch link-following made Claude leak memory data like name, employer and hometown.
Who Should Read
Backend developers shipping LLM agents that combine web tools with user memory or personal data
Core Mechanics
- web_fetch only sends GET, so the URL is the leak channel
- web_fetch is designed as read-only and makes only GET requests.
- So the attacker targeted the URL path as a place to carry data.
- Direct fetches of arbitrary URLs were blocked
- The author asked Claude to open evil.com/[name] and the request failed.
- web_fetch only opened URLs from the user message, web_search results, or links in a prior web_fetch result.
- A link ladder leaked data letter by letter
- The author abused the third rule, links in a previous fetch result.
- Pages offered /a to /z and went deeper like /ay, /ayu, so the server log showed the name one letter at a time.
- A fake Cloudflare story got Claude to comply
- Simple prompt injection (hidden malicious instructions) was finicky and did not work well.
- A coffee shop site with a fake Cloudflare turnstile asking the agent to spell the user's name worked.
Community Reactions
- An opinion that the answer is turning memory off
- One commenter turned memory off at launch, saying it pollutes context and is not useful.
- Another suggested using a separate account for personal discussions.
- An experience of caging agents in a VM
- A commenter runs Claude Code in a VM with only open-source repos cloned and no other credentials.
- After this post they plan to reset the VM weekly instead of monthly.
- An opinion that LLM gateways and policy enforcers are needed
- A commenter said clients should never reach the LLM directly, only via a gateway with a Policy Enforcer.
- They reported that this substantially reduced data leaks and errors.
- A point that the patch cut a lot of functionality
- A commenter noted the fix means web_fetch can no longer page through results on a target site.
- Another argued that filling query parameters with user data can be a useful feature, so a trusted domain allowlist is a better model.
How to Apply
- Audit where your agent's fetch URLs come from
- Today, check in code which URLs your fetch or browse tool can open.
- If it auto-follows links found in page content, restrict it to URLs from user input or search results.
- Separate memory and personal data from web tools
- If you inject user profiles or conversation summaries into prompts, remove them from calls where web browsing is enabled.
- If needed, split web access and personal data access into separate agents.
- Detect letter-by-letter paths in outbound logs
- Monitor whether the agent makes consecutive requests to one domain with growing paths like /a, /ab, /abc.
- On such a pattern, cut the request and ask the user to confirm.
- Tell the model in the system prompt not to trust auth demands on pages
- Add a rule to stop if an external page asks for the user's name or personal info.
- Allow putting user info into URLs only after user confirmation.
Try It
# Paste into a new Claude or ChatGPT chat (simplified version of the article's idea: review defense rules without web tools)
You are an LLM agent security reviewer. Review the agent design below and check whether it is vulnerable to an attack where web_fetch follows links on an external page and leaks user personal data letter by letter in URL paths.
[Agent design]
{{system prompt, tool list, how memory is injected}}
[Checklist]
1. Can it automatically follow links obtained from external pages?
2. Are memory or personal data in the same context as web tools?
3. Is there a rule separating instructions in external pages from user instructions?
4. Is there a user confirmation step before putting user info in URL paths or queries?
For each item, write vulnerable or OK, the reason, and a fix in one line.
Next steps: have it draft a fixed system prompt, then paste page text containing a fake 'Cloudflare bot check' and test whether it complies.Terminology
Related Papers
Same Simulation, Different Evidence: Where Retrieved Tool Output Costs LLM Agents Accuracy
Saving long tool output to files cut GPT-5.1 accuracy by 11.3 points; naming the authoritative file restored it.
Fake News, Real Crashes: Information Injection Attacks on LLM Financial Trading Agents
Fake headlines hijacked LLM trading agents 62% of the time versus 14% for prompt injection.
Harness Engineering 101: The LLM is the brain, the harness is the body
An agent is a loop managing a JSON array; 16 chapters build one from scratch
Harness2 by Google Research – Recursive Agent Harnessing
Recursively refining the harness with fixed model weights raised benchmark scores by up to 11.8 points.
Ousted Savannah police officer gave ICE agent husband access to Flock system
A police officer shared her Flock login with her ICE-agent husband; an audit found 983 searches and she was fired
Tmux and Claude Code: Sessions, Send-Keys, and the Ceiling
Running Claude Code agents in tmux works well, but limits appear around four agents.