AI hack · Security research · 25 Feb 2026Reclassified as a bugGoogle says it blocks leaked keysExploitation not known

Google API keys published in web pages quietly gained access to Gemini, Truffle Security found

Truffle Security reported on 25 February 2026 that public Google API keys, like those in Maps pages, 3 sourcesTruffle SecurityGoogle API Keys Weren't Secrets. But then Gemini Changed the Rules.25 Feb 2026 · first-handThe Hacker NewsThousands of Public Google Cloud API Keys Exposed with Gemini Access After API Enablement28 Feb 2026The RegisterDev stunned by $82K Gemini API key bill after theft3 Mar 2026 once their project turned it on. It counted 2,863 live keys. Google dismissed the report as intended behaviour in November 2025, then 2 sourcesThe Hacker NewsThousands of Public Google Cloud API Keys Exposed with Gemini Access After API Enablement28 Feb 2026The RegisterDev stunned by $82K Gemini API key bill after theft3 Mar 2026 after 1 December, The Register reports. Google says it has put in measures to detect and block leaked keys that try to reach Gemini.

By Chris Hoskins, Founder, Boogey ·

Tap underlined words to see who reported them.

2,863

3 sourcesTruffle SecurityGoogle API Keys Weren't Secrets. But then Gemini Changed the Rules.25 Feb 2026 · first-handThe Hacker NewsThousands of Public Google Cloud API Keys Exposed with Gemini Access After API Enablement28 Feb 2026The RegisterDev stunned by $82K Gemini API key bill after theft3 Mar 2026

Unrestricted

3 sourcesTruffle SecurityGoogle API Keys Weren't Secrets. But then Gemini Changed the Rules.25 Feb 2026 · first-handThe Hacker NewsThousands of Public Google Cloud API Keys Exposed with Gemini Access After API Enablement28 Feb 2026The RegisterDev stunned by $82K Gemini API key bill after theft3 Mar 2026

$82,314

3 sourcesTruffle SecurityGoogle API Keys Weren't Secrets. But then Gemini Changed the Rules.25 Feb 2026 · first-handThe Hacker NewsThousands of Public Google Cloud API Keys Exposed with Gemini Access After API Enablement28 Feb 2026The RegisterDev stunned by $82K Gemini API key bill after theft3 Mar 2026

Not known

SourceThe Hacker NewsThousands of Public Google Cloud API Keys Exposed with Gemini Access After API Enablement28 Feb 2026

How a public key became a Gemini key

  1. Step 1

    Public by design

    Google told developers for years that API keys are 2 sourcesTruffle SecurityGoogle API Keys Weren't Secrets. But then Gemini Changed the Rules.25 Feb 2026 · first-handThe RegisterDev stunned by $82K Gemini API key bill after theft3 Mar 2026 in browser code, Truffle says. Its Maps documentation says to paste the key into HTML.

  2. Step 2

    Open by default

    New Google Cloud API keys were 3 sourcesTruffle SecurityGoogle API Keys Weren't Secrets. But then Gemini Changed the Rules.25 Feb 2026 · first-handThe Hacker NewsThousands of Public Google Cloud API Keys Exposed with Gemini Access After API Enablement28 Feb 2026The RegisterDev stunned by $82K Gemini API key bill after theft3 Mar 2026.

  3. Step 3

    Gemini switched on

    Turning on the Gemini API in a project 3 sourcesTruffle SecurityGoogle API Keys Weren't Secrets. But then Gemini Changed the Rules.25 Feb 2026 · first-handThe Hacker NewsThousands of Public Google Cloud API Keys Exposed with Gemini Access After API Enablement28 Feb 2026The RegisterDev stunned by $82K Gemini API key bill after theft3 Mar 2026 already in its web pages call Gemini.

  4. Step 4

    Copy and call

    Truffle describes the attack as trivial, since it means copying a key from SourceTruffle SecurityGoogle API Keys Weren't Secrets. But then Gemini Changed the Rules.25 Feb 2026 · first-hand and calling Gemini.

  5. Step 5

    Files and the bill

    A working key could read files and cached context stored through the Gemini API, and 3 sourcesTruffle SecurityGoogle API Keys Weren't Secrets. But then Gemini Changed the Rules.25 Feb 2026 · first-handThe Hacker NewsThousands of Public Google Cloud API Keys Exposed with Gemini Access After API Enablement28 Feb 2026The RegisterDev stunned by $82K Gemini API key bill after theft3 Mar 2026 to the key's owner.

