Stolen AI Keys Ran Up $740K in Compute, and Railway Covered the Bill

Nov 12, 2026 584 views

Stolen AI keys now have a resale market, and whoever owns the key gets the invoice. Railway, a cloud hosting provider, learned that the hard way. Attackers spent a near 26-hour stretch inside its infrastructure, generated about $740,000 in fraudulent AI usage, and went after provider credentials that they could sell to buyers running model distillation.

Railway disclosed the incident on October 22 and published a follow-up report this week. The company says the investigation is still open, so it isn't sharing the full scope of the exploitation. What it has shared is enough to show how the intrusion unfolded, and why the AI angle matters more than the usual breach story.

How the intrusion unfolded

The attack started on October 20 with a previously unknown vulnerability in Railway's build infrastructure. The attackers got around filesystem isolation protections and grabbed an internal credential, which gave them access to stored build histories. From there they pulled a copy of Railway's internal source code and combed through it for the next way in.

They found one. A trust relationship was configured improperly, and exploiting it gave them broader access across the platform, including credentials capable of decrypting customer environment variables. That's the part that should worry anyone running secrets through a hosting platform. Environment variables are where most teams quietly park their API keys.

Railway describes the response as a race. Its engineers worked around the clock in shifts, and the company calls the situation a "contest of agent speed." The attacker chained exploits, moved laterally across systems, and "probed many potential routes, in parallel." Railway's defenders hardened those routes in parallel. The company's own summary is blunt: "This was not a single breach followed by a single fix."

Railway says the intruders were "fully evicted" on October 21. Before that, they obtained and decrypted a subset of customer variables, roughly 100,000 by the company's count, which it puts at "at most" 1.85% of workspaces. The same breach exposed linked-account tokens for more than 1,850 users, including GitHub and OAuth tokens that Railway says it reset. It also worked with GitHub, GitLab, Anthropic, OpenAI, OpenRouter, Stripe, and others to revoke potentially compromised keys.

The fraudulent AI charges are the detail that stands out. Customers reported that their keys were answering coding questions and running training-data tasks they never started. Railway is working to reimburse affected customers, including charges that providers have declined to refund. So the platform is absorbing a bill that was never its workload, at least for now.

Why attackers want AI keys

Cloud credentials have always been valuable, but AI keys have a few properties that make them especially attractive. They're cheap to harvest at scale, since an attacker can compromise one platform and collect keys from thousands of accounts instead of picking targets one at a time. They also convert directly into compute, and that compute can be resold through so-called AI routers, which give people access to models they couldn't otherwise afford or reach.

That makes stolen access a hot commodity for distillation, the process of training a smaller model to mimic a larger one's answers to cut costs. Frank Dickson of Dickson Research points out that this takes millions of queries. A single account firing off millions of questions is easy to spot. Spread those same questions across thousands of real customers' keys, and each account looks ordinary.

Dickson's analogy is useful: "Think of copying a textbook one page at a time, using library cards that belong to other people." Frontier AI is expensive to buy, the key owner pays the bill, and the thief gets free compute.

David Shipley of Beauceron Security sees the same pattern from a different angle. "AI credentials are becoming the new credit card numbers," he said. He expects what he calls LLMjacking to displace cryptojacking as the cheap, scalable way to make money from compromised infrastructure. Dickson goes further and calls it "the 2026 version of cryptomining," the same playbook with a different output. The difference is that mining burns electricity on your hardware, while this burns budget on your account, and the invoice arrives with your name on it.

Managing identities when machines hold most of the keys

Dickson gives Railway credit for what he calls a "remarkably candid report." The company owns its configuration mistake, admits it can't be certain it found every account the attacker created, and commits to notifying customers faster in the future. Candor doesn't reverse the damage, though. Railway's planned fixes are the more important signal. It's moving to short-lived credentials and logging every decryption event. Dickson's view is that this is the right fix, and that any platform holding customer secrets should copy it.

For Railway customers, Dickson's advice is to treat every secret stored on the platform as stolen until it's rotated. The timing matters. An investigation by Wiz found that stolen keys were tested within 30 minutes of theft and then flooded with traffic four to seven days later. Rotation has to finish before the thief's second wave arrives, which means it can't wait for the next maintenance window.

His recommended order: start with AI provider keys, then rotate cloud, database, and payment credentials. Check AI provider bills and usage logs for traffic your own teams didn't generate, and report unauthorized charges to Railway. Alert on any call from an address you don't recognize. Railway has also told customers to revoke and reissue sensitive environment variables stored on the platform before October 21, to remove public network access to databases, and to review GitHub audit logs, app access, and registry audit logs such as Docker Hub.

Dickson also argues for limiting the blast radius of any single key. Set hard spending caps and usage alerts on every AI key, and scope each one as narrowly as the provider allows. In one case Wiz examined, a key restricted to a narrow set of model profiles kept most of the thief's traffic throttled. A capped key turns a six-figure surprise into a bounded, reportable incident.

Users on other platforms should press their providers with two questions: How are my secrets stored, and who can decrypt them? Dickson's simplest rule is to issue fewer keys. "No one ever said during a key rotation that they wished they had issued more keys," he pointed out.

The broader lesson is about accounting as much as security. A stolen AI key spends real money, and machines now hold most of the keys in circulation. "Protect machine identities like cash, because to a thief, that is exactly what they are," Dickson said. Teams that still treat API keys as configuration details, rather than as financial instruments, are the ones that will keep paying for someone else's coding homework.

Source: Michael Williams · www.csoonline.com

Comments

Sign in to comment.
No comments yet. Be the first to comment.

Related Articles

Hackers stole AI credentials to get $740,000 in free comp...