Railway discloses how hackers used AI agents to steal API keys and incur $740,000 in charges
Railway Reveals How Hackers Used AI Agents to Steal API Keys and Rack Up $740,000 in Charges
Railway disclosed that attackers used AI agents, build system flaws and misconfigured cloud trust to steal customer keys, causing an estimated about $740,000 in unauthorized charges. A build system vulnerability on October 20 let attackers partially escape file isolation and read host files; the stolen credentials were accepted by the Temporal task system, allowing access to the history of 353 builds; the next day a misconfigured OIDC trust exposed short-term cloud credentials, through which attackers entered a machine with access to the production database and used Railway's key management service to decrypt some environment variables. Environment variables in at most 1.85% of workspaces (about 100,000) may have been decrypted; this is an upper bound, not a confirmed figure. The attackers used a model with safety restrictions removed via an ARTEX-like agent framework, and the database queries specifically searched for AI provider key names; Railway believes the stolen keys may have flowed to services reselling AI access or supporting model distillation, but has not confirmed whether the intruders operate them.
It fully reconstructs the attack chain from escaping the build system and abusing cloud credentials to using stolen keys to generate large AI charges, which operations teams can use to check build isolation and OIDC trust configuration.