DOM XSS on https://www.███████
A page read the URL fragment and used it directly as the source of an iframe, so a crafted link could run JavaScript in the site's origin. An attacker could execute arbitrary JavaScript on another user who opened the link.
- Triaged in 1 hour
- Fixed in 58 days
- Disclosed after 3 months
#Description DOM XSS can be achieved due to missing sanitation when setting the source of an iframe.
#POC
- Visit https://www.████frame.html#javascript:alert(document.domain)
- View alert
#Vulnerable Code
function Load()
{
str=document.location.hash,idx=str.indexOf('#')
if(idx>=0) str=str.substr(1);
if(str) PPTSld.location.replace(str);
}
Impact
An attacker could execute arbitrary javascript on another user.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
The page took the URL fragment and passed it to an iframe's location.replace without validating or sanitising it, allowing a javascript: URL to execute.
Impact
An attacker could execute arbitrary JavaScript on another user who opens a crafted link.
What the attacker needed
Victim clicks a crafted link
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 report has not been written yet. The Original tab links to the source.
A web page can read the part of the address after the # symbol, called the fragment. This page put that text straight into an iframe, which is an embedded window. Because the text was not checked, a link could make the iframe run JavaScript as if it came from the site itself.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.