Railway Breach: Rotate Your API Keys Now
Railway says an attacker hunting AI API keys decrypted secrets for up to 100,000 workspaces. What happened and the keys to rotate today.
If you've ever deployed an app on Railway, stop and rotate your keys today. The developer cloud says an attacker got into its internal systems this week, went hunting for AI provider API keys, and decrypted environment variables for up to about 100,000 workspaces. I first saw the updated numbers in a post from The Hacker News on X, then read Railway's own report.
What happened
According to Railway's preliminary incident report, published October 22, the attack ran from 13:58 UTC on October 20 to 03:32 UTC on October 22. The attacker escalated privileges through Railway's build infrastructure, later reached its CI environment, and ran an unauthorized query against encrypted environment variables. Some of those were decrypted using stolen credentials.
Railway says at most 1.85% of workspaces had environment variables potentially exposed, which works out to roughly 100,000. Because it couldn't tell exactly which variables were decrypted, it asked vendors including GitHub, GitLab, Anthropic, OpenAI, OpenRouter and Stripe to revoke keys, and in some cases handed over every key it had on file. That's why plenty of people who weren't directly hit still got revocation emails.
The motive is the interesting part. Railway believes the attacker wanted AI API keys to run "distillation" attacks, where you pump a big commercial model with queries on someone else's bill to train a cheaper copy. The company says the attacker didn't log into user accounts, but it hasn't ruled out access to source code yet. TechCrunch and BleepingComputer covered the earlier warning, with BleepingComputer putting Railway's user base at about 4.8 million.
Why it matters
Environment variables are where most of us keep the keys to everything: database passwords, cloud credentials, Stripe secrets, OpenAI and Anthropic keys. A leaked AI key can turn into a surprise bill fast, and a leaked database URL is worse. This also shows AI keys have become a target on their own, not just a side effect of a breach. OpenAI only just made a similar point about its own training, which I wrote up in OpenAI pulling frontier training offline.
What to do
- If you signed up for Railway before October 21, revoke and replace every sensitive variable, then redeploy the services that use them. Railway recommends this for all customers, not only the ones it emailed.
- Check usage dashboards for your AI providers and cloud accounts for spikes since October 20.
- Remove public network access from databases where you can.
- Review your GitHub audit log and installed app access, plus logs on Docker Hub or any other registry you use.
Railway says running apps stayed online throughout and builds are back for every tier. A final forensic report is still to come, and I'll update this if it changes the picture.
Comments ()