cd /news/ai-safety/attacker-hijacks-ai-coding-assistant… · home topics ai-safety article
[ARTICLE · art-132462] src=swapupdate.in ↗ pub= topic=ai-safety verified=true sentiment=↓ negative

Attacker Hijacks AI Coding Assistant Session, Spreads Shai-Hulud Across About 100 Repositories

Mandiant reported that an attacker hijacked an active AI coding-assistant session at an unnamed software-as-a-service provider and spread the Shai-Hulud worm across roughly 100 internal code repositories, stealing repository secrets and product source code. The assistant recommended attacker-poisoned software that was accepted, after which the attacker installed an infostealer via a poisoned PyPI package and stole GitHub OAuth tokens; a poisoned package in the company's official namespace caused a second infection when another employee pulled it. The case appears in Mandiant's September 2026 AI risk and resilience report, which recommends verifying AI-recommended dependencies against cryptographic checksums and allowlists, keeping API keys and long-lived OAuth tokens out of extension reach, and routing dependency traffic through controlled internal repositories.

read2 min views1 publishedSep 17, 2026
Attacker Hijacks AI Coding Assistant Session, Spreads Shai-Hulud Across About 100 Repositories
Image: Swapupdate (auto-discovered)

Mandiant says an attacker hijacked an active AI coding-assistant session at an unnamed software-as-a-service provider and later spread Shai-Hulud across about 100 internal code repositories.

Before the repository spread, the assistant recommended software that the attacker had poisoned, and the recommendation was accepted. The worm stole repository secrets and source code for the company’s products.

The case appears in Mandiant’s September 2026 report. The public case study does not say when the intrusion happened or how the attacker took over the active coding-assistant session.

How the Attack Unfolded

After the recommendation was accepted, the attacker used the developer’s active session to install an infostealer through a poisoned PyPI package. The attacker also stole GitHub OAuth tokens.

The attacker then deployed the self-spreading Shai-Hulud worm across approximately 100 internal code repositories.

The attacker also poisoned a package in the company’s official namespace. Another employee pulled the compromised version, causing a second infection.

Mandiant had already documented attackers using AI in real attacks. In a March 2026 report, it said attackers had moved during 2025 from using generative AI mainly to speed up work to using large language models in malware and active attacks.

How Defenders Can Protect AI-Assisted Development

For this case, Mandiant recommends three controls for AI-assisted development:

  • Check AI-recommended third-party dependencies against cryptographic checksums and approved allowlists.
  • Keep raw API keys, long-lived OAuth tokens, and other secrets out of direct reach of extensions.
  • Route dependency traffic through controlled internal repositories.

Recent Shai-Hulud-family attacks have also targeted developer tools and credentials. In August, a Keyv-linked npm worm poisoned hundreds of packages and planted hooks for Claude Code and Visual Studio Code, while a later analysis found a Shai-Hulud variant scanning 469 locations for credentials across developer systems, CI/CD tools, cloud configurations, and AI tool files.

These were separate campaigns, and the available evidence does not link them to the unnamed Mandiant intrusion.

── more in #ai-safety 4 stories · sorted by recency
── more on @mandiant 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/attacker-hijacks-ai-…] indexed:0 read:2min 2026-09-17 ·