Guide · Keys
Railway breach: check whether your OpenAI, Anthropic or OpenRouter key was abused, and cap the damage
Railway's preliminary report says an attacker targeted AI provider API keys stored in customer environment variables. Check the key at the provider, then look at spend for the days of the incident.
Published
BillCurfew watches spend per key and emails you when a daily cap or a spike rule trips. A manual kill works on every plan, including Free. Setup is pasting an admin or management key. There is no code change, and BillCurfew is not a proxy.
The honest limit: polling is about every five minutes, so this does not replace revoking the key. A copied key can spend until the provider turns it off. What we store, and what we never store, is on the security page.
What Railway reported
Railway says the attack window ran from October 20 at 13:58 UTC to October 22 at 03:32 UTC, and that the attacker was after AI provider API keys in customer environment variables. Railway says at most 1.85% of workspaces had environment variables potentially compromised. [1]
Railway also says it asked OpenAI, Anthropic, and OpenRouter to revoke potentially compromised keys. An email from a provider about a revoked key does not, by itself, mean that key was in the affected set. Silence does not mean the key is safe. Revoke it yourself. [1] [3]
1. Revoke the key at the provider
Revoke the key at OpenAI, Anthropic, or OpenRouter. Deleting the variable in Railway does not stop a copy that is already out. The key stays live at the provider until that provider disables or deletes it.
- OpenAI: delete the key. Railway's OpenAI guide says deletion takes effect immediately. [2]
- Anthropic and OpenRouter: disable the key at the provider. Disabling is reversible. The steps are in the leaked-key guide.
After the provider key is dead, put a new key in the Railway service and redeploy. The old value should not remain in the service variables.
2. Review usage grouped by key for October 20–22
Look at October 20, October 21, and October 22, grouped by key, and compare that window with the key's normal days. You are looking for spend, models, or request volume you did not generate.
- OpenAI. Railway's guide says the usage view can be grouped by API key, and that billing shows spend for the period. Compare token volume, request counts, and the model mix with your normal traffic. [2]
- Anthropic. Review the organization's usage grouped by API key for those three days. This guide does not prescribe a console click-path.
- OpenRouter. Review each key's own usage for those days. OpenRouter reports usage on the key, including a daily total.
Keep the export or the screenshots. You will want them if you ask for a credit.
3. Ask for a credit
Railway's OpenAI guide says to keep the usage details, then contact OpenAI Support by opening a chat from any page in the OpenAI Help Center. [2]
Send the key id or name, never the secret, plus the time you revoked it and the usage you believe was not yours. Treat a credit as a request. Railway's guide tells you how to ask. It does not say OpenAI will grant one.
Railway's published credit steps are for OpenAI. For Anthropic or OpenRouter, contact that provider's support with the same usage details. This page does not claim they offer the same process.
4. Cap the next key before it leaks
- One key per service. A leaked Railway variable then maps to one provider key, and you know which one to revoke.
- A daily cap per key. A monthly project or workspace limit can be spent in one night. The daily budget guide covers what each provider supports and what it does not.
- A spike alert. Usage that jumps over a few minutes is the signal a copied key is being used, long before a monthly limit fills up.
The leaked-key guide is the longer checklist: stop the spend, measure the damage, and write to support. Use this page for the Railway window. Use that one for the provider steps.
FAQ
Were all Railway workspaces affected?
Railway's preliminary report says at most 1.85% of workspaces had environment variables potentially compromised. Railway still recommends that customers rotate sensitive variables stored on Railway before the incident. [1]
Does deleting the variable in Railway stop the key?
No. A key that was copied stays live at OpenAI, Anthropic, or OpenRouter until you revoke it there. Removing it from Railway only stops Railway from injecting that value into new deploys.
Which days should I review?
Review usage grouped by key for October 20, 21, and 22. Railway says the attacker targeted AI provider API keys in customer environment variables from October 20 at 13:58 UTC through October 22 at 03:32 UTC. [1]
How do I ask OpenAI for a credit?
Railway's OpenAI guide says to keep the usage details, then open a chat from any page in OpenAI's Help Center. A credit is a request. That guide does not say OpenAI will grant one. [2]
Can BillCurfew revoke the key the moment it is copied?
No. BillCurfew polls about every five minutes and emails you when a daily cap or a spike rule trips. A manual kill works on every plan, including Free, but it does not replace revoking the key at the provider. A loop can spend for up to one poll interval before a poll notices it.
Sources
- Railway, Preliminary Report: Oct 21st Security Incident. https://blog.railway.com/p/preliminary-report-october-security-incident [1]
- Railway, Check for unexpected OpenAI usage. https://blog.railway.com/p/security-disclosure-recommendation-check-for-unexpected-openai-usage [2]
- TechCrunch, Railway urges users to revoke secret keys after cyberattack. https://techcrunch.com/2026/10/22/developer-platform-railway-urges-all-users-to-revoke-secret-keys-after-cyberattack/ [3]