Skip to content
XSS Disclosed report Intermediate CVE-2024-26283

Address bar spoofing using firefox://open-url in Firefox iOS

Firefox iOS allows the firefox://open-url scheme to open javascript: URLs, and the address bar displays only the part after '://', enabling an attacker to spoof the address bar and execute JavaScript. An attacker could trick a user into believing they are on a legitimate site while running malicious code.

Muneaki Nishimura Follow

Originally disclosed on Mozilla

  • Fixed in 5 months
  • Paid in 5 months
  • Disclosed after 5 months
Text
Created attachment 9350291
address-bar-spoofing-using-open-url.gif

Firefox iOS supports a custom URL scheme called "firefox://open-url" for opening specified URL by Firefox from other apps. Normally, Firefox prohibits opening URLs with javascript: scheme, but when using "open-url", it becomes possible to open them. Additionally, if the URL contains "://" immediately after the URL scheme, the address bar of Firefox iOS shows only the rest of the URL.

These two behaviors make spoofing the address bar.

As an example, consider the following URL:

When the following URL is opened in iOS Safari:
firefox://open-url?url=javascript://google.com%2Fsearch?q=foo%26source=%2F%250adocument.body.innerHTML='%253ch1%2520style=color:red%253eHacked!'

the JavaScript code specified through the URL is executed in Firefox, so the text "Hacked!" is displayed on the screen. And then, the address bar shows "google.com/search?q=foo...".

A reproduction URL is below. Open the page in Safari on an iOS device, and tap the link on the page.
https://csrf.jp/2023/fxios-url-spoof.php

The original report as published on Mozilla's Bugzilla, by Muneaki Nishimura. Images and videos are our own copies; raw HTML is shown as text. View it on Mozilla's Bugzilla.

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

What the attacker needed

Victim uses Firefox iOS; victim clicks a crafted link

How it was found

  1. Open the reproduction page in Safari on an iOS device.
  2. Tap the link on the page that uses the firefox://open-url scheme with a javascript: URL.
  3. Observe that JavaScript executes and the address bar shows a spoofed URL.

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 custom link type in Firefox for iOS can run JavaScript code and make the address bar show a fake website address. This means an attacker can make a harmful link look like it goes to a trusted site, and when clicked, it runs code that changes the page.

What is XSS?

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.

More by Muneaki Nishimura

View all

74 more disclosed reports, best first.

More from Mozilla

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site scripting (XSS)

The lesson behind this report.

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.