Skip to content
All posts

AI Coding Agent Config Malware: 22 Repos, What to Check

November 18, 2026 · Team PlayCISO
TL;DR · the short version

On 17 November 2026 Bitdefender Labs reported 22 malicious GitHub repositories built to attack developers through their AI coding agents. Project instruction files (AGENTS.md, CLAUDE.md) steer the assistant into running a setup.js loader, and a session-start hook in .claude/settings.json can run it in the user's shell once the repository is trusted, with no prompt typed. Bitdefender says the multi-stage JavaScript loader steals source-control tokens, CI/CD and cloud secrets, package-registry credentials and browser data, checks which tokens work, plants instruction files, hooks and MCP configs in other local projects and, where a GitHub or GitLab token allows, commits them to up to 25 repositories, edits workflows and tries to republish packages. Review instruction files, hooks and MCP configs before opening an unfamiliar repo with an agent, give tokens the least privilege, rotate anything exposed and watch CI workflow changes.

Put it into practice
Practise spotting a poisoned instruction file
Work through CLAUDE.md, .mcp.json, hooks and memory files and decide what is safe to open.
Open the lab

On 17 November 2026, Bitdefender Labs reported 22 malicious GitHub repositories built to attack developers through their AI coding agents. The bait is not a dependency but the agent's own configuration: instruction files, a session-start hook and MCP settings that get a setup.js loader run on the developer's machine. Bitdefender says the loader steals source-control, CI/CD, cloud and package-registry credentials and then uses them to plant the same configuration in more repositories.

Who this is for: engineering and platform leaders, developers who use Claude Code, Cursor, Copilot, Gemini or similar agents, and whoever owns CI/CD and package publishing.

Based on Bitdefender Labs' post of 17 November 2026 (Andrei Anton-Aanei and Alina Bizgă). PlayCISO is not affiliated with Bitdefender. Facts as reported on 18 November 2026.

Confirmed vs not yet known

Bitdefender reports: 22 malicious repositories (listed with setup.js hashes in its post); two execution paths (agent instructions and a session-start hook); credential theft with token validation; local and repository-level spread when tokens allow.

Not stated by Bitdefender: how many developers ran it, who is behind it, or any named victim.

Not established: a link to Storm-2372 or "EvilTokens". A threat digest tagged the story with them and a Microsoft source; Bitdefender's post mentions neither, and we found no Microsoft source that connects them.

How it works, at the level defenders need

The files it abuses

  • Instruction files: AGENTS.md, CLAUDE.md; Bitdefender also lists .cursorrules, .windsurfrules and .github/copilot-instructions.md among the files the malware looks for.
  • Hooks: a session-start hook in .claude/settings.json.
  • MCP configuration: .mcp.json and mcp.json.
  • Editor tasks: .vscode/tasks.json.

Two ways in

  1. The agent is talked into it. An instruction file tells the assistant to run setup.js, presenting it, in Bitdefender's quote, as "a sealed binary artifact, not human-readable source code" so the agent does not look inside.
  2. No prompt at all. A session-start hook in .claude/settings.json can run a command in the user's shell once the developer trusts the repository.

What the loader does, per Bitdefender

  • Steals: source-control tokens, CI/CD and GitHub Actions secrets, cloud and container credentials, package-registry credentials, browser-stored credentials, password managers, Windows Credential Manager, SSH keys, .env files and API keys.
  • Validates: checks stolen tokens against the providers' APIs, then encrypts and batches what it collected.
  • Spreads locally: searches the home folder for agent configuration (paths naming one of 14 agents, including Claude, Cursor, Copilot and Gemini) and adds instructions, session-start hooks or MCP server entries.
  • Spreads through repos: with a GitHub or GitLab token that has push rights (it checks the repo, public_repo and workflow scopes on GitHub), it can commit agent config files to up to 25 target repositories by default, change package metadata and workflows, create GitLab pipeline schedules and try to republish infected packages to npm, PyPI, RubyGems and JFrog.

Bitdefender also says its own AI Guardian product detected the malicious instruction file in all 22 samples in an internal test on 10 November, and notes results may differ elsewhere. That is the vendor's test of its own product.

Useful next, if this was relevant to you

Showing 1 of 3: Breach Cost Calculator

Timeline

