Bitdefender finds GitHub malware that tells AI coding agents to run a credential stealer

Nov 23, 2026
Planted AGENTS.md and CLAUDE.md files and session hooks make assistants run a hidden payload that steals tokens and spreads to other repositories.

Bitdefender Labs has found a malware campaign that uses GitHub content to target developers working with AI coding assistants, the company said on 17 November. Researcher Andrei Anton-Aanei has identified 22 malicious GitHub links so far.

The attack plants instruction files such as AGENTS.md and CLAUDE.md that tell the assistant to run a file named setup.js without reading it, calling it a "sealed binary artifact". A second route uses session-start hooks in configuration files such as .claude/settings.json, which can run a command once a developer trusts the repository, with no prompt needed.

The payload steals SSH keys, API keys, cloud secrets, CI/CD tokens, package-registry credentials, browser data and password-manager data. It then spreads: it searches the victim's machine for configuration files of 14 AI agents and injects malicious instructions, hooks or MCP server settings, and uses stolen GitHub or GitLab tokens to commit similar files to up to 25 repositories by default. It can also try to republish infected packages through npm, PyPI, RubyGems and JFrog.

Bitdefender advises reviewing .claude/, .cursor/ and .gemini/ directories and any instruction that says not to inspect a file before running it.

We hope you enjoyed this article

Consider subscribing to one of our newsletters like Cybersecurity AI Weekly or Daily AI Brief.

Also, consider following us on social media:

Free newsletter

Cybersecurity AI Weekly

Weekly newsletter about AI in Cybersecurity.

Market report

2025 Generative AI in Professional Services Report

Thomson Reuters

This report by Thomson Reuters explores the integration and impact of generative AI technologies, such as ChatGPT and Microsoft Copilot, within the professional services sector. It highlights the growing adoption of GenAI tools across industries like legal, tax, accounting, and government, and discusses the challenges and opportunities these technologies present. The report also examines professionals' perceptions of GenAI and the need for strategic integration to maximize its value.

Read more
Free, six days a week

Daily AI Brief: the AI news that matters, in your inbox.