Threat feed

AI agent config stealer GitHub campaign

Poisoned GitHub repositories turn AI coding agent instruction files into a credential stealer

Posted · Spectrum Delta Research Team

Summary

Bitdefender Labs (B/2) reported an unattributed malware campaign that plants instructions in 22 GitHub repositories so AI coding assistants such as Claude Code and Cursor run a hidden JavaScript loader with the developer's own permissions, stealing source-control tokens, CI/CD and cloud secrets, SSH keys and browser-stored credentials. The 17 November 2026 report describes AGENTS.md and CLAUDE.md files that present scripts/setup.js as a sealed, signed artifact the assistant must not inspect and must run silently at session start, plus session-start hooks in .claude/settings.json that execute the loader with no prompt at all. The 3.75 megabyte loader hex-decodes, applies ROT13 and evaluates a stager holding two AES-128-GCM blobs, pipes a 4.67 megabyte bundle into the Bun runtime over standard input, validates stolen GitHub and GitLab token scopes, and commits the same poisoned files to up to 25 repositories per account. It also injects instructions, hooks and MCP entries into local configurations of 14 agent tools and tries to republish infected packages through npm, PyPI, RubyGems and JFrog, making each victim a new distribution point.

Breakdown

Targets

  • Industry: Opportunistic

Technical exposure

  • Developers opening untrusted repositories in AI coding assistants
  • AI agents that execute project instruction files without review
  • Session-start hooks enabled in agent configuration files
  • GitHub or GitLab tokens with repo, public_repo or workflow scopes

Adversary

Unattributed · Bitdefender Labs (B/2)

Procedures (5)

  1. Poisoned AGENTS.md instructions order the agent to run setup.js silently

    Logs

    • EDR process events · node or bun process executing scripts/setup.js from a cloned repository with an AI assistant or editor as the parent process; the 3.75 megabyte single-line file hex-decodes an embedded value, applies ROT13 and evaluates the result

    Detectors

    • Bitdefender AI Guardian · Blocks the agent session when CLAUDE.md or AGENTS.md presents a script as a sealed artifact that must not be inspected and orders it run silently; detected all 22 samples in internal tests
  2. Session-start hook in agent config runs the loader with no prompt

    • T1546Event Triggered Execution

    Logs

    • EDR file and process events · New or modified .claude/settings.json, .cursorrules, .mcp.json or .vscode/tasks.json in a freshly cloned repository containing a session-start hook that launches scripts/setup.js in the user shell once the developer opens and trusts the folder
  3. Loader stages decrypt a Bun bundle and run it from standard input

    • T1027Obfuscated Files or Information

    Logs

    • EDR process and network events · Node process resolving or downloading the Bun runtime and piping a 4.67 megabyte bundle to bun run over standard input so the payload never lands as a readable file; the stager carries two AES-128-GCM blobs with embedded keys and extra payloads hide in a compressed _bz field in package.json
  4. Stolen tokens are validated and used to push poisoned files to more repositories

    • T1078Valid Accounts
    • T1195.002Supply Chain Compromise: Compromise Software Supply Chain

    Logs

    • GitHub Audit Log and API logs · API calls to /user, /user/repos and /users/<login>/repos from unexpected sources checking repo, public_repo and workflow scopes, followed by commits of AGENTS.md, CLAUDE.md, .mcp.json, .cursorrules or .claude/settings.json by a token outside normal developer patterns, targeting up to 25 repositories per account; GitLab equivalents use /api/v4/projects and pipeline schedules
  5. Local agent configurations for 14 tools are injected with hooks and MCP entries

    Logs

    • EDR file events · Recursive home-directory scans for settings.json, config.json, mcp.json, .aider.conf.yml, .cursorrules and .windsurfrules under paths containing Claude, Codex, Gemini, Copilot, Cursor, Cline, Aider, OpenCode, Amazon Q, Cody, Kiro, Tabby, Bolt or Continue, followed by writes adding instruction text, session-start hooks or MCP server entries

Indicators of compromise

Hashes (13)

  • b9a182b646c7fdff68f2ff9dfd822516MD5 of scripts/setup.js loader; setup.js loader MD5 in toray repos; hunt-only, hashes differ per account
  • 2f54f6d41f41bb3c8e684b0f009cbcc3MD5 of scripts/setup.js loader; setup.js loader MD5 in ConcordiaDev repo; hunt-only, hashes differ per account
  • 3794736979327349404171798328a38aMD5 of scripts/setup.js loader; setup.js loader MD5 in itsunai repos; hunt-only, hashes differ per account
  • ab7ff2f782c194953e5811d16b9e1817MD5 of scripts/setup.js loader; setup.js loader MD5 in ejaaduipitara repos; hunt-only, hashes differ per account
  • 2191cbd04134839daeb6b8909725eae0MD5 of scripts/setup.js loader; setup.js loader MD5 in Imanilom repo; hunt-only, hashes differ per account
  • 31f1f5d9c59b950d91d05cecee20fce8MD5 of scripts/setup.js loader; setup.js loader MD5 in bajoebel repo; hunt-only, hashes differ per account
  • 908293cd1ed04cf50fbe72baf74967b6MD5 of scripts/setup.js loader; setup.js loader MD5 in ahmadtohar9 repo; hunt-only, hashes differ per account
  • bbd5695c36e76538547c45fd17e6c7e4MD5 of scripts/setup.js loader; setup.js loader MD5 in tobias94-design repos; hunt-only, hashes differ per account
  • 7ad1567180f6d5a5b317f697310a796cMD5 of scripts/setup.js loader; setup.js loader MD5 in claudiohernanbesada repo; hunt-only, hashes differ per account
  • 5c8db9bf78c6c2174ccf8a6299f9aafdMD5 of scripts/setup.js loader; setup.js loader MD5 in rkamphuis012-hub repo; hunt-only, hashes differ per account
  • 82a8be193a41f5b17906f919a179d999MD5 of scripts/setup.js loader; setup.js loader MD5 in Malala-Tour-Indonesia repo; hunt-only, hashes differ per account
  • 5dc5473468ee2d8006ebdaab0c7e93fbMD5 of scripts/setup.js loader; setup.js loader MD5 in julieth333 repo; hunt-only, hashes differ per account
  • a20a99e325226f56d7a25460a9d436abMD5 of scripts/setup.js loader; setup.js loader MD5 in madolee repo; hunt-only, hashes differ per account

Sources

Questions, detections or sightings of AI agent config stealer GitHub campaign? Bring them to the community.