Clean GitHub Repo Attack Coaxes AI Coding Agents Into Running Reverse Shells
Attack Tradecraft · 7 sources · Updated 5mo ago · First seen Jun 27, 2026

Mozilla’s 0DIN researchers demonstrated a supply-chain-style proof of concept in which an AI coding agent such as Claude Code can be manipulated into compromising a developer’s machine while cloning and initializing a seemingly benign GitHub repository. The repository itself can appear clean, with a legitimate-looking README and no obviously malicious code, but a staged setup flow causes a package to fail until initialization and prompts the agent to run follow-up commands it interprets as routine recovery steps.
In the demonstrated chain, an initialization script fetched attacker-controlled data from a DNS TXT record and executed it, with the TXT record carrying a base64-encoded reverse-shell payload that could give the attacker interactive access under the developer’s privileges. Researchers warned that such access could expose environment variables, API keys, local configuration files, source code, documents, browser sessions, passwords, and enable persistence, while remaining difficult for scanners, human reviewers, and AI agents to detect because each step appears normal in isolation. They said threat actors could distribute these repositories through fake job offers, tutorials, blog posts, or direct messages, and urged agentic tools to reveal the full execution chain, including dynamically fetched scripts and runtime code.
Why it matters
Impact assessment
This story describes a high-risk proof of concept affecting developers and engineering teams that use AI coding agents to clone, initialize, or troubleshoot untrusted repositories. The immediate impact is developer workstation compromise under the user’s own privileges, with likely exposure of source code, cloud credentials, API keys, tokens, browser sessions, and local configuration data.
The exposure is potentially broad because the technique relies on normal repository setup flows and could be reused across multiple agentic coding tools, not just Claude Code. There is no confirmed exploitation of this exact repository chain in the wild in the provided reporting, but the story cites prior real-world indirect prompt injection activity observed by Unit 42 in March 2026, indicating the underlying tradecraft is already operationally relevant.
Affected populations
- Developers using AI coding agents such as Claude Code
- Potentially users of other agentic coding tools including Cursor and Gemini CLI
- Organizations with developer endpoints holding cloud credentials, Git tokens, CI/CD secrets, SSH keys, and source code
- Software, SaaS, cloud-native, and technology-heavy environments with autonomous or semi-autonomous coding workflows
Severity and business impact
- Developer endpoint compromise can lead to credential theft, source code exposure, and downstream cloud or SaaS account abuse
- Attacker access under developer privileges can enable persistence through SSH keys, cron jobs, or backdoors
- Secondary impacts include software supply chain risk, unauthorized repository access, cloud resource abuse, and reputational damage if internal code or secrets are exposed
- The technique is stealthy because the repository can appear benign and the payload is fetched at runtime from DNS rather than stored in the repo
Scope and exploitation status
- Scope is broader than a single product because the weakness is tied to agentic trust in untrusted repository content and setup flows
- Distribution vectors include job postings, tutorials, blog posts, Slack/direct messages, and other developer outreach channels
- The demonstrated chain is proof of concept, not a confirmed active campaign
- Related indirect prompt injection activity has reportedly been observed in the wild by Unit 42