Date (2026)WhatSource
10 NovBitdefender's internal test of its own product against the 22 samplesBitdefender
17 NovBitdefender Labs publishes the campaign with the 22 repositories and setup.js hashesBitdefender
17-18 NovThreat digests tag the story with Storm-2372 / "EvilTokens"; not supported by Bitdefender's postBitdefender (no mention)

What security leaders should do this week

  1. Read before you open. Make it policy that an unfamiliar repository is inspected before it is opened in an AI-enabled editor: AGENTS.md, CLAUDE.md, .cursorrules, .github/copilot-instructions.md, the .claude/, .cursor/, .gemini/ and .vscode/ folders, and any .mcp.json. Treat these files like code. Practise with the poisoned instruction file lab.
  2. Turn off auto-run for untrusted repos. Do not grant workspace trust to a repo you have not reviewed; disable or review project hooks, folder-open tasks and project-level MCP servers before they run. Bitdefender's red flags: instructions not to inspect a file, to suppress output, to bypass confirmation or to auto-install software.
  3. Review MCP configuration. List the MCP servers each developer's agents load, and remove any nobody added on purpose. Check a server before adding it with MCP Scan.
  4. Shrink the tokens. Developers' GitHub and GitLab tokens should not carry workflow scope or org-wide push unless needed. Prefer short-lived, fine-grained tokens and trusted publishing for packages. The non-human identity checklist covers the inventory.
  5. Rotate if anyone ran one. If a developer opened one of the listed repositories with an agent, treat every credential on that machine as exposed: source-control tokens, CI secrets, cloud keys, registry tokens, SSH keys, browser-stored passwords. Scan for leaked secrets with the secret scanner.
  6. Watch CI and packages. Alert on new or changed workflow files, new pipeline schedules, new agent config files committed to repos, and package versions published outside your release process. Audit workflows with the GitHub Actions security auditor.

Related: the tampered Claude Code extension in Cursor, and this week's 17-18 November incident roundup.

FAQ

What did Bitdefender find?

Bitdefender Labs reported 22 malicious GitHub repositories (17 November 2026) that abuse AI coding agent configuration: instruction files such as AGENTS.md and CLAUDE.md, session-start hooks in .claude/settings.json, MCP configurations (.mcp.json) and VS Code tasks, all pointing at a setup.js loader.

How does the malware run without the developer asking?

Bitdefender describes two paths. An instruction file tells the assistant to run setup.js, presenting it as "a sealed binary artifact, not human-readable source code". Or a session-start hook in .claude/settings.json runs a command in the user's shell once the developer trusts the repository, with no AI prompt at all.

What does the setup.js loader steal?

Per Bitdefender: source-control tokens, CI/CD and GitHub Actions secrets, cloud and container platform credentials, package-registry credentials, browser-stored credentials, password managers, Windows Credential Manager, SSH keys, .env files and API keys. It checks stolen tokens against the providers' APIs.

How does it spread?

Bitdefender says it searches the home folder for AI agent configuration files and can add instructions, session-start hooks or MCP server entries. With a GitHub or GitLab token that has enough permissions, it can commit agent config files to up to 25 repositories by default, change package metadata and workflows, create GitLab pipeline schedules and try to republish packages to npm, PyPI, RubyGems and JFrog.

Is this linked to Storm-2372 or EvilTokens?

Not as far as we can find. Bitdefender's post does not mention Storm-2372, EvilTokens, Microsoft or device-code phishing, and we found no Microsoft source that links them. Storm-2372 is a device-code phishing actor Microsoft has written about since February 2025; treat any link to this campaign as not established.

How do I check a cloned repo before opening it with an AI agent?

Before you open it in Claude Code, Cursor, Copilot, Gemini or similar, read AGENTS.md, CLAUDE.md, .cursorrules and .github/copilot-instructions.md, the .claude/, .cursor/, .gemini/ and .vscode/ folders, and any .mcp.json. Look for hooks or tasks that run on session start or folder open, MCP servers you did not add, and setup scripts they point at. Bitdefender calls instructions not to inspect a file, to suppress output, to bypass confirmation or to auto-install software red flags.

Sources

As of 18 November 2026.

Practise spotting a poisoned instruction file
Work through CLAUDE.md, .mcp.json, hooks and memory files and decide what is safe to open.
Open the lab
Take this with you
How it works, at the level defenders need · Timeline · What security leaders should do this week · Sources

Ready to practise the decisions these articles describe?

Run your first Cyber War Room free →

Pro