XSS in Google Finance
A script on Google Finance took a URL parameter naming an external RSS feed and loaded that remote file, then evaluated its contents as JavaScript. An attacker could craft a link that ran arbitrary script in the google.com origin without any user interaction beyond clicking the link.
miki.it
Published on miki.it
On July 11 2013, I reported to Google Security a XSS vulnerability I discovered in google.com main domain, which required no user interaction.
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 charting script trusted a user-supplied URL parameter for a remote feed and passed the fetched response to eval() instead of treating it as inert data.
Impact
An attacker could execute arbitrary script in the google.com origin for anyone who clicked the link, with no further interaction required.
What the attacker needed
Victim clicks a crafted link; attacker hosts a script over HTTPS
The fix
The vulnerability was fixed within days, according to the author.
How it was found
- Open the crafted Google Finance URL containing the external feed parameter.
- The page requests the attacker-hosted JavaScript file over HTTPS.
- The returned script is evaluated and runs in the google.com origin.
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 sometimes let a page fetch data from another site, for example a news feed to show on a chart. Here the page did not just display that data; it ran it as code. Because the code ran as if it came from google.com, an attacker who got someone to open a prepared link could run their own script in that person's browser on Google's site.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.