Skip to content
Burnproof

Blog

How a leaked API key turns into a $55,000 bill

NextPlay Solutions · October 16, 2026

A stranger does not need an account on your app to spend a provider key. If the key is sitting where they can copy it, the invoice goes to the project that issued the key. One public write-up shows how far that can go.

What was posted

On September 23, 2025, a student posted in r/googlecloud that a Gemini API key had been pushed to GitHub on June 6. They believed the repository was private. They wrote that the key was visible in a single commit they had missed. On September 7, another GitHub user told them the key had been public and that other people were using it.

The post title is a $55,444.78 Google Cloud bill. In the body they said the total they saw was $55,444. They said they had been using the $300 student credit and had spent about $80 of it themselves. They described two invoices: $732 in June, which was not charged because the card on file had expired, then more than $31,000 in August and about $21,000 from September 1 through September 7. They wrote that they revoked the key and that Google Cloud billing support left the charges in place. This page is not an audit of that account. It is what the poster said happened to them.

The bill does not care how the key leaked

That story is a GitHub commit, not a Lovable export. The charge works the same way if a coding agent puts the key in a client component so the demo runs. Lovable, Bolt, Cursor, v0, and Replit will do that. The browser then downloads the key with the rest of the app. View source is enough. OpenAI, Anthropic, Gemini, and Stripe bill the account that created the key, not the person who pasted it into their own script.

A key can sit there for months. In the post, the gap between the push and the warning was June 6 to September 7. Nothing in that thread says a budget alert stopped the usage. Commenters argued about hard caps. A notification you never see is not a lock on the key.

Before you take a payment

Rotate any key that already shipped. Deleting it from the repo does not un-leak a bundle or a commit that is already public. Move provider keys into server-only environment variables. Confirm the public site is not serving /.env or /.git/config.

Burnproof reads the public page and a few same-origin scripts. It does not call Gemini, OpenAI, or your database with a key it finds. A low score is not a promise that the app is safe. It is a look at what a stranger can already see.

Scan the app before the first customer

Paste a URL you own. The free scan takes about a minute and masks anything that looks like a key.

Scan free