AI Agents Flooded RubyGems to Get Code Execution on Its Docs Builder
The target was the registry's build service, not the people who use it. Publishing a gem triggered code execution on RubyDoc.info without anyone running gem install.
ReadThe DPRK crew behind the Mastra AI-framework attack poisoned arrayref so its build script runs a credential stealer during cargo build, on the developer or CI endpoint that builds your AI tooling, not on your inference nodes.
Full advisory deck
A compromised maintainer account (droundy) and an impersonation account (dtolney, mimicking dtolnay) published malicious arrayref 0.3.10, internment 0.8.7 and append-only-vec 0.1.9 to crates.io. Each added a typosquatted dependency, proc-macro1 (mimicking proc-macro2), whose build.rs downloads and runs a stage-2 implant during compilation. Building an affected project, locally, in CI or through an AI coding agent, runs it. This is not a model backdoor. The payload runs at compile time, so the target is the machine that builds AI tooling, and what the actor wants is that host's credential store.
| Entity | Identifier |
|---|---|
| Cloud consoles | AWS / GCP / Azure |
| Model registry | S3 / GCS / HF Hub |
| Publishing tokens | crates.io / npm |
| Source control | GitHub / GitLab PAT |
| CI/CD secrets | Actions / GitLab CI |
| Hugging Face | HF_TOKEN |
| Weights & Biases | WANDB_API_KEY |
| LLM provider keys | OpenAI / Anthropic |
| Vector DB | Qdrant / Pinecone |
| SSH keys | ~/.ssh/id_* |
Rotate cloud and model-registry credentials first: they unlock the models, checkpoints and data themselves. Publishing tokens for crates.io and npm come next, because they let this actor poison your next build.
Browser-saved logins in Chrome, Brave and Edge are the confirmed theft vector. The rest is what a dev or CI endpoint holds. The ordering is blast-radius priority for an AI org, not measured per-victim theft.
Malicious versions: arrayref 0.3.10, internment 0.8.7, append-only-vec 0.1.9, proc-macro1 (all versions)Deleted crates: proc-macro-en, aovine, arone, aronenao, tinymemberAccounts: droundy (compromised maintainer), dtolney (impersonating dtolnay)Files: /tmp/rust-setup, %TEMP%\rust-setup.ps1, %TEMP%\rust-setup-launch.vbsNetwork: 23.254.165[.]112:9089 and :443, 23.254.167[.]107:443, hwsrv-798836.hostwindsdns[.]comC2 path: /49890878 (shared with the Mastra campaign)# Find affected versions anywhere they are pinned rg -n "arrayref 0.3.10|internment 0.8.7|append-only-vec 0.1.9|proc-macro1" Cargo.lock # Build-endpoint IoCs ls -la /tmp/rust-setup 2>/dev/null grep -R "23.254.165" /var/log 2>/dev/null
The target was the registry's build service, not the people who use it. Publishing a gem triggered code execution on RubyDoc.info without anyone running gem install.
ReadCoder's own delivery infrastructure was hijacked to serve credential-stealing modules from the real registry.coder.com. No CVE, no poisoned package, nothing for a scanner to match.
ReadA user-writable dictation endpoint let code running as the logged-in Mac user redirect Muse's audio, transcript, and session token, then steer the agent through permissions already granted to it.
ReadFull advisory
The complete advisory deck for this incident, with the attack chain diagram, indicators, and remediation bands in one file.
Optimus Labs · Civilizations
Threat research, disclosures, and practical tips on enterprise Agentic AI attack surface management, directly in you or your agent's inbox.
SubscribeBacked by
Ecosystem
