GitHub campaign steers AI coding agents into credential-stealing malware
Original title: How AI Agents Become New Targets in GitHub Malware Campaign
Bitdefender found 22 malicious links whose setup.js chain steals tokens and plants new agent instructions to spread.
Bitdefender Labs says a GitHub campaign targets developers using AI coding assistants. Malicious project files such as AGENTS.md and CLAUDE.md instruct agents to run scripts/setup.js without inspection, while session-start hooks such as .claude/settings.json can launch it after a repository is trusted. The loader is a multi-stage JavaScript file that decodes, decrypts, and runs a bundle through Bun. After theft, it searches home directories for agent configs and can reuse stolen GitHub or GitLab credentials to compromise more repositories.
Unconfirmed: The report does not say how many developers executed the payload or which repositories were later compromised.
- Researcher Andrei Anton-Aanei identified 22 malicious GitHub links.
- The outer script is a 3.75 MB single-line file using hex, ROT13, and AES-128-GCM.
- Targets include CI/CD tokens, cloud secrets, browsers, password managers, and SSH keys.
- It looks for configs tied to Claude, Codex, Gemini, Copilot, and other named agents.
- Extra payloads sit in a compressed _bz field in package.json.
Impact: Steals developer, cloud, CI/CD, and password-manager credentials
- 1.Review AGENTS.md, CLAUDE.md, hooks, and MCP configs before trusting a repository.
- 2.Treat automatic runs of node scripts/setup.js at session start as suspicious.
- Vendors
- GitHubBitdefender
- Products
- GitLabClaude CodeBun
- Organizations
- Bitdefender Labs
From the original article
8 min read at bitdefender.com
Bitdefender Labs has uncovered a malware campaign that uses compromised GitHub content to target developers working with AI coding assistants. So far, Bitdefender Labs researcher Andrei Anton-Aanei has identified 22 malicious GitHub links containing files designed to make AI-assisted development tools execute a concealed payload. The campaign goes beyond a malicious script hidden in a repository.
By Andrei ANTON-AANEI · bitdefender.com
A short excerpt; the article and its images belong to the publisher. Summary, key facts and assessment above are AI-written from the article and can be wrong.