Skip to content
Submit incident
AII-1001-13401
ReportedReported by fewer than three independent publishers, with no official finding.Supporting sources are pending verification.

Google API Keys Gain Unauthorized Gemini Access When Service Enabled

Publicly visible Google Cloud API keys, long considered non-sensitive, reportedly gained unauthorized access to Gemini AI endpoints when the generative AI service was enabled on the same cloud project. Security researchers estimate nearly 3,000 such keys are active across websites and public code repositories, potentially exposing private files, cached data, and enabling attackers to incur unauthorized billing costs.

27 February 2026 Β· Google Β· Security and cyberattacks
27 February 2026
AII-1001-13401
Quick facts
Category
Security and cyberattacks
Country
United States
Date
27 February 2026
Drafted by
Raidu Incident Detection

What happened

For over a decade, Google instructed developers to embed API keys directly into client-side HTML and JavaScript for services like Maps and Firebase, stating that API keys were not secrets.

When the Gemini API is enabled on a Google Cloud project, every existing API key in that project automatically gains access to Gemini endpoints with no warning, confirmation dialog, or email notification to the developer.

Security researchers at Truffle Security identified that a key deployed for a Maps service years prior can immediately become a credential capable of accessing Gemini endpoints once the AI service is enabled on the same project.

Reported impact

Nearly 3,000 publicly visible API keys are estimated to be active across websites and public code repositories, including those linked to financial institutions, technology firms, and recruitment platforms.

Attackers can extract exposed API keys from webpage source code and use them to access private files, cached data, and billable inference services through Gemini endpoints, generating unauthorized charges and potentially disrupting services dependent on shared cloud resources.

Index analysis

The vulnerability roots lie in CWE-1188 (Insecure Default Initialization) and CWE-269 (Incorrect Privilege Assignment), where API keys are set to 'Unrestricted' by default, allowing access to every enabled API in the project from creation.

Researchers note that the privilege escalation occurs through the order of events: a developer follows Google's guidelines by placing a Maps key in public JavaScript, then another team member activates the Gemini API on the same project, causing the public key to silently inherit sensitive access.

Governance controls

Google has begun blocking leaked keys from accessing Gemini, tightening default restrictions, and planning user notifications.

However, legacy deployments, especially mobile apps and long-running web services, remain difficult to update immediately.

Classification

Category
Security and cyberattacks
Industry
Digital security
Country
United States
Harm status
Potential harm
Intent
Unintentional
Timing
Post-deployment
Harm types
Economic or property
Harmed
Business, Consumers
Failure modes
Unauthorised scraping
AI systems
Gemini

Sources and evidence

Sources not yet published

This record was researched and written by the Index from original reporting. Its sources are still being verified by an editor, and they are listed here once that check is complete. Until then the record carries no reviewer.

How sources are verifiedSuggest a source for this incident