Skip to content
Access control Disclosed report Intermediate CVE-2020-6818

Accessing about:* internal pages via intent:// URIs

Firefox for Android's intent:// URI handler failed to block the about: scheme, allowing a malicious website to open internal pages like about:config in a new tab. An attacker could trick a user into tapping a setting to change browser preferences.

Daniel Tomescu Follow

Originally disclosed on Mozilla

  • Fixed in 20 days
  • Paid in 23 days
  • Disclosed after 20 days
Text
Created attachment 9128349
console.html

This issue affects Firefox for Android, tested on v68.5.0.

I noticed that intent:// URIs can be used for opening internal pages (such as about:config or about:accounts) in a new tab. Normally, websites are not allowed to open the internal pages (not in an iframe, new tab or new window), however it seems that the handle for intent:// URIs is missing this this check.

Let's consider the following intent URI:
intent://example.com#Intent;scheme=https;package=org.mozilla.firefox;end

While parsing this URI, Firefox for Android should create an intent that will be sent to "org.mozilla.firefox" (1) package in order to open the host "example.com" (2) using the protocol "https" (3) . In simpler terms, Firefox (1) will open https://example.com - (3)://(2) in a new tab.

Although there are a number of security checks in place (the intent URIs cannot be used with schemes starting with view-source: or javascript: or data: or file: etc), I noticed that it is possible to add an entire about:* internal URI to the "scheme" parameter:
intent://example.com#Intent;scheme=about:config?param=value&%23;package=org.mozilla.firefox;end

The above URI will trick the browser into opening the following URI in a new tab:
about:config?param=value&#://example.com

The above will open about:config page, will pass the param=value GET parameter and will ignore the host "example.com" (2) specified in the intent:// URI because of the hash (#) sign.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

I consider this behavior to represent a security vulnerability because:
1. This does not look like intended behaviour:
   a) about:* internal pages cannot be normally opened via JavaScript, anchors or redirects;but can be opened via the above trick;
   b) the intent:// URIs are validated to not be able to access most of Firefox's sensitive schemes (data, javascript, file, view-source etc), but lacks the check for "about" scheme

 2. This can actually be abused by attackers in order to re-configure / modify some of Firefox's internal settings. the about:* pages are not protected against Click-Jacking (or Tap-Jacking?) types of attacks and are built for users who open them on purpose, "knowing what they are doing".

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

In the example with "about:config",  potential attackers can also pass the "filter" get parameter while opening the URL, in order to only display specific settings. Since a number of the available settings are Boolean, their value can be toggled with a simple tap on the setting. This makes possible an attack scenario where an attacker would:

1. Convince the victim user to tap repeatedly on the screen - let's say through a game - while they visit a website under the attacker's control;
2. Open "about:config" and focus on a specific setting which will be specified via a GET filter: "scheme=about:config?filter=security.data_uri.unique_opaque_origin&%23"
3. Since the victim user is tapping repeatedly, opening the new tab may come as a surprise and some of the taps could toggle the targeted setting;
4. After a reasonable period of time (1-2-3 seconds) open a new tab, so that the user's focus will move from the about:config tab;

Of course, other attack vectors might be put in place for other about: pages:
- tampering with a user's account via about:accounts
- tampering with the browser's cache via about:cache

Demo: http://daniel-tomescu.com/console.php - JavaScript code that will open an intent URI, which will open about:config?filter=security.data_uri.unique_opaque_origin&%23, wait two secconds and open a new tab with https://www.mozilla.org/ to bring the user back to a calm environment.

Demo page is also attached.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

I recommend fixing this vulnerability by:
- adding to the blacklist all intent schemes which start with "about:"
- validating the intent's scheme to only have alphanumerical characters (and maybe the minus sign might also be used);
- warning the user that an internal / sensitive page will open each time such a page is opened.

The original report as published on Mozilla's Bugzilla, by Daniel Tomescu. 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

Root cause

The intent:// URI handler did not include the 'about' scheme in its blacklist of sensitive schemes, allowing internal pages to be opened.

Impact

An attacker could potentially modify Firefox settings or tamper with accounts/cache via internal pages, though the attack requires user interaction and is limited to Firefox for Android.

What the attacker needed

Firefox for Android; victim visits attacker's website; victim taps repeatedly

The fix

The intent scheme should be validated to block 'about:' and only allow alphanumeric characters, and users should be warned when opening sensitive internal pages.

How it was found

  1. Craft an intent:// URI with scheme=about:config?filter=...&%23 and package=org.mozilla.firefox
  2. Host a webpage that opens this intent URI
  3. Convince the victim to visit the page and tap repeatedly
  4. The about:config page opens with the filter applied, and taps may toggle the setting

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.

Firefox for Android lets websites open other apps using special intent:// links. The browser normally blocks dangerous internal pages (like about:config) from being opened by websites, but the check missed the 'about:' scheme. So a malicious site could open a settings page and trick a user into tapping a toggle.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

More by Daniel Tomescu

View all

2 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.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.