Skip to content
Leaked secrets Write-up Beginner

how I found a Google map it’s worth 300$

A Google Maps API key was exposed in publicly accessible JavaScript files. An attacker could misuse the key, potentially causing extra costs for the company.

medium.com

Published on medium.com

Clario disclosed on HackerOne: Google API key leaks and security… Summary: Hello, when i search your targets and javascript files I found an googleapikey leaks in url =…hackerone.comm

loyalonlytoday, 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 API key was hardcoded in client-side JavaScript files without restrictions.

Impact

The attacker could misuse the API key, potentially causing extra costs for the company.

What the attacker needed

None

How it was found

  1. Enumerate subdomains using tools like subfinder, assetfinder, bbot, and amass.
  2. Combine all subdomains into one file and check which are alive using httpx.
  3. Collect URLs from the alive subdomains using waybackurls, gau, katana, and hakrawler.
  4. Filter for JavaScript files and save them.
  5. Scan the JavaScript files for secrets using tools like mantra and jsecret.
  6. Test the found Google Maps API key using a scanner tool.

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.

A Google Maps API key is like a password that lets a website use Google's map services. If it's left in public code, anyone can take it and use it for their own purposes, which can cost the website owner money.

What is Leaked secrets?

Keys, tokens or passwords left in public code, apps, logs or responses, that grant real access.

Similar reports

View all

Same bug class and techniques, clearest first.

Leaked secrets and credentials

The lesson behind this report.

Keys, tokens or passwords left in public code, apps, logs or responses, that grant real access.