Skip to content
Cyberttak.
Scams & safety· 3 min read

Hackers stole AI keys from Railway and ran up $740,000 on other people's accounts

Railway, a popular app hosting service, says attackers went after the passwords developers use to pay for ChatGPT, Claude and Gemini, then sold or used them elsewhere.

By CyberttakPublished · 08:46

In brief

Railway says attackers took the keys developers use to pay for ChatGPT, Claude and Gemini

Attackers decrypted secrets from up to 100,000 workspaces on Railway, an app hosting service, and went after AI provider keys. The stolen keys ran up $740,000 in charges on other people's accounts. If you store AI keys online, rotate them and set a spending limit.

Rows of server racks with glowing red lights in a dim data centre, one with a padlocked door and tangled cables
Rows of server racks with glowing red lights in a dim data centre, one with a padlocked door and tangled cablesCredit: AI-generated · GPT Image 2

Railway, a cloud platform where developers host apps and websites, has published the full story of a security attack in October. The headline number: about $740,000 in AI usage was charged to stolen keys.

What happened

Based on our forensic investigation, we believe the attacker was specifically targeting AI provider credentials, that they could sell to distributed transfer stations for use in distillation.

On October 20, an attacker found an unknown flaw in Railway's build system and partly escaped the sandbox that is supposed to keep each customer's work separate. From there they took a copy of Railway's own source code, used it to look for more weak spots, and on October 21 decrypted stored settings, called environment variables, for at most 1.85% of workspaces, about 100,000. Railway removed the attacker from its systems by 09:24 UTC that morning.

Those settings often hold secret keys. Railway says the attacker was looking for one kind in particular:

Based on our forensic investigation, we believe the attacker was specifically targeting AI provider credentials, that they could sell to distributed transfer stations for use in distillation.

In plain language: the keys that let an app use services like OpenAI, Anthropic or Google's Gemini were the prize. Railway says the stolen keys were later used for coding agents and AI training work, consistent with resellers who offer cheap access to AI models using other people's accounts. Distillation means using a strong model's answers to train a cheaper copy.

The attacker also got linked-account tokens, including GitHub logins and AI agent keys, for 1,852 users. Railway reset all of them and says it found no logins to Railway accounts with the stolen credentials, and no sign that customer databases were accessed.

Who pays the $740,000

Railway alerted GitHub, GitLab, Anthropic, OpenAI, OpenRouter, Google, Stripe and others so they could cancel exposed keys. It says it will cover charges that AI providers refuse to refund. iTnews reports that Amazon and Google started refunds under their fraud policies, while OpenRouter applies a no-refund policy.

Not a one-off

Railway describes this as "one of a series of attacks on platforms that hold AI keys." OpenCode, Warp and Fireworks AI disclosed similar thefts in October. Railway also says it was fighting attackers using AI tools themselves, including models with their safety limits removed.

What to do if you use AI keys

  • If you've ever pasted an AI API key into a hosting platform, a no-code tool or a chatbot builder, rotate it now and delete keys you don't use.
  • Set a monthly spending limit with your AI provider, so a stolen key can't run up a huge bill.
  • Watch your usage dashboard for activity you don't recognise.

Sources

Source: blog.railway.com