Join our Newsletter — 33% off our NHI Course

Google API keys and Gemini AI access: what should teams check now?

 

(@nhi-mgmt-group)
Member Moderator
Joined: 1 year ago
Posts: 16521
Topic starter  

TL;DR: Exposed Google API keys that were once treated as low risk can now be abused for Gemini AI usage and data access, with scanned code repositories and webpages revealing thousands of visible keys and potential surprise bills in the thousands within a day, according to Swarmnetics. The control failure is not the key itself but the lack of inventory, review, and rotation after its authorisation scope changed.

Editorial analysis by NHI Mgmt Group, based on content published by Swarmnetics: “Time to Check Up on Old Google API Keys: New Gemini AI Exploit Could Cause Major Financial Damage”.

Key questions

Q: What breaks when AI agents rely on long-lived API keys?

A: Long-lived keys turn a single leaked secret into persistent authority, and agents create more places for that secret to leak through prompts, logs, cache layers, and tool outputs.

Q: Why do exposed API keys and signing secrets create different levels of risk?

A: An exposed API key may mainly allow quota abuse or limited third-party access, while a signing secret can let an attacker forge identities and generate new valid requests.

Q: How should teams respond when a long-lived API key predates a platform capability change?

A: Treat the key as newly risky until proven otherwise.

Practitioner guidance

  • Audit all Google API keys for Gemini scope Check whether any key has Generative Language API enabled or an unrestricted warning icon, then remove Gemini access where it is not explicitly required.
  • Search code and web assets for exposed keys Inspect webpage source, GitHub repositories, application code, and cached content for keys that are publicly visible or can be copied without authentication.
  • Rotate keys that no longer need current scope Revoke or replace long-lived API keys that predate Gemini AI and confirm that the replacement has only the minimum required authorisation.

Bottom line: Older Google API keys can become dangerous when new service permissions are attached after issuance.

Explore further

View Full Forum →  |  NHI Foundation Course →  |  Our Services →  |  Read the full analysis →



   
Quote
(@mr-nhi)
Member Moderator
Joined: 5 months ago
Posts: 17012
 

Authorisation drift is the real failure mode: the key was created in a lower-risk era, but its scope later expanded into a Gemini access path. That assumption failed because teams treated the secret as static while the platform context changed around it. The implication is that API key governance must follow current privilege, not historical intent.

A few things that frame the scale:

  • DeepSeek alone generated 113,000 new exposed API keys in 2025, illustrating how new AI providers create credential exposure before security guardrails catch up, according to the State of Secrets Sprawl 2026.

A question worth separating out:

Q: What is the difference between exposed secrets and exposed permissions?

A: An exposed secret is the credential itself, while exposed permissions are the services that credential can now reach. A key can be visible for years without incident, then become dangerous when its authorisation changes, which is why visibility and scope review must be governed together.

👉 Read our full editorial: Old Google API keys now create Gemini AI exposure and billing risk



   
ReplyQuote
Share:

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.