Abstract
Firefox's browser interface, written in XUL and HTML, contained DOM-based XSS vulnerabilities where unescaped URLs were inserted into innerHTML. An attacker could execute arbitrary JavaScript in the privileged browser context, bypassing the sandbox and leading to remote code execution.
frederik-braun.com
Published on frederik-braun.com
(This is the part, where we reduce the lighting and shine a flashlight into my face)
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 code built HTML strings by concatenating unescaped values (such as an image URL) and assigned them to innerHTML in privileged browser pages.
Impact
An attacker could execute arbitrary code in the main browser process, bypassing the sandbox, with high reliability across platforms.
What the attacker needed
Victim visits a malicious page; victim hovers over an image in devtools
The fix
Firefox was fixed by sanitising HTML fragments created for privileged documents, and later by forbidding innerHTML and related sinks via a linter.
How it was found
- Visit a malicious web page that contains a crafted image URL.
- Hover over the image in the web developer tools to trigger the tooltip.
- The tooltip code inserts the unescaped URL into innerHTML, executing the injected markup.
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.
Firefox's own settings and tooltip pages are built with web technologies, and some of them inserted untrusted text (like an image URL) directly into the page without cleaning it. That let a malicious website run its own code inside Firefox's trusted interface, which is far more powerful than normal web page code.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.