AI Briefing
KO

€54,000 in Charges in 13 Hours: Unrestricted Firebase Browser Key Triggers Gemini API Calls

·2026.04.17 20:32

Key point

An exposed Firebase browser key triggered automated calls to the Gemini API, resulting in massive charges.

Details

In a project that had only used Firebase Authentication, after Firebase AI Logic was turned on, automated Gemini API requests from outside began pouring in.

As a result, over €54,000 was billed in 13 hours, unrelated to actual user traffic. The budget alert was set at €80, but the alarm went off several hours late, and by the time action was taken, costs had already accumulated to around €28,000.

The abnormal traffic stopped after the API was disabled and credentials were rotated, but Google Cloud support classified this as valid usage and refused a refund or fee adjustment.

The key issues are as follows.

  • An API-unrestricted Firebase browser key, if exposed, can be exploited client-side
  • Because of the delayed cost alert, the damage was only discovered after it had already grown large
  • Support may treat this as normal billing on a system level, even if it isn't technically abuse
  • Google explained that it is introducing spending limits, authentication keys, automatic key blocking, and prepaid billing to reduce such problems

According to Google's response:

  • The Gemini API has billing account caps, and Tier 1 users can be blocked after a $250/month limit
  • project spend caps can also be set
  • All billing reports have an approximately 10-minute delay
  • unrestricted keys will soon be disabled for the Gemini API
  • Keys leaked on the public web can be automatically detected and disabled
  • Keys created in Google AI Studio are restricted to Gemini API only by default
  • Keys created in Google Cloud Console can access a broader scope, requiring per-service restrictions

The author additionally asks the following.

  • Whether there are more similar cases after enabling Firebase AI Logic or Gemini
  • Whether there are stronger protections beyond App Check, quotas, and server-side calls
  • Whether there is an additional dispute channel in such situations

The conclusion of the case is clear. Never put keys in client-side code, and API key restrictions and budget limits must be set — cost defense is a matter of upfront design, not after-the-fact response.

This summary was generated automatically by AI. Check the original for the author's claims and context. Copyright belongs to the original author.

Our guide explains how the AI works. Report summary errors, attribution issues, or removal requests via Contact.