Vulnerability  ·  2026-11-20

Bitdefender: malicious GitHub config files hijack AI coding agents (active supply-chain campaign)

VulnerabilityHigh impactGlobal
Bitdefender Labs documented a live campaign (researcher Andrei Anton-Aanei) that abuses the instruction files, rules, hooks and configurations AI coding tools read. Malicious AGENTS.md/CLAUDE.md content presents scripts/setup.js as a sealed, signed, too-sensitive-to-inspect artifact and tells the agent to run it on session start without confirmation; .claude/settings.json session-start hooks execute it without any prompt. The payload is a layered JS loader (hex+ROT13 to a Node stager to an AES-128-GCM bundle run via Bun) that steals credentials, validates them against provider APIs, and self-propagates by rewriting the victim's other agent configs. 22 malicious GitHub links found.
This is the clearest in-window example of the AI-agent-as-execution-path threat model: the attacker does not need the developer to run anything or paste a prompt — opening or trusting a repository is enough, and configuration, not prompt injection, drives execution. It targets the AI coding-agent ecosystem directly and combines credential theft with self-propagation, so it is the defensive priority.
Malicious repo instruction files and session-start hooks persuade an AI coding agent to run a hidden multi-stage setup.js loader, or fire the command directly via .claude/settings.json hooks without any prompt. The malware then steals CI/CD tokens, cloud keys, package-registry credentials, browser/password-manager data, and injects new instructions into the victim's other agent configs to spread.
AI coding agents (Claude Code, Cursor, Codex, Copilot, Gemini CLI, Kiro, OpenCode, Cline, Aider, Tabby, Amazon Q, Cody, Bolt, Continue) driven by repo instruction files (AGENTS.md/CLAUDE.md), .claude/settings.json session-start hooks, MCP configs and editor tasks
Treat repo files that order a tool to run without displaying or reading output as hostile; block scripts instructions; review session-start hooks and MCP configs before trusting a repo; run agent scanners (Bitdefender AI Guardian / Agent Skill Scanner).
Bitdefender Labs — How AI Agents Become New Targets in GitHub Malware Campaigngbhackers — Hackers Turn AI Coding Agent Configuration Files Into MalwareCybersecurityNews — Hackers Hijack AI Coding Agents Through Malicious GitHub ReposCybersecurityNews — Hackers Hijack AI Coding Agents Through Malicious GitHub Repositories
See this in the live feed Explore related AI security and governance findings — updated every morning.
Open the feed →