Skip to content
Leaked secrets Write-up Beginner

Its 700 Bug People Have Reported Many Times On hacker1

A Google Maps API key was exposed in the browser console of a website, likely because a WordPress plugin stored it in client-side JavaScript. An attacker could reuse the key to make Google Maps API requests, potentially incurring charges on the key owner's account.

Imran Niaz Follow

Published on systemweakness.com

Hi there, hope you are having a wonderful day. My name is Imran and today I am going to tell you about a famous park that is almost everywhere.

Imran Niaz, on systemweakness.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 a WordPress plugin placed the Google Maps API key in client-side JavaScript instead of keeping it server-side.

Impact

Anyone who reads the page source could reuse the leaked key, which may lead to unauthorised API usage billed to the key owner; the text does not show any further impact.

What the attacker needed

Target site uses Google Maps API; key exposed in client-side code; no account needed

The fix

The key should be kept server-side and not embedded in client-side JavaScript, and exposed keys should be restricted and rotated.

How it was found

  1. Visit a website that uses Google Maps address autocomplete.
  2. Open the browser's developer tools and inspect the console and source.
  3. Find the Google Maps API key exposed in the client-side code.
  4. Send a test request to the Google Maps geocode endpoint with the key to confirm it works.

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 like a password that lets a website use another company's service, here Google Maps. If that key is placed in code the browser downloads, anyone can read it and use it for their own requests, which can cost the real owner money. The author found such a key by opening the browser's developer tools.

What is Leaked secrets?

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

More by Imran Niaz

View all

7 more disclosed reports, best first.

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.