Alternative link
A website reflected the URL path into a hidden input on its cookie consent pop-up without filtering it, so a crafted path could break out of the attribute and run script. An attacker could trigger script execution in a victim's browser, but only while the cookie notice was still undismissed.
0x00sec.org
Published on 0x00sec.org
vict0ni March 2, 2020, 9:33pm 1
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 URL was echoed into a hidden input's value attribute without encoding, allowing attribute breakout.
Impact
Script could run in the visitor's browser, but only while the cookie pop-up was still ignored; once cookies were accepted the vulnerable code was gone.
What the attacker needed
Victim ignores the cookie pop-up; victim visits a crafted URL
How it was found
- Put a test string of common XSS characters as a subdirectory in the URL.
- Load the page and inspect the source to find where the URL is reflected.
- Note that two reflections are sanitised but the hidden 'redirected' input reflects it raw.
- Craft a URL that closes the attribute and adds an SVG with an onload handler.
- Load that URL in a private session without accepting the cookie notice to trigger 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.
When you visit a page, the site sometimes copies part of the web address back into the page. Here it copied the address into a hidden form field on a cookie banner without cleaning it, so special characters could close the field and add new code. That let an attacker make the browser run their script, but only if the visitor had not yet clicked 'Accept' on the banner.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.