Google Cloud customer wakes up to $18,000+ bill despite $7 budget, thanks to forgotten API key in published project — attacker put in 60,000+ requests and blasted through $1,400 spending cap
Turns out the safety measures are all turned off by default.
Australia-based AI consultant and founder of Agentic Labs Jesse Davies woke up to an unpleasant surprise earlier this month: A Google Cloud bill of $25,672.86 AUD (approximately $18,391.78 USD) — even though there was a budget of $10 AUD (approximately $7 USD) on his account. And it happened overnight.
According to Davies' account on LinkedIn, he was well-versed with Google AI Studio and had followed practices such as per-project API keys, separate billing accounts, two-factor authentication, and Cloud audit logging. However, it only took a single weak link to nullify those precautions, as evidenced by the shockingly large overnight bill. On top of that, Davies found nine Google Cloud safety features that should have prevented this incident — but that were turned off by default.
"The attacker didn't steal my key. They found a Cloud Run service I'd published from AI Studio months earlier, hit the public URL, and Google's own proxy signed every request on their behalf using the API key stored as a plaintext environment variable in the container," Davies wrote in his LinkedIn post.
"Even though it was public, the link wasn't shared or indexed anywhere. By the time I got a budget alert the next morning, A$10,000 had already been charged to my credit card, now getting insufficient funds. I was still talking to Google support when A$15,000 more came through."
What’s worse was that Google automatically upgraded the tier of Davies' account without any notification. The account was initially at Tier 2, which had a $2,000 limit, but Google automatically upgraded it to the next level when the account crossed the $1,000 threshold during the incident. This increased the cap to between $20,000 and $100,000. While this is likely designed to make it easier for a service to scale, it also has the unwanted effect of costing the user more than intended, e.g. if they are the victim of an attack.
Went to bed with a $10 budget alert. Woke up to $25,672.86 in debt to Google Cloud. from r/googlecloud
Their headaches did not end here, though. It took several days before Davies was able to get through to a real human customer support. Thankfully, it seems that the charge has been waived, while the transactions that actually pushed through were credited back by their bank. Still, the issue isn’t settled, and Davies has a meeting scheduled with Google managers to talk about the case.
Davies also shared the experience on Reddit, on the r/googlecloud subreddit, and asked if other users had similar stories to share. It turns out they did — several other users reported getting hit with insane bills, including one commenter from Japan who said that they were hit with a $44,000 bill that ballooned to $128,000 even after they paused the API. And last month, we covered a case in which an API thief racked up $82,314.44 in charges on an account that typically saw around $180 per month.
Cybersecurity firm Truffle Security Co. has already highlighted the risks associated with Google Cloud using a single API key format. These API keys were previously used as project identifiers, but when the Gemini API is activated on any Google Cloud project, these existing API keys become Gemini credentials — allowing anyone who can copy them to rack up AI bills. So... it's likely we'll see more horror stories of shocking API bills if Google doesn't update its Gemini policies.
Follow Tom's Hardware on Google News, or add us as a preferred source, to get our latest news, analysis, & reviews in your feeds.
Get Tom's Hardware's best news and in-depth reviews, straight to your inbox.

Jowi Morales is a tech enthusiast with years of experience working in the industry. He’s been writing with several tech publications since 2021, where he’s been interested in tech hardware and consumer electronics.
-
Mindstab Thrull Either the company issuing the charge (in this case Google) or the financial institution should have flagged the charges and contacted the customer if this showed any sort of unusual behaviour for the customer. I would presume the individual in question is likely not in the habit of running up bills in excess of 25k AUD in a roughly 24h span from a single service. Even RAM isn't that obscenely priced currently! Google's accounting department would be the first line of defense - but the bank or whatever should have been the second. As soon as charges came up - higher than usual, a bunch together, something - the bank should have kicked in and put a hold on the card automatically until they talked to the customer. They don't want to be on the hook for thousands or more if they can avoid it.Reply
Glad to see Davies isn't on the hook for this. At least that's a silver lining. Companies need to do better, and even if "but AI!" It needs to be trained on what to look for first! -
antoshkaplus I had a similar situation recently. I had an abandoned project on public github with public Google Translate API key. Someone started using it and made me a $100 bill. Interestingly it happpened only now. Like someone is building AI agents to do exactly that.Reply -
Mr Giggles This exact thing keeps me up at night. The best you can hope for are alerts. As a solo personal dev hobbyist I wish that every cloud service had credits you could buy instead of just giving companies a signed blank check. Like if my API key is stolen somehow and it burns through my $50 in credits, I can recover from that.Reply -
alan.campbell99 Damn, that's a hell of a rude awakening. Indeed, where were the 'lines of defense' here?Reply -
Exploding PSU I'm no programmer and I'm not going to pretend to be one... but what exactly did the attacker gain from doing this? It seems like the only one earning money here is Google..Reply -
Math Geek It is clearly not defined at all what the "public API key" is and what it does.Reply
From other such stories I believe this key leak lets random people use "AI time" which costs the account per use.
So someone found this and got 60,000 free AI uses with it being charged to this poor guy without him being able to stop it.
There are safeguards but as noted, they were all off by default. So the attacker was able to just go nuts unchecked. -
nameless0ne I would also like to know - is there any way for the attacker to directly convert these tokens to money? I understand that they could build a service and sell it using those tokens. But that takes time and specific demand.Reply
Did they just burn those tokens for LULZ?