# I Tracked Your Location Without Your Permission ## How a Misco
A cloud function that returns precise GPS coordinates had a CORS policy allowing any origin to read the response. An attacker could host a malicious page that silently fetches the victim's location without any user interaction.
Published on medium.com
I started poking around their web setup. Just casually.
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 CORS configuration on the cloud function set Access-Control-Allow-Origin to a wildcard, allowing any origin to read the response.
Impact
Any website could silently read a visitor's precise GPS coordinates without any user interaction, potentially affecting up to 500 million monthly active users.
What the attacker needed
Victim visits a malicious webpage; no user interaction required
How it was found
- The attacker sends a request to the geoip endpoint with an Origin header set to a malicious site.
- The server responds with the location data and a wildcard CORS header.
- The attacker creates a webpage that fetches the endpoint and forwards the data to their own server.
- The attacker hosts the page and opens it in a browser.
- The browser console shows the location data was received and sent to the attacker.
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.
Websites use a rule called CORS to decide which other websites can read their data. This API said 'any website can read me', so a malicious page could quietly ask for the visitor's location and send it to the attacker. The visitor would not see any popup or warning.
What is CORS?
A permissive cross-origin policy lets another site read responses with the user's credentials.