If you build modern web apps, Platform-as-a-Service tools feel like magic. You push code, hook up your repo, paste your API keys into an environment-variables screen, and your service is live.
It’s fast, elegant and convenient. But that convenience comes with an implicit pact: we trust the platform with the crown jewels of our architecture.
On October 21, developer platform Railway disclosed that an unauthorized actor had gotten into its internal systems, and followed up yesterday with a candid preliminary report. The attacker pulled encrypted environment variables and, using compromised CI credentials, decrypted a subset of them. Railway estimates that up to 1.85% of its workspaces, about 100,000, had environment variables potentially exposed. Because it can’t tell exactly which ones were decrypted, it is treating the exposure broadly.
Railway moved quickly. It paused builds and deployments while keeping running services online, rebuilt its build infrastructure, rolled every GitHub App installation, invalidated user sessions, and asked GitHub, GitLab, OpenAI, Anthropic, OpenRouter and Stripe to revoke potentially exposed keys. Still, the implications ripple far beyond one platform.
Why attackers want your .env file
In the old days, attackers broke into servers to siphon credit card databases or lock up hard drives with ransomware. Today, the most valuable prize on a developer’s platform is often an API key.
Railway describes a sustained, targeted campaign against its services, and its early findings point to the motive: AI provider API keys, which the attacker appears to have wanted for distillation attacks, training their own models on outputs paid for with someone else’s account.
Think about what sits in your production environment variables right now:
- Your OpenAI and Anthropic API keys
- Your Stripe production secrets
- Database connection strings holding customer records
- AWS access keys with broad S3 permissions
If someone takes those, they don’t need to break into your app. You’ve handed them the front door key to your entire third-party ecosystem.
The real cost: downstream blast radius
When a PaaS gets breached, the damage doesn’t stay with that vendor. If an attacker pulls your AWS keys from a PaaS dashboard, your AWS account is now in play. If they pull your SendGrid key, your domain’s email reputation is in their hands. If they pull your database URL and the database is open to the internet, your customer data is one connection away.
Simple rules for better secrets hygiene
We can’t abandon cloud platforms, but we can stop treating environment-variable dashboards like casual notepads.
- Rotate everything now. If you host workloads on Railway, Railway’s own advice is to revoke and reissue any sensitive variable stored before October 21. Do the same on any platform that reports anomalous activity, without waiting for the final forensics report.
- Close the side doors. Remove public network access to databases, and review your GitHub audit logs, installed app access, container registry logs and cloud console activity for anything unexpected.
- Scope your keys to the bare minimum. Never generate a key with full administrative access if your application only needs to read one bucket or call one model endpoint.
- Adopt short-lived credentials. Static strings that sit in config files for two years are an accident waiting to happen. Move toward IAM roles, workload identity federation and automated rotation.
Where cyber insurance fits
A breach at your platform provider is still your problem. If your customers’ data sat in a database whose credentials were exposed, the notification, legal and forensic costs land on you, and that’s squarely what cyber coverage is for.
The gap to check is the bill. A stolen AI or cloud key can run up thousands of dollars in usage before anyone notices. Some cyber policies cover unauthorized use of your computing resources, often listed as cryptojacking or utility fraud. Many don’t, and those that do tend to cap it low. If your business runs on metered APIs, ask how your policy treats that charge.
Convenience is great for prototyping. But when it comes to production secrets, zero trust starts with where you store your keys.