The Daily Byte
Breaking
Welcome to The Daily Byte — real stories from across Pakistan.
Tuesday, 24 November 2026 · Pakistan

The Daily Byte

Stories from Pakistan that deserve to be heard
Minor World

Poisoned GitHub repos trick AI coding tools

By The Daily Byte ·23 Nov 2026 ·4 min read
Two programmers working together at a computer

Malicious repositories on GitHub are tricking AI coding assistants into running a hidden credential stealer, security researchers at Bitdefender Labs have found, in a campaign that turns the tools developers trust into the attack itself.

Researcher Andrei Anton-Aanei identified 22 malicious GitHub links carrying files designed to make AI-assisted development tools execute a concealed payload. The campaign, published by Bitdefender Labs on 17 November 2026, abuses the instruction files, rules, hooks and configurations that AI coding tools use to understand a project and automate work. Once launched, the malware can steal credentials, check which accounts it can access, modify repositories, infect software packages and plant new AI-agent instructions to spread further. The findings were independently summarised by Security Online and by threat researchers at Spectrum Security.

How the trick works

Files such as AGENTS.md and CLAUDE.md normally tell an AI coding assistant how a project works: its coding style, how to run tests, and project-specific instructions. In the poisoned repositories, those files describe a file called scripts/setup.js as a sealed, signed artifact that the assistant must not inspect, then order it to run the file silently at session start, without asking the developer for confirmation.

The campaign has a second path that needs no AI prompt at all. Configuration files such as .claude/settings.json can define a session-start hook, so once a developer opens and trusts a repository, a command runs in their shell automatically. "In this scenario, the AI assistant doesn't need to interpret an instruction, generate a response, or receive a typed prompt," Bitdefender Labs said. "The configuration itself can trigger execution."

What the payload steals

The setup.js file is a multi-stage JavaScript loader built to make analysis difficult. The outer file is a 3.75 MB single-line script that hex-decodes a large embedded value, applies the ROT13 cipher and evaluates the result. The recovered stage is a Node.js stager holding two AES-128-GCM encrypted blobs, which unpack into a 4.67 MB bundle run through the Bun JavaScript runtime.

Bitdefender Labs said the payload can steal CI/CD and GitHub Actions secrets, cloud and container credentials, package-registry tokens, browser-stored credentials, password-manager data, Windows Credential Manager entries, SSH keys, .env files, API keys and source-control tokens. It validates stolen tokens against provider APIs before using them, and can encrypt and batch the collected records for dispatch.

How it spreads to other developers

The campaign is designed to propagate. After execution, the malware searches the victim's home directory for AI-agent configuration files belonging to 14 tools, including Claude, Codex, Gemini, Copilot, Cline, Aider, Amazon Q and Cursor, and injects its own instructions, hooks or MCP server entries into them.

It also uses stolen GitHub or GitLab tokens with push permission to implant the same poisoned files into other repositories, targeting up to 25 repositories per account by default. That means a developer who clones or trusts one of those repositories can be attacked in turn. Bitdefender has not disclosed how many developers ran the script, who is behind the campaign, or how much data was stolen, and no attribution to a known threat group has been established.

Bitdefender said its AI Guardian product detected the malicious instruction file in all 22 samples in internal tests conducted on 10 November. Developers should review AGENTS.md and CLAUDE.md files, session-start hooks, MCP server definitions and unfamiliar setup scripts before opening an unfamiliar repository in an AI-enabled environment, and treat any instruction that says not to inspect a file before running it as a warning sign.

Frequently asked questions

Which AI coding tools are affected? Bitdefender named 14 tools whose configuration files the malware searches for, including Claude Code, Codex, Gemini, GitHub Copilot, Cline, Aider, Amazon Q and Cursor.

Do I need to click anything for the malware to run? Not necessarily. A session-start hook in a trusted repository's configuration can run the script when the project is opened, with no typed prompt to the AI assistant.

How many repositories were found? Bitdefender Labs identified 22 malicious GitHub links. The researchers did not say how many developers were affected.

Who is behind the campaign? The operator is unattributed; Bitdefender established no link to a named threat group.

Published 23 November 2026. Sources: Bitdefender Labs; Security Online.