---
title: Bitdefender: 22 malicious GitHub links use AGENTS.md, CLAUDE.md and session-start hooks to make coding agents run a stealer that then rewrites other agents' configs | ctxsec
url: https://ctxsec.com/items/bitdefender-22-github-repos-agents-md-claude-md-session-start-hooks-setup-js-stealer-spreads-via-agent-configs
description: "Bitdefender Labs researcher Andrei Anton-Aanei found 22 malicious GitHub links aimed at developers who use AI coding assistants. Instruction files tell the assistant that scripts/setup.js is a 'sealed binary artifact' it must not read, and to run it at session start without showing output or asking. A second path needs no AI decision at all: a session-start hook in .claude/settings.json runs the script once the developer trusts the repository. The payload steals source-control, CI/CD, cloud, package-registry, browser and password-manager credentials, checks which accounts work, then searches the home directory for configs belonging to 14 agents (including Claude, Codex, Gemini, Copilot, Cursor and Cline) and injects malicious instructions, hooks or MCP server entries. With stolen GitHub or GitLab tokens it can modify other repositories and packages to spread."
status: "research (Bitdefender Labs, Nov 17, 2026)"
published: 2026-11-17
---

> Bitdefender Labs researcher Andrei Anton-Aanei found 22 malicious GitHub links aimed at developers who use AI coding assistants. Instruction files tell the assistant that scripts/setup.js is a 'sealed binary artifact' it must not read, and to run it at session start without showing output or asking. A second path needs no AI decision at all: a session-start hook in .claude/settings.json runs the script once the developer trusts the repository. The payload steals source-control, CI/CD, cloud, package-registry, browser and password-manager credentials, checks which accounts work, then searches the home directory for configs belonging to 14 agents (including Claude, Codex, Gemini, Copilot, Cursor and Cline) and injects malicious instructions, hooks or MCP server entries. With stolen GitHub or GitLab tokens it can modify other repositories and packages to spread.

[← Context & Harness Attacks](/context) · [markdown](/items/bitdefender-22-github-repos-agents-md-claude-md-session-start-hooks-setup-js-stealer-spreads-via-agent-configs.md)

research (Bitdefender Labs, Nov 17, 2026)

2026-11-17 · published here

2026-11-19 11:45 PM ET

### Bitdefender: 22 malicious GitHub links use AGENTS.md, CLAUDE.md and session-start hooks to make coding agents run a stealer that then rewrites other agents' configs

- **Before opening an unfamiliar repo with an agent:** read AGENTS.md, CLAUDE.md, .claude/, .cursor/, .gemini/, .mcp.json and .vscode/tasks.json, and any script they reference.
- **Red flags:** instructions that forbid inspecting a file, suppress output or skip confirmation.
- **If a setup script ran:** rotate GitHub/GitLab, cloud, CI and registry credentials, and diff your own agent config files and MCP entries for changes you didn't make.

Sources: [Bitdefender Labs: How AI agents become new targets in GitHub malware campaign (Nov 17, 2026)](https://www.bitdefender.com/en-us/blog/labs/how-ai-agents-become-new-targets-in-github-malware-campaign)
