Skip to content
Info disclosure Write-up Beginner

How I proved impact with Google Map API Key

A Google Maps API key was exposed in the page returned at a non-existent directory path, and the author showed that the key could be used to send many billable Places API requests. An attacker with the key could run up charges on the key owner's account.

medium.com

Published on medium.com

In this story, I will share a method how to prove impact when we find google map API key. In my bug hunting journey, I found google map API key.

r0b0ts, on medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the Google Maps API key was embedded in a publicly reachable page without restrictions on which sites or APIs could use it.

Impact

An attacker could send many billable requests with the exposed key, which could cause financial cost to the key owner; the report was closed as a duplicate.

What the attacker needed

Exposed Google Maps API key; key not restricted to allowed APIs or sites

How it was found

  1. Run Nuclei with default and custom templates against the target.
  2. Notice the google-api-key template matched in a non-existent directory path.
  3. Confirm the path redirects to the base page, which contains the key.
  4. Search for the key across scripts and pages with Burp Suite.
  5. Test the key with the keyhacks tool to see which APIs accept it.
  6. Run a script that sends many Places text search requests with the key.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

An API key is a password-like string that lets a program use a paid service, here Google Maps. The key was visible in a web page, so anyone could copy it and make requests that the owner pays for. The author wrote a small script that sends many requests to show the cost risk.

What is Info disclosure?

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.

Similar reports

View all

Same bug class and techniques, clearest first.

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.