Cracking The Un Code How I Exposed A Leaky Google Maps Api Key And Entered The Hall Of Fame
A Google Maps API key was exposed in the source code of a UN website, allowing an attacker to use the key for their own purposes. The author validated the key and reported it, leading to a fix and Hall of Fame recognition.
Imagine casually browsing the web, only to stumble upon a major security flaw on a United Nations (UN) website. It seems like the stuff of fiction, right?
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 embedded in client-side JavaScript without restrictions, making it publicly accessible.
Impact
An attacker could use the leaked key to make requests to various Google Maps APIs, potentially causing financial loss to the website owner due to usage charges.
What the attacker needed
None
The fix
The API key should be restricted to specific IP addresses, referrer URLs, or mobile apps, and the issue was fixed after reporting.
How it was found
- Intercept requests from the website and inspect the source code.
- Find the Google Maps API key in a JavaScript file.
- Copy the key and use it in a request to Google Maps API to verify 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 a service, such as Google Maps. If the key is visible in the website's code, anyone can copy it and use the service on the website owner's account, potentially costing them money. This report shows how a researcher found such a key and reported it.
What is Leaked secrets?
Keys, tokens or passwords left in public code, apps, logs or responses, that grant real access.