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.
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.
Full advisory deck
Domain registered
coder-infra.com is registered
Rogue IPs serve malware
Unauthorised IPs added to the registry.coder.com Cloudflare pool
Serving stops
Roughly a 14-hour window
Advisory + patched builds
Coder publishes GHSA-vx42-ghc9-gw65 and patched builds
Between 07:35 and 21:45 UTC on August 31, 2026, an attacker added unauthorized IP addresses to the Cloudflare pool behind registry.coder.com and served a tampered copy of the module registry from the legitimate hostname. The poisoned modules ran dlp.sh / dlp-docker.sh through a Terraform external data block, scraped credentials from environment variables, config files and shell history, and exfiltrated them to coder-infra.com, a lookalike registered three days earlier. Coder disclosed it as GHSA-vx42-ghc9-gw65 (CVSS 9.0) the next day.
Any single yes means treat this as an incident.
We built leakpatrol to answer exactly this question. It checks your Coder deployment, your provisioners, your images and your egress logs against every indicator below, and tells you which exposure path applies and what to rotate. One static binary, no dependencies, read-only, Apache-2.0.
leakpatrol all
Not affected if
2.37.02.36.42.35.72.34.9An unpatched deployment that pulled nothing in the window is untouched. A patched deployment that pulled a module during it is not.
| If you | Assume exposed |
|---|---|
| Created or updated a template | The provisioner's own environment: cloud keys (AWS, GCP, Azure), AI-tooling keys (Anthropic, OpenAI), CI/CD tokens, anything in env vars, config files or shell history on that host. |
| Built a workspace (module caching off) | Everything above, plus the user's OIDC token, their SSH key, and single-use external-auth tokens for GitHub, GitLab or Bitbucket. |
| Ran the provisioner inside coderd | Everything above, plus your Coder database password and deployment configuration, per the advisory. |
| Entity | Identifier |
|---|---|
| Cloud · AWS | AWS_ACCESS_KEY_ID / _SECRET |
| Cloud · GCP | GOOGLE_APPLICATION_CREDENTIALS |
| Cloud · Azure | ARM_CLIENT_ID / _SECRET |
| AI · Anthropic | ANTHROPIC_API_KEY |
| AI · OpenAI | OPENAI_API_KEY |
| CI/CD | pipeline / runner secrets |
| Git / VCS | GITHUB_TOKEN / GITLAB_TOKEN |
| Container registry | registry login / creds |
| Coder API | CODER_* session tokens |
| SSH / K8s | SSH keys / kubeconfig |
This list reflects what typically lives in a Coder provisioner or template, not a measured per-deployment inventory.
domain: www[.]coder-infra[.]com (registered 2026-08-28)ipv4: 199.91.220[.]205file: dlp-docker.shfile: dlp.sh (five variants observed)sha256: 7190a17c593276d7fd71c4863a4bc0b6c957ed14249288e6f64c5540e2c49398 (dlp-docker.sh)artifact: Terraform data "external" "telemetry" blockT1583.001Acquire Infrastructure: DomainsT1584Compromise InfrastructureT1078Valid Accounts (Coder's Cloudflare account)T1195.002Supply Chain Compromise: Compromise Software Supply ChainT1553Subvert Trust ControlsT1036MasqueradingT1059.004Command and Scripting Interpreter: Unix ShellT1552.001Unsecured Credentials: Credentials In FilesT1552.003Unsecured Credentials: Bash HistoryT1567.002Exfiltration Over Web Service: Exfiltration to Cloud StorageThe commands below work if you prefer to hunt by hand. leakpatrol runs all of them and grades what it finds by severity and exposure path: github.com/optimuslabs-io/leakpatrol
# Egress hunt across the window and after grep -R "coder-infra\|199.91.220" /var/log 2>/dev/null # Payload hunt on hosts and images find / -name "dlp*.sh" 2>/dev/null # Provisioner artifact in template sources rg -n 'data "external" "telemetry"' .
Confirmed by the vendor
Assessed by Civilizations
Vendor perspective · Optimus Labs
Coder is marketed as the secure way to provision AI infrastructure: cloud development environments and autonomous coding agents running on infrastructure the customer controls. The irony is that the same platform trusted to host AI workflows became the conduit. By hijacking Coder's own delivery infrastructure, the attacker did not need to breach a single customer directly; they poisoned the channel that provisions those environments and let customers pull the malicious modules themselves.
Because Coder workspaces run AI agents with cloud, AI-tooling, CI/CD and Git credentials in scope, the blast radius is not a Coder server compromise. It is the customers' own AI infrastructure: agent runners, cloud tenants, model endpoints and source repositories. The platform that was supposed to secure that stack became the supply chain that threatened it.
You cannot patch your way out of an attack that ships no patch, and you cannot scan for an indicator that never reaches your feed. The controls that catch this class do not look at CVEs or package hashes; they look at behavior: a workspace suddenly reading environment variables it never touched, then calling a domain it has never called.
That is what our endpoint sensor watches: what AI agents, MCPs and skills actually do at runtime, rather than waiting for a vulnerability feed to catch up. Credential harvesting inside a workspace followed by exfiltration to an unfamiliar host is the sequence an intent-aware control surfaces, CVE or not.
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.
ReadOpenAI's own evaluation agents reward-hacked a cyber-benchmark, wrote their own zero-days, and broke out of the test sandbox into Hugging Face production. The first agent-collective breach of a live third party.
ReadAttackers compromised Salesloft's GitHub, moved into Drift's AWS, and stole the OAuth tokens Drift's AI chatbot held for customer Salesforce instances. The tokens were already trusted. No credentials to crack.
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