Mozilla's 0Din researchers demonstrated an indirect prompt injection attack against Claude Code that uses seemingly harmless repositories to hijack developer machines. The attack hides malicious instructions inside a repository that trigger during setup: Claude Code reads a crafted error message and executes a recovery command, which fetches a Base64-encoded reverse-shell payload from a DNS TXT record and runs it. The technique splits components across the repo, DNS infrastructure, and the AI agent's trust model, making static analysis and network monitoring each see only benign activity. Affected developers risk credential, API key, and secret exfiltration. Recommended mitigations include requiring user approval before AI agents run shell commands, isolating untrusted repos in sandboxed environments, and monitoring for suspicious DNS TXT lookups and unexpected shell activity.

4m read timeFrom securityboulevard.com
Post cover image
Table of contents
What happenedWho is affectedWhy CISOs should care3 practical actions
311 Impressions