Truffle says an attacker could run up SourceTruffle SecurityGoogle API Keys Weren't Secrets. But then Gemini Changed the Rules.25 Feb 2026 · first-hand a day on one account, and use up its quotas until legitimate Gemini services stop.

Truffle says the victims included major financial institutions, security companies, global recruiting firms and SourceTruffle SecurityGoogle API Keys Weren't Secrets. But then Gemini Changed the Rules.25 Feb 2026 · first-hand.

Why old keys got new powers

Truffle calls it SourceTruffle SecurityGoogle API Keys Weren't Secrets. But then Gemini Changed the Rules.25 Feb 2026 · first-hand, a key gaining powers it was never meant to have, rather than a misconfiguration.

  • One format, two jobs

    Google uses one key format for keys meant to be public and keys meant to be secret. Truffle says that leaves 3 sourcesTruffle SecurityGoogle API Keys Weren't Secrets. But then Gemini Changed the Rules.25 Feb 2026 · first-handThe Hacker NewsThousands of Public Google Cloud API Keys Exposed with Gemini Access After API Enablement28 Feb 2026The RegisterDev stunned by $82K Gemini API key bill after theft3 Mar 2026 between them.

  • Never meant as a login

    The keys were never meant to prove who is calling SourceThe RegisterDev stunned by $82K Gemini API key bill after theft3 Mar 2026, The Register says.

  • Easy to find

    Every key starts with the same four letters, which makes them SourceThe RegisterDev stunned by $82K Gemini API key bill after theft3 Mar 2026, The Register says.

  • Old keys, new powers

    Truffle says a key it tested on a Google product's public website had been public since at least February 2023, 2 sourcesTruffle SecurityGoogle API Keys Weren't Secrets. But then Gemini Changed the Rules.25 Feb 2026 · first-handThe RegisterDev stunned by $82K Gemini API key bill after theft3 Mar 2026.

In a similar report, Quokka found over 35,000 unique Google API keys in SourceThe Hacker NewsThousands of Public Google Cloud API Keys Exposed with Gemini Access After API Enablement28 Feb 2026, The Hacker News says.

“The pattern we uncovered here (public identifiers quietly gaining sensitive privileges) isn't unique to Google”
SourceThe RegisterDev stunned by $82K Gemini API key bill after theft3 Mar 2026

One startup's bill

A developer says his startup's Google Cloud API key was 3 sourcesTruffle SecurityGoogle API Keys Weren't Secrets. But then Gemini Changed the Rules.25 Feb 2026 · first-handThe Hacker NewsThousands of Public Google Cloud API Keys Exposed with Gemini Access After API Enablement28 Feb 2026The RegisterDev stunned by $82K Gemini API key bill after theft3 Mar 2026 between 11 and 12 February 2026, The Register reports. He reported $82,314 in charges. His three-developer company in Mexico usually spends 3 sourcesTruffle SecurityGoogle API Keys Weren't Secrets. But then Gemini Changed the Rules.25 Feb 2026 · first-handThe Hacker NewsThousands of Public Google Cloud API Keys Exposed with Gemini Access After API Enablement28 Feb 2026The RegisterDev stunned by $82K Gemini API key bill after theft3 Mar 2026. That figure is one victim's reported charges, not the cost of the flaw. He says he deleted the key and rotated credentials, then SourceThe RegisterDev stunned by $82K Gemini API key bill after theft3 Mar 2026 with a Google support case. Google SourceThe RegisterDev stunned by $82K Gemini API key bill after theft3 Mar 2026 whether it will make him pay.

From report to response

  1. Nov 2025

    Google's Vulnerability Disclosure Project team dismisses the report as 2 sourcesThe Hacker NewsThousands of Public Google Cloud API Keys Exposed with Gemini Access After API Enablement28 Feb 2026The RegisterDev stunned by $82K Gemini API key bill after theft3 Mar 2026, The Register reports.

  2. 1 Dec 2025

    Truffle pushes back with examples from 2 sourcesTruffle SecurityGoogle API Keys Weren't Secrets. But then Gemini Changed the Rules.25 Feb 2026 · first-handThe RegisterDev stunned by $82K Gemini API key bill after theft3 Mar 2026.

  3. After 1 Dec

    Google reclassifies the report SourceThe RegisterDev stunned by $82K Gemini API key bill after theft3 Mar 2026, raises the severity and asks for the list of 2,863 keys.

  4. 2 Feb 2026

    Google tells Truffle it is still working on the SourceThe RegisterDev stunned by $82K Gemini API key bill after theft3 Mar 2026.

  5. 25 Feb

    Truffle 3 sourcesTruffle SecurityGoogle API Keys Weren't Secrets. But then Gemini Changed the Rules.25 Feb 2026 · first-handThe Hacker NewsThousands of Public Google Cloud API Keys Exposed with Gemini Access After API Enablement28 Feb 2026The RegisterDev stunned by $82K Gemini API key bill after theft3 Mar 2026.

