Code Execution Through Email: How I Used Claude to Hack Itself

https://news.ycombinator.com/rss Hits: 10
Summary

By Golan Yosef, Chief Security Scientist and Co-Founder, Pynt (July 15), First published on SecurityBoulevard.com You don’t always need a vulnerable app to pull off a successful exploit.Sometimes all it takes is a well-crafted email, an LLM agent, and a few “innocent” plugins.This is the story of how I used a Gmail message to trigger code execution through Claude Desktop, and how Claude itself (!) helped me plan the attack.The setup: No vulnerabilities, just compositionThe combined capability and trust across MCP hosts, agents, and data sources can quietly introduce attack surfaces no one sees coming. Each individual MCP component can be secure, but none are vulnerable in isolation. The ecosystem is.So, I decided to test that theory with a real-world example:Gmail MCP server as a source of untrusted contentShell MCP server as the target Claude desktop as MCP HostWatch the attack: VIDEOAttempt 1: Claude fights backThe story begins with me crafting such mail and instructing the MCP host (Claude desktop, Anthropic’s local LLM host application) to read it, the email was read but the attack didn’t work, instead, Claude warned me that this message is likely a "phishing” attempt. I then asked Claude what were the indications for triggering the warning and wondered if it can fall for such an attack.Claude assured me that such attacks are “unlikely to succeed” because it was designed and trained to detect such issues.Figure 1: “unlikely to succeed”‍I insisted and asked it to explore scenarios where the attack might succeed and it happily described such cases. Figure 2: Claude identifies possible attack tacticsMy next request was to try and test itself against these scenarios. Attempt 2: “The New Me”Here’s where it gets interesting. I “reminded” Claude that its context resets in new sessions. Each new conversation is a clean slate, “the new me,” as Claude itself called it.Figure 3: Claude suggests “The New Me”‍So I accepted Claude’s suggestion: Claude will write the email, wh...

First seen: 2025-07-17 07:14

Last seen: 2025-07-17 16:16