How I Found a Location Spoofing Vulnerability in a Chrome Extension
A Chrome extension that spoofs geolocation accepted messages and DOM events from any website without checking the sender or origin. An attacker could therefore set a victim's reported location on any site, bypassing region locks and geo-based checks.
Hello gusy! This was my first real attempt at digging into Chrome extensions.
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 extension's message listener and content-script event handler trusted input from any origin, with no sender or origin validation before updating the spoofed coordinates.
Impact
An attacker could fake a user's location across any site, potentially bypassing region locks or tricking systems that rely on geolocation, with no user interaction and without the VPN being on.
What the attacker needed
Victim has the extension installed; victim visits an attacker-controlled site; no user interaction needed
How it was found
- Unpack the extension and find the code that overrides the geolocation function.
- Notice the spoofed coordinates come from messages and DOM events.
- Send a runtime message from a website with spoofing settings and coordinates.
- Observe the extension responds without any permission prompt.
- Dispatch a custom DOM event with coordinate data that updates the spoofing variables.
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 browser extension is a small program added to Chrome that can change how web pages behave. This one was meant to fake your location, but it listened for instructions from any website and never checked who sent them. So any page you visited could quietly tell the extension to report a different location.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.