Poisoned Code Projects Tell AI Coding Assistants to Run Malware

Researchers found 22 code project links with hidden instructions that tell AI coding assistants to silently run a script that steals developer credentials.
Security researchers have found 22 links to code projects that were rigged to hijack AI coding assistants. Hidden instructions in the projects tell the assistant to quietly run a script that can steal a developer’s credentials and spread to other projects.[1] [2]
What happened
Many code projects include plain-text instruction files that tell an AI coding assistant how to run tests or follow house rules. According to the reports, the poisoned projects used these files to give a different order: run a setup script at the start of every session, without showing its contents or asking the developer.[1] [2]
The instructions were written to sound official, describing the script as a signed, sealed component that should not be inspected. If the script ran, it could steal credentials, change local AI tool settings and use the stolen access to tamper with other code projects.[1] [2]
The researchers also found a second route that does not rely on fooling the AI at all. Settings files in some projects used “session start” hooks, so the command ran automatically once a developer trusted the project.[1] [2] The reports do not say how many developers were affected.
Why it matters
This is a form of indirect prompt injection: the harmful instructions sit in content the AI reads, not in what the user types. AI coding assistants act with the developer’s own permissions, so a single hidden line can turn a helpful tool into a way in.
As more people let assistants run commands for them, downloading a project and asking the AI to “set it up” becomes a real risk.
The short version
Rigged code projects are telling AI coding assistants to run malware. Check instruction files and keep approvals on.
How to stay safe
- Read instruction and settings files first in any project you did not write.
- Keep command approval turned on. Do not let an assistant run scripts without asking.
- Be suspicious of “do not inspect this file” wording. Legitimate projects do not say that.
- Open unknown projects in a sandbox or disposable environment.
- Rotate keys if an assistant ran an unexpected script on your machine.
Follow AI Safe Mode
See the post on YouTube Watch and follow AI Safe Mode on YouTube @AISafeMode and Instagram @aisafemode.
References
- Cyber Security News, Nov 18, 2026. Report on the poisoned projects and how the assistants were hijacked. Read the report ↗
- Cyber Press, Nov 18, 2026. Report on the hidden script and the second, prompt-free route. Read the report ↗
