Stolen Gemini API Key Turned $180 Bill to $82000 in Two Days
A development team in Mexico incurred $82,314.44 in unauthorized charges due to a compromised Google Cloud API key over a 48-hour period.
A development team in Mexico incurred $82,314.44 in unauthorized charges due to a compromised Google Cloud API key over a 48-hour period.
On Feb 11-12, unauthorized access to the "Gemini 3 Pro Image" and "Gemini 3 Pro Text" endpoints resulted in a 455x increase from their typical $180 monthly expenditure.
The developers took immediate steps to mitigate the issue by deleting the compromised key, rotating credentials, and securing their Identity and Access Management (IAM) settings. However, they encountered challenges in resolving the issue with customer support.
Essential Google Cloud Security Measures
Google Cloud emphasizes the "Shared Responsibility Model," holding developers accountable for the security of their credentials. This incident highlights vulnerabilities associated with insecure defaults.
Recent findings by a security firm indicate that nearly 3,000 legacy Google API keys, including those for Google Maps, were exposed on public websites.
A development team in Mexico incurred $82,314.44 in unauthorized charges due to a compromised Google Cloud API key over a 48-hour period.
Google Cloud keys set to "Unrestricted" allow public keys to be used as AI credentials without the owner's awareness when the Gemini API is enabled.
Hard Spending Limits: Set alerts at 50%, 90%, 100% and automatically disable billing when the limit is reached. Key Scoping: Restrict keys to specific APIs and limit access by IP or referrer. Access Control: Utilize short-lived tokens or Workload Identity instead of long-lived API keys. API Quota Caps: Adjust RPM/RPD limits to reflect actual usage.
Unauthorized usage of valid keys can lead to high bills and unauthorized access to files and data within the account. Google Cloud does not default to automatic hard billing cut-offs for unexpected usage spikes.
Developers are advised to implement stringent security measures to prevent unauthorized access. While initial responses to billing disputes may be strict, providing detailed evidence can result in waived charges.
Google has taken steps to disable exposed service account keys detected on public GitHub repositories, though this does not prevent theft from developer endpoints. Proactive misconfiguration checks are essential to avoid excessive cloud bills.
Based on reporting by Cyber Security News.
