
Most companies guard their customers' credit card numbers like gold. Encrypted, audited, locked away.
The AI API Key sitting in a config file? That one often gets far less care.
Attackers have noticed.
A $740,000 wake-up call.
In October, hackers broke into Railway, a popular cloud hosting platform, and went looking for something specific. Not customer databases. Not source code. AI Keys.
Railway later said the stolen AI provider keys were used to run up roughly $740,000 in unauthorized usage. Up to about 100,000 workspaces may have had their secrets exposed. Railway's investigation found no evidence that customer code or databases were touched, The attackers didn't need them. The Keys were the prize.
Around the same time, Fireworks AI, a company that runs AI models for other businesses, disclosed a widening breach. Attackers reached billing data and, for some customers, secrets, datasets, and incomplete model weights. The damage spread to its customers too: Notion said AI chat transcripts from under 1% of its workspaces were exposed.
Two breaches. One lesson. AI credentials are now a primary target.
Why attackers want your AI keys
There's even a name for it: LLMjacking. It means stealing access to AI models through stolen keys or cloud credentials, reselling that access, and leaving the victim with the bill.
The appeal is simple. A stolen password needs work before it pays off. A stolen AI key turns into money within hours. Researchers at Wiz saw two stolen enterprise keys used for around 800,000 and 1.7 million calls to Amazon's Bedrock AI service, likely more than $100,000 in usage.
Where the comparison breaks down
Here's the uncomfortable part. When your credit card is stolen, the bank usually covers the fraud.
AI Keys don't come with that safety net. Railway itself told customers it couldn't refund spend made with compromised keys, though it later said it would cover charges that providers refuse to refund. Some providers are processing fraud refunds. Others review claims case by case, and at least one declined.
So in practice, the bill may be yours.
How to protect your AI keys
None of this requires a big security budget. It requires treating these keys like money, because they are.
Set spending caps and alerts on every key. This is the single most effective step. A cap turns a six-figure disaster into an annoying email.
Never put keys in your code or your front end. Not in the repository, not in a mobile app, not in browser JavaScript. Use a secrets manager and keep keys on the server side.
One key per app and environment. Separate keys for production, staging, and each service. If one leaks, you know where it came from and only one thing breaks when you revoke it.
Give keys the smallest scope possible. If a provider lets you limit a key to certain models or projects, do it.
Rotate keys regularly, and immediately after any vendor incident. Rotation is far easier if it's a routine task rather than an emergency.
Watch your usage like you watch your bank account. A sudden spike at 3 a.m. is rarely your team working late.
Know where your keys live. Every platform you store keys on, from hosting to CI to AI tools, is now part of your attack surface. Both of last month's breaches came through infrastructure the victims trusted.
Don't paste secrets into AI chats. After the Notion exposure, users who had typed passwords or API keys into AI conversations were told to change them right away.
The bottom line
We spent twenty years learning how to protect payment data. AI keys need the same respect now, and most teams aren't there yet.
The good news is that the fixes are simple. The bad news is that attackers are already counting on you not making them.
References
- BleepingComputer: Railway breach leads to $740,000 in fraudulent AI charges
- The Hacker News: Railway says stolen customer AI keys led to $740,000 in charges
- iTnews: Railway attackers ran up US$740,000 on stolen AI keys
- BleepingComputer: Fireworks AI discloses new breach after cloud provider hack
- eSecurity Planet: Fireworks AI second breach exposes Notion chat transcripts
- The Register: Fireworks AI gets burned twice


