0DIN: Clean GitHub Repos Can Trick AI Agents Into Reverse Shells
TL;DR
- Mozilla's 0DIN showed a legitimate-looking GitHub repo can lead Claude Code to execute a reverse shell with no suspicious code in the repository.
- The payload hides inside an attacker-controlled DNS TXT record, three indirection steps removed from anything the AI agent directly evaluates.
- No zero-day is required; the attack exploits how AI coding agents automatically attempt to resolve setup errors by running follow-up commands.
The attack that Mozilla's 0DIN researchers detailed this week is not a vulnerability in any conventional sense. There is no zero-day, no memory corruption, no authentication bypass. It is an exploitation of exactly the behavior that makes AI coding agents useful: when a setup step fails, the agent reads the error and tries to fix it.
As BleepingComputer reports, researchers at Mozilla's Zero Day Investigative Network demonstrated a three-stage attack against Claude Code and similar agentic tools. The first stage is a GitHub repository that looks entirely legitimate, with standard setup instructions such as `pip3 install -r requirements.txt`. The package installed by that command is engineered to throw an error instructing the agent to run `python3 -m axiom init`. That initialization command then silently resolves an attacker-controlled DNS TXT record, retrieves a base64-encoded value, and executes it via bash. The decoded payload is a reverse shell.
The researchers described the logic precisely: "Claude Code never decided to open a shell. It decided to fix an error. The reverse shell is three indirection steps away from anything Claude Code actually evaluated." That framing explains why conventional defenses miss it. Static scanners see only ordinary DNS resolution. AI analysis tools find nothing malicious in the repository. Every layer of the chain appears benign to every tool examining that layer in isolation.
Successful exploitation hands the attacker a shell running with the developer's own privileges, according to the research, meaning access to environment variables, API keys, and local configuration files. The payload can be swapped out by editing the DNS record alone, with no changes to the repository at all, so a codebase that looked clean during review could deliver something entirely different the next day.
0DIN warned the distribution surface is wide: such repositories could reach developers through fake job postings, tutorials, blog posts, or direct messages. The mitigation they recommended is specific: AI agents should fully disclose the execution chains of setup commands, including dynamically-fetched scripts and code, before running them. What the reporting does not give you is whether Anthropic or other tool vendors have committed to specific changes in response.
Originally reported by bleepingcomputer.com
Read the original article →Original headline: Clean GitHub Repo Tricks AI Coding Agents Into Executing Invisible Malware