Quick Take
- What happened: Attackers exploited a filesystem escape flaw in Railway’s build system on October 20, stole customer AI provider keys and other secrets, and used them to generate an estimated $740,000 in unauthorized AI usage charges.
- Who is affected: Railway customers who stored AI provider keys (OpenAI, Anthropic, AWS Bedrock, Google Gemini, OpenRouter, SpaceXSI) as environment variables; up to 100,000 workspaces may have had variables decrypted.
- What to do: Revoke and replace any sensitive variable stored on Railway before October 21, check audit logs for GitHub and container registries, remove public network access to databases, and file a charge report for unauthorized AI spending.
- Refunds: Railway is working with AI providers on refunds and will cover costs for Anthropic and OpenRouter charges itself.
- Status: The attacker was removed from Railway’s systems at 09:24 UTC on October 21, all exploited weaknesses are now closed, and every user has been moved to a new build system.
In plain English
Railway is a service that runs apps for developers and stores their passwords and API keys. In October, an attacker broke into Railway’s systems and stole keys that customers use to access AI services like OpenAI and Anthropic. The attacker then used those keys to run up $740,000 in AI bills. Railway says it will pay those bills if the AI companies won’t refund them.
What you should do: If you use Railway and stored AI keys there before October 21, you should cancel those keys with your AI provider and create new ones. If you don’t use Railway or don’t store AI keys there, you don’t need to do anything.
What happened
On October 20, 2026, at 07:28 UTC, an attacker exploited a previously unknown flaw in Railway’s build system to partly escape filesystem isolation and read files on the host virtual machine, according to the company’s incident report. That gave the attacker a credential used by build servers to push finished images and reach some internal systems.
The on-call engineer was paged at 13:58 UTC, about six and a half hours after the first exploit, when an alert flagged unusual calls to a registry service. Through the stolen credential, the attacker accessed Railway’s internal Temporal system and read stored histories of other builds. The same credential allowed the attacker to fetch cached snapshots of code, including a copy of Railway’s internal monorepo.
After scanning that code, the attacker found a wrongly configured OIDC binding in one of Railway’s cloud environments. At 03:26 UTC on October 21, the attacker exploited this to obtain a short-lived cloud credential. With that credential, the attacker took two more: one that could read encrypted variables from a production database when used inside the internal network, and an SSH key.
The SSH key opened a machine that runs orchestration tasks for Railway’s fleet. That machine stored a credential capable of decrypting customer variables, which it needed to start customer workloads. Each environment’s variables are encrypted with that environment’s own key, and those keys are in turn encrypted by a root key stored in a cloud provider’s key management service (KMS).
Between 04:07 and 05:21 UTC on October 21, the attacker pulled encrypted variables from the database, looking for names that matched AI provider keys. Using the orchestration machine’s credentials with the KMS, the attacker decrypted some of them between 04:42 and 05:14 UTC and again between 06:36 and 07:15 UTC. The attacker was fully removed from Railway’s systems at 09:24 UTC that day.
The attacker’s database queries looked for AI provider keys, and also matched cloud, database, and payment service credentials. The decrypted data also included linked-account tokens for 1,852 users: BYOK agent keys and GitHub OAuth tokens. All were reset, each user was notified, and no logins to customer accounts using stolen credentials were found.
The attacker also read the stored histories of 353 builds, including the variables and secrets passed to those builds. Railway’s logs show which environments were exposed but not which variables, so the figure of about 100,000 workspaces is an upper limit. The company emailed customers it judged to be at high risk.
What you should do
Railway advises customers to revoke and replace any sensitive variable stored on the platform before October 21. Keys should be revoked or rotated with the provider that issued them, since filing a charge report does not revoke a key.
The company also advises removing public network access to databases, checking GitHub audit logs and which apps can access the account, and checking audit logs in registries such as Docker Hub.
Customers who have been charged for unauthorized AI usage should report those charges through Railway’s charge report form. The form does not set a cap or a deadline for claims, and the incident report does not state whether customers must pay disputed charges while a claim is under review.
Refund terms differ by AI provider:
- AWS Bedrock: AWS’s existing refund policy covers fraud, and its account teams have started refunds.
- Google Gemini: Google’s existing refund policy covers fraud, and its account teams have started refunds.
- OpenAI: Refunds are reviewed on a case-by-case basis. Customers file a claim with OpenAI, then pass the case ID to Railway’s support team.
- SpaceXSI: Refunds are reviewed on a case-by-case basis, and customers submit their claims to Railway’s support team.
- Anthropic: Talks are still underway, and Railway will cover costs from breached Anthropic keys in the meantime.
- OpenRouter: It maintains its no-refund policy in its terms of service, so Railway will cover all OpenRouter-related costs resulting from the breach.
In an October 26 update, Railway told customers asking about refunds for unauthorized AI spend that “Railway is unable to refund customers for spend performed with compromised API keys.” It encouraged them to contact the AI providers directly and offered to escalate their requests. The company has since promised to pay charges itself when an AI provider will not refund them.
What it means
The breach shows the risk of storing sensitive credentials in platform-as-a-service environments. Railway stores customer secrets such as API keys and database credentials as environment variables, and the attacker was able to decrypt variables in at most 1.85% of workspaces, about 100,000.
The report does not say how the $740,000 figure was estimated or what period it covers. Railway’s forensics did not show any customer databases being accessed, and there was no indication that customers’ code repositories were downloaded. Any data the attacker copied but did not decrypt can no longer be decrypted, because the credential the attacker used has been disabled.
Each build now runs in its own short-lived virtual machine, on top of the old isolation. Its credentials can push only one specific image to Railway’s registry. Within an hour of Railway patching the original escape, its own hardening team built a second exploit by changing that attack. That was one reason the company moved every user to the new build system at once.
Every weakness the attacker used is now closed, the company says. It has filed a complaint with the FBI’s IC3 and is working with a specialist forensics firm whose investigation continues. It is sharing indicators of compromise privately for now.
Out of caution, Railway also gave some providers every key it held for their services, so reset requests reached more than 100,000 users. A revocation notice from a provider does not by itself mean a key was exposed.



