22 GitHub Repos Caught Hijacking AI Coding Agents
Yes. Bitdefender Labs researcher Andrei Anton-Aanei found 22 malicious GitHub repositories containing poisoned instruction files — AGENTS.md, CLAUDE.md, .mcp.json, .vscode/tasks.json — and session-start hooks designed to make AI coding agents execute a hidden payload called setup.js. The malware scans a developer's machine for configurations belonging to 14 coding tools including Claude, Codex, Copilot and Cursor, steals credentials, and uses them to commit the same poisoned files into other repositories so the campaign spreads on its own. Bitdefender has not said how many developers actually ran the payload or which repositories were compromised as a result.
Bitdefender Labs researcher Andrei Anton-Aanei identified 22 malicious GitHub links containing files built to make AI-assisted development tools execute a concealed payload. The campaign, reported November 17, 2026, does not rely on a tampered binary or a compromised package. It relies on the plain-text files AI coding agents are designed to read automatically the moment a project is opened.
What the files actually do
Files like AGENTS.md and CLAUDE.md normally exist to orient an AI coding assistant — project conventions, build steps, what to avoid touching. Bitdefender found repositories where those same files were rewritten to persuade the connected agent to run a file named setup.js. The instructions aren't hidden in obfuscated code; they're sitting in the files the agent is supposed to trust by default.
A second technique found in the same campaign skips persuasion entirely. Bitdefender identified settings files such as .claude/settings.json that use session-start hooks, so the malicious configuration executes automatically when a session begins — no need to talk the AI into anything. One method manipulates the agent's judgment; the other bypasses judgment altogether.
Credential theft and self-propagation
Once the payload runs, the malware searches the developer's home directory for configurations tied to 14 coding tools, including Claude, Codex, Copilot and Cursor. It steals developer credentials, and if the compromised account has sufficient permissions, it uses those credentials to commit the same trigger files — AGENTS.md, CLAUDE.md, .mcp.json, .vscode/tasks.json — into other repositories the developer can write to. That's what makes this a campaign rather than a one-off trojan: each successful infection creates the conditions for the next one, spreading through legitimate-looking commits rather than a malicious download.
What this changes about trusting a repo
| Old assumption | What Bitdefender found |
|---|---|
| A README is informational, not executable | Instruction files are read and acted on by the agent automatically |
| Reviewing code before running it is enough | Session-start hooks can fire before a human reviews anything |
| Credential theft requires a malicious package | Credential theft comes from text files an agent was told to open |
| Risk is contained to the developer who clones | Theft + repo write access lets the campaign spread to other projects |
The practical shift: any laptop with Claude Code, Cursor, Copilot, Windsurf or a similar agent installed is a target the moment someone on staff clones an unfamiliar repository — not because the agent is flawed, but because reading project files and acting on them is the feature.
What's known and what isn't
Bitdefender has published the file hashes and repository names for all 22 samples, which is useful for incident responders checking their own environments. In Bitdefender's internal tests run on November 10, its AI Guardian product detected the malicious instruction file in all 22 samples. What Bitdefender has not published is how many developers actually ran the payload, or which downstream repositories were compromised as a result of credential reuse. Treat the scope as unknown rather than small.
What to check today
- Search any repositories your team has cloned recently for unexpected
AGENTS.md,CLAUDE.md,.mcp.json, or.vscode/tasks.jsonfiles, especially ones referencing asetup.jsor similarly named script you didn't add. - Check
.claude/settings.jsonand equivalent agent config files for hooks you didn't configure yourself. - Rotate credentials for any machine where an unfamiliar repository was cloned and an AI coding agent was pointed at it, even if nothing looked wrong at the time.
- Compare suspicious files against the hashes and repository names Bitdefender published before assuming a clean bill of health.
- Treat instruction files as untrusted input from any repository your organization didn't author, the same way you'd treat an email attachment from an unknown sender.
Where DriftLock fits
DriftLock, coming soon, is a desktop app for macOS and Windows that guards Claude Code, Cursor, GitHub Copilot CLI, VS Code, Windsurf, Claude Desktop and AI in Chrome, Edge and Brave on the machine itself, with a Console for setting policy across every laptop in the company. It's built to flag the pattern this campaign depends on: an agent reading instructions from a project file or session hook and being steered toward executing a command or script the user never asked for, and to give IT a record of what an agent read and ran, not just what an employee typed. It does not inspect every public repository in advance, patch the agents it watches, or guarantee that no instruction-file attack gets through — no tool can promise that. What it can do is put a check between "agent reads untrusted project files" and "agent executes a command," which is exactly the step this campaign is built to skip.
What to take away
- Bitdefender found 22 GitHub repositories using poisoned
AGENTS.md,CLAUDE.md, and session-start hook files to make AI coding agents run hidden payloads. - The attack targets 14 coding tools, steals developer credentials, and spreads by committing the same trigger files into other repositories the stolen credentials can reach.
- Bitdefender hasn't disclosed how many developers ran the payload or which repos were compromised downstream — assume the exposure could be wider than the 22 samples found.
- Instruction files and session hooks need the same scrutiny as any other untrusted input before an agent is allowed to act on them, not just the code a human reviews.
- Join the waitlist
Sources
- Bitdefender: How AI agents become new targets in GitHub malware campaign
- Cybersecurity News: Hackers Hijack AI Coding Agents
- GB Hackers: AI Coding Agent malware campaign
- Cryptika: Hackers Hijack AI Coding Agents Through Malicious GitHub Repositories To Steal Developer Credentials
- Que.com: Malware is now giving orders to AI coding assistants — Bitdefender finds 22 booby-trapped GitHub links