Google Play and DevSite XSS
A server-side component reflected part of the URL as HTML on 404 pages, allowing script execution on Google developer sites. On Google Play's search page, a client-side script inserted the unencoded URL into an anchor tag, enabling attribute injection and script execution when a search error occurred.
Due to a vulnerability in the server-side implementation of <devsite-language-selector> part of the URL was reflected as html so it was possible to get XSS on the origins using that component from the 404 page. This was found using DalFox which kept finding the same bug due to it being the “not found” page.
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 server-side component reflected URL content without encoding, and the client-side script inserted the URL into an HTML attribute without escaping.
Impact
An attacker could execute script in a victim's browser on the affected origins, potentially leading to account hijacks, though on Google Play the CSP prevented the exploit.
What the attacker needed
Victim clicks a crafted link
How it was found
- Craft a URL containing HTML markup that breaks out of the expected context.
- Visit the crafted URL on the affected Google site.
- The page reflects the markup as HTML, executing the script.
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.
Cross-site scripting (XSS) is when a website shows user input as code, so an attacker can run their own script in a victim's browser. Here, parts of the web address were placed into the page without proper cleaning, letting a crafted link execute script.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.