A Google spokesperson says Google has worked with the researchers and implemented measures to 2 sourcesThe Hacker NewsThousands of Public Google Cloud API Keys Exposed with Gemini Access After API Enablement28 Feb 2026The RegisterDev stunned by $82K Gemini API key bill after theft3 Mar 2026 that try to reach the Gemini API.

The Boogey fix

Could a key in your web page unlock your AI?

You’re exposed if

  • Your web pages, app or embed snippet carry a key meant to be public, such as a Maps or Firebase key, or a widget key your product hands out.
  • That key, or the project behind it, can also reach an AI model, uploaded files or saved context.
  • Your keys work for every API you turn on, unless someone limits each one.
  • A key that can reach a paid model has no spending cap of its own.

Fix it

  1. 01Two kinds of key

    Give keys meant for pages and apps their own prefix, and have your server refuse them on every AI and file endpoint. Your agent calls the model with a secret key that never leaves your server. Truffle says Google's single key format SourceTruffle SecurityGoogle API Keys Weren't Secrets. But then Gemini Changed the Rules.25 Feb 2026 · first-hand.

  2. 02New keys start with nothing

    A new key reaches no API until someone names the ones it may call. Truffle found Google's new keys 3 sourcesTruffle SecurityGoogle API Keys Weren't Secrets. But then Gemini Changed the Rules.25 Feb 2026 · first-handThe Hacker NewsThousands of Public Google Cloud API Keys Exposed with Gemini Access After API Enablement28 Feb 2026The RegisterDev stunned by $82K Gemini API key bill after theft3 Mar 2026.

  3. 03Adding AI widens no key

    When you turn on an AI feature, existing keys stay exactly as they were. Show which keys could reach the new feature, and require a yes for each one.

  4. 04Files follow the user

    Open uploaded files and saved context only for the signed-in user who made them, never for a key alone. Truffle says Gemini's file and cache endpoints can expose SourceTruffle SecurityGoogle API Keys Weren't Secrets. But then Gemini Changed the Rules.25 Feb 2026 · first-hand.

  5. 05A cap on every paying key

    Give each key that can reach a paid model its own daily spending cap, and refuse its calls once it hits the cap. Truffle says an attacker could run up SourceTruffle SecurityGoogle API Keys Weren't Secrets. But then Gemini Changed the Rules.25 Feb 2026 · first-hand on one account.

On your platform

Settings you already have that help against this hack. Last checked 1 Dec 2026.

  • Install the two security plugins

    /plugin install security-guidance@claude-plugins-official, then /plugin install claude-security@claude-plugins-official and run /claude-security. Or run /security-review on a change.

    How

Every setting for every platform

How we test it

  1. 1Under a signed scope, our test user signs in to your staging, or a test account we create, and gets the public key your product hands out for a widget, app or embed. Nothing to install. We use only keys our test account creates, never live ones.Being built
  2. 2The test user asks your agent to work with canary files we provide, fake documents we can trace, so your AI feature stores them and keeps their context.Being built
  3. 3From a signed-out browser, as anyone who copied it from a page could, we send that key only to the file and saved-context endpoints your scope names, a few requests a second, asking only for our canaries.Being built
Built
BT-10 · Leaked AI keys and secrets, and the abuse that followsBT-06 · Over-scoped tokens and agent identityBT-12 · Broken access control on AI feature APIs and consoles

It fails if

  • The public key gets a list of the test user's files
  • It returns one of our canary files
  • It returns saved context from the test user's chats
Get started

Does your product hand out keys for a widget, an app or an embed? This test is still being built.

What it reveals

A key you published years ago is only as safe as the most powerful API it can reach today. Adding AI changes that answer for every key already out there.