Stolen API Keys Are Costing Companies $100k in Minutes

Hackers are hijacking company AI accounts through stolen API keys and running up massive cloud bills in minutes. Here is what every site or server owner using AI services needs to know.

When your AI account gets hijacked, you get the bill

If you use any AI service through an API — an Application Programming Interface, the connection that lets your website or app talk to a service like OpenAI or Anthropic — you are probably charged by usage. Send more requests, pay more money. That model works fine until someone else starts sending requests using your credentials.

That is exactly what is happening in a wave of attacks researchers are calling “LLMjacking.” Attackers find exposed API keys — the secret passwords that authenticate your connection to an AI provider — and then use those keys to run their own AI workloads on your account. Because AI queries can be expensive, the bills pile up extraordinarily fast. Some businesses have found themselves facing charges of $100,000 or more in a matter of minutes.

How keys end up in the wrong hands

The most common cause is simple carelessness. A developer pushes code to a public GitHub repository with an API key accidentally left in the file. Someone posts a snippet to a forum without redacting their credentials. A key gets hardcoded into an app instead of stored securely. Attackers scan public code repositories constantly, looking for exactly these mistakes. It takes them seconds to find a live key; it can take you days to notice the damage.

Once attackers have a valid key, they do not need to break any further security. They just use the service exactly as you would — except they might be running hundreds of queries per second, burning through your usage quota and your credit card at the same time.

What you should do right now

First, check every project you have for hardcoded credentials. API keys should never sit directly in source code. Use environment variables — settings stored separately on the server — or a dedicated secrets manager instead. Most cloud platforms offer these tools for free.

Second, set spending alerts on every AI service you use. OpenAI, Anthropic, Google, and most others let you define a budget limit or at least send an email when costs exceed a threshold. Enable those today, not tomorrow.

Third, rotate your keys periodically and immediately revoke any key that has ever been exposed publicly — even briefly. Treat an API key exactly like a password: private, temporary, and replaceable.

A sign of things to come

As AI usage spreads to smaller websites and solo developers, this kind of attack will only become more common. The criminals running these schemes are not targeting big corporations specifically — they are scanning for any exposed key they can find. Good credential hygiene used to matter mainly for database passwords. Now it matters for every service your server touches.