Malware Campaign Exploits AI Agent Configurations

AI Coding Agents Targeted in GitHub Malware Campaign

GitHub malware, GitHub, AI coding agents, GitHub malware targeting AI coding agents, Malware attacks on AI development tools
Facebook
X
LinkedIn
Reddit
WhatsApp

A malware campaign on GitHub is specifically targeting configuration files and instructions used by AI-powered coding tools to execute malicious code without detection.

Bitdefender security researchers discovered the files involved in the campaign across 22 GitHub repositories. The attackers are targeting credentials, developer accounts, and software supply chains.

Ad

AI Agents Become an Attack Vector

What makes this campaign particularly notable is its attack method. Rather than hiding a single malicious script in a repository, the attackers manipulate various files and settings that control AI coding agents. These include instructions in AGENTS.md and CLAUDE.md files, SessionStart hooks, Model Context Protocol (MCP) configurations, and tasks for development environments.

This approach tricks trusted AI tools into performing malicious actions. In some cases, scripts launch automatically as soon as developers open a project directory and mark it as trusted. No additional confirmation or explicit AI prompt is required in these scenarios.

Malware Disguised as Internal Security Requirements

To make their manipulations less conspicuous, the attackers phrase malicious instructions to resemble internal policies and technical requirements. They create the impression that certain actions are part of established DevSecOps processes or are necessary to meet security and compliance requirements.

Ad

A malicious script is presented as a verified or signed component that supposedly requires no further inspection. In some cases, AI agents are even instructed to execute the setup.js file silently, without displaying output or requesting confirmation.

The file contains a multi-stage JavaScript loader designed to make malware analysis more difficult. Once executed, it can attempt to steal credentials and tokens and launch additional scripts in the user’s shell.

Stolen Credentials Enable Further Spread

The malware does not stop at the initially infected system. It specifically searches for configuration directories belonging to 14 different AI-powered development tools. It then attempts to plant its own instructions, startup mechanisms, or MCP server configurations in those directories.

This allows attackers to manipulate other AI agents running on the same machine. The malware also exploits existing GitHub and GitLab credentials to modify additional repositories. Its default configuration targets up to 25 repositories.

Before proceeding, the malware checks the permissions associated with any access tokens it discovers. If the tokens provide sufficient privileges, malicious files can be injected into additional projects. When developers subsequently open these projects in other development environments, the infection can spread further.

Software Supply Chains Also Under Attack

Beyond developer accounts and source code repositories, the campaign targets credentials for CI/CD systems and package registries. The attackers may attempt to republish compromised packages through platforms such as npm, PyPI, RubyGems, and JFrog.

This creates an additional risk for software supply chains. If manipulated packages are incorporated into other projects, malicious code can spread beyond the original development environment.

Bitdefender’s investigation highlights how AI-powered development tools are increasingly becoming part of the attack surface themselves. In addition to conventional security checks of source code and dependencies, organizations must also monitor agent instructions, project configurations, startup hooks, and permissions. In particular, automatically executed actions should not be considered trustworthy simply because they are embedded in seemingly official project instructions.

(Editorial Team/Bitdefender)

Ad

Weitere Artikel