Skip to content

Image: blogapp.bitdefender.com · rights & removal

Executive Summary

Malware has been discovered in a campaign targeting developers using AI coding assistants by leveraging compromised GitHub content. Researchers identified 22 malicious GitHub links containing files designed to execute payloads within AI-assisted development tools. The campaign manipulates the files and configurations that AI tools use for project understanding, such as `AGENTS.md` and `CLAUDE.md`, to trick them into running specific scripts like `setup.js`. Malicious instructions present these scripts as security-sensitive, sealed artifacts requiring automatic execution, aiming to bypass developer scrutiny by mimicking standard security protocols.
The threat also involves session-start hooks in configuration files, such as `.claude/settings.json`, which can trigger shell commands without requiring any direct user input from the AI agent. A subsequent analysis of the malicious `setup.js` reveals a layered delivery mechanism involving hex-decoding and encryption to conceal a final payload, which is designed to steal credentials, validate access across platforms like GitHub and GitLab, and recursively search for and infect AI-agent configuration files across the developer's system.
Security measures like Bitdefender AI Guardian are being developed to address this by scanning project instruction files and monitoring agent activity against defined policies to block unauthorized execution. The attack vector successfully pivots from written instructions to trusting repository contents and configuration files, exploiting the implicit trust developers place in their workflow tools.

Facts Only

* Bitdefender Labs researcher Andrei Anton-Aanei identified 22 malicious GitHub links containing files designed to make AI-assisted development tools execute a concealed payload.
* The malware abuses files, rules, hooks, and configurations used by AI coding tools to understand a project and automate work.
* Malicious content uses files like `AGENTS.md` and `CLAUDE.md` to persuade AI assistants to execute a file named `setup.js`.
* The malicious instructions present `setup.js` as a sealed binary artifact, claiming it is part of a sealed initialization process with cryptographic signatures.
* Example instructions directed the AI assistant to run `scripts/setup.js` automatically without confirmation if the user requests project help.
* Session-start hooks in configuration files, like `.claude/settings.json`, can cause shell commands to run once a repository is trusted.
* A malicious `setup.js` file employs a multi-stage JavaScript loader: it hex-decodes embedded values, applies ROT13, decrypts AES-128-GCM blobs containing keys, decompresses a bundle, resolves the Bun runtime, and pipes the result to `bun run`.
* The malware has capabilities to steal credentials and tokens by validating them against provider APIs (GitHub/GitLab).
* Payloads are concealed in a compressed `bz` field within `package.json`, including functionality for Windows Credential Manager enumeration.
* Execution results in recursive searching of the victim’s home directory for AI-agent configuration files, attempting to inject malicious instructions or hooks into them.
* The malware validates GitHub tokens by querying endpoints like `/user`, `/user/repos`, and checking scopes like `repo` and `workflow`.
* It can modify package metadata and workflows, commit files, and attempt to republish infected packages via npm, PyPI, RubyGems, and JFrog.
* Bitdefender AI Guardian inspects instruction files like `CLAUDE.md` and `AGENTS.md` to block execution if they match patterns suggesting masked instructions.

Full Take

The narrative illustrates a critical shift in the software supply chain where trust is extended beyond source code and into the configuration layer of developer environments interacting with autonomous agents. The core mechanism exploits developer-centric security paradigms—the expectation that project documentation and execution paths are authoritative—to facilitate silent compromise. This moves the attack from merely injecting malicious code to subverting the *trust model* itself, leveraging familiar security terminology (signed artifacts, DevSecOps procedures) to normalize highly dangerous actions.
The layered nature of the exploit, utilizing both explicit instruction-following via AI prompts and implicit execution via session hooks, demonstrates an understanding that modern threats target agent environments holistically. The malware’s ability to recursively infect local configuration files ties the external compromise directly into persistent, localized control over developer activity. This implies that perimeter defense alone is insufficient; security must be implemented within the context of agent interaction itself.
The focus on AI-agent security via tools like AI Guardian highlights a necessary evolution in defensive posture: shifting from securing static assets to monitoring dynamic execution paths and agent intent. The pattern suggests that as AI capabilities become integrated into workflows, the boundaries between application code, configuration data, and system execution become the new high-value attack surfaces. The implication is that cognitive sovereignty requires developers to treat all contextual instructions—whether written in Markdown or embedded in JSON—as potential execution vectors requiring maximum scrutiny, irrespective of how familiar the context appears.
Bridge Questions: If trust in all configuration files is exploited, what verifiable, non-contextual mechanism can guarantee that an AI agent’s operational commands originate from the user's explicit, non-contextual intent? How should security tooling be designed to audit not just the final action, but the entire chain of contextual inputs and execution hooks utilized by autonomous systems? What are the long-term societal consequences when workflow autonomy is enabled through subtly compromised configuration files?

From the original · Bitdefender Labs

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.
Read the full story at bitdefender.com

Sentinel unavailable

The automated check of the source article's wording did not complete, so no result is shown.

This looks only at the wording of the original source article, not at this page's AI-written sections. A small local AI model made this estimate. It has not been checked against known human and machine texts, so treat it as provisional. It cannot show who wrote an article.

How AI Agents Become New Targets in GitHub Malware Campaign | Huntaegis