Skip to content
UI spoofing Disclosed report Intermediate CVE-2017-7770

Location Bar Spoofing Risk using the Fullscreen mode and a new tab loaded using the alert()

In Firefox for Android, entering fullscreen mode and then opening a new tab that triggers an alert() causes the location bar to disappear permanently. An attacker could then display a fake location bar, leading to location bar spoofing.

Jordi Chancel Follow

Originally disclosed on Mozilla

  • Fixed in 4 months
  • Paid in 5 months
  • Disclosed after 4 months
Text
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:49.0) Gecko/20100101 Firefox/49.0
Build ID: 20161019084923

Steps to reproduce:

Steps to reproduce:

When you go on the fullscreen mode and you load after a new tab with the alert(); , the location bar has disappeared.

1 : Go on http://www.alternativ-testing.fr/Research/Mozilla/android/-K8H4D0-Location_Bar_Spoofing-FullScreen-and-alert-JavaScript-Function/TESTCASE1.HTML and click on the first link (this will activated Fullscreen Mode).

2 : Click on the second link , a new tab will be openned which contains a webpage which load the JavaScript alert(); Function.



Actual results:

Actual results:

Now the location bar is invisible (even if you try to press the back button on android , the location bar has disappeared for always)

you ca use now a fake location bar (leading to a Location Bar Spoofing)



Expected results:

After all these steps, you can use a fake location bar (leading to a Location Bar Spoofing).

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

The original is short, so this covers everything it reports, then explains this kind of bug in general: how it works, how to test for it and how it is fixed. The general sections are about the bug class, not this target. Written with AI and checked against the original; the original is the record. 4 min read.

What the report shows

This is a report against Firefox for Android, filed in the Mozilla bug bounty programme by Jordi Chancel and disclosed on 24 March 2017. The weakness is a location bar spoofing issue that appears when fullscreen mode is combined with a new tab opened from a page that calls the JavaScript alert() function. The platform records the severity as medium; the report itself gives no CVSS score, no weakness classification and no bounty figure.

The researcher tested with the following user agent and build:

Text
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:49.0) Gecko/20100101 Firefox/49.0
Build ID: 20161019084923

The reproduction is short and uses a hosted test case:

  1. Visit http://www.alternativ-testing.fr/Research/Mozilla/android/-K8H4D0-Location_Bar_Spoofing-FullScreen-and-alert-JavaScript-Function/TESTCASE1.HTML and click the first link. This activates fullscreen mode.
  2. Click the second link. A new tab opens containing a page that loads the JavaScript alert() function.

After these two steps the location bar is invisible. The researcher notes that even pressing the Android back button does not bring it back: the location bar has disappeared permanently. With the address bar gone, the page can present its own fake location bar, which is the spoofing condition the title refers to.

The report states the actual and expected results in almost identical terms: after the steps, a fake location bar can be used, leading to location bar spoofing. No fix, patch or resolution detail is included in the text.

Root cause

The report does not diagnose the underlying code. What it implies is a state handling problem in the Android browser UI: entering fullscreen hides the browser chrome, and opening a new tab from a page that triggers a modal alert() leaves the UI in a state where the location bar is never restored, even after the user presses the Android back button. The report does not diagnose the underlying code; it only records that the location bar stays hidden after these steps.

Impact

Within the report's own framing, the impact is location bar spoofing: because the genuine address bar is absent, a page can draw a convincing fake one and mislead the user about which site they are on. That is a phishing and trust problem rather than direct code execution. The report does not demonstrate credential theft or any other concrete attack, and it does not claim the spoof survives navigation to a different origin beyond the observation that the bar stays gone after pressing back.

How this kind of bug works

Browsers signal origin and security state through trusted chrome: the address bar, the lock icon, the site information panel. Any state in which that chrome is missing, misplaced, obscured or rendered by page content breaks the trust boundary, because users are trained to read the address bar as authoritative. Mobile browsers are especially exposed: screen space is tight, fullscreen and immersive modes deliberately remove chrome, and tab management, modals and orientation changes create many transitions between UI states.

Typical mechanisms include a fullscreen or immersive transition that hides the toolbar without a matching restore, a modal dialog or permission prompt that interrupts the transition, a new tab or popup that inherits the hidden state, and page content positioned to occupy the space where the bar would be. Defences are mostly about state discipline: a single owner of chrome visibility, guaranteed restoration on every exit path (dialog dismissal, tab switch, back navigation, focus loss), and refusing to let page content render in the region reserved for browser UI.

How to test for it

A general method for this bug class:

  1. Identify every feature that changes browser chrome: fullscreen, immersive mode, popups, new tabs, modal dialogs, permission prompts, print or share sheets, orientation changes, virtual keyboard.
  2. For each, build a minimal page that enters the state and then triggers a second transition, for example a fullscreen page that opens a new tab whose script calls alert(), as in this report.
  3. After each transition, check whether the address bar is present, correct and current. Try dismissing the dialog, pressing back, switching tabs and returning, and rotating the device.
  4. Look for a state where the bar is missing or stale while page content is visible, then place your own styled bar in that space to confirm the spoof is convincing.

A positive result is a reproducible sequence where the genuine chrome is absent or wrong and page-controlled content occupies its place, ideally surviving a navigation so the user cannot tell which origin they are on. Common false positives: the bar is merely scrolled or auto-hidden and returns on tap or scroll; the page is a browser-internal or privileged page; the effect only occurs with a debug build or a non-default setting; or the fake bar is obviously page content because the real bar is still visible elsewhere.

How it is fixed

Standard fixes for this class are to make chrome visibility a single, explicit state machine; to restore the toolbar on every exit from fullscreen, including dialog dismissal, tab close, back navigation and app backgrounding; to avoid opening new tabs or showing modals while the chrome is hidden, or to force chrome back before doing so; and to reserve the chrome region so page content cannot paint over it. Regression tests that drive these transition sequences on real devices help prevent recurrence.

Hunting notes

This class tends to hide in mobile browsers and in-app webviews, around fullscreen video, immersive reading modes, popups and tab switching, and anywhere a modal can interrupt a UI transition. Recon signals include custom fullscreen implementations, heavy use of alert() or other blocking dialogs in flows, and recent changes to tab or toolbar handling.

The original is short, so this covers everything it reports, then explains this kind of bug in general: how it works, how to test for it and how it is fixed. The general sections are about the bug class, not this target. Written with AI and checked against the original; the original is the record. 8 min read.

What happened, in plain words

This report is about Firefox for Android, the mobile version of the Firefox web browser. It was filed in Mozilla's bug bounty programme, a scheme where people who find security problems in Mozilla software report them and may be rewarded. The researcher is Jordi Chancel, and the report was made public on 24 March 2017. The platform records the severity as medium. The report itself gives no CVSS score, no weakness classification and no bounty amount.

The problem is called location bar spoofing. The location bar (also called the address bar) is the strip at the top of a browser that shows the address of the page you are on, for example https://www.example.com. People rely on it to know which site they are visiting. If a page can make that strip disappear and then draw its own fake strip in the same place, it can pretend to be a different site. That is the spoof.

In this case the bar disappears when two things are combined: the browser is in fullscreen mode, and a new tab is opened from a page that shows a JavaScript alert() pop-up. Fullscreen mode is the mode where the page fills the whole screen and the browser hides its own controls, including the address bar, so you can watch a video or read without distraction. alert() is a very simple JavaScript function that makes the browser show a small pop-up box with a message and an OK button. It is one of the oldest and simplest things a web page can do.

The researcher tested with this browser identification string and build:

Text
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:49.0) Gecko/20100101 Firefox/49.0
Build ID: 20161019084923

The user agent is a line of text the browser sends to every website to say what browser and version it is. The build ID is an internal identifier for the exact compiled version of the browser.

The steps to reproduce

The report gives a short recipe using a test page hosted on the researcher's own site:

  1. Go to http://www.alternativ-testing.fr/Research/Mozilla/android/-K8H4D0-Location_Bar_Spoofing-FullScreen-and-alert-JavaScript-Function/TESTCASE1.HTML and click the first link. This turns on fullscreen mode.
  2. Click the second link. A new tab opens, containing a page that calls the JavaScript alert() function.

Why each step matters: the first link puts the browser into the state where the address bar is deliberately hidden. That is normal and expected while you are in fullscreen. The second link adds a second event on top of it: a new tab, plus a blocking pop-up. The browser now has to handle a new tab with a dialog while the address bar is hidden.

What the researcher saw

After those two steps, the location bar is invisible. The researcher adds that even pressing the Android back button does not bring it back: the bar has disappeared for good. With the real address bar gone, a page can now draw a fake one, and the user has no easy way to tell the difference. That is the location bar spoofing named in the title.

The report states the actual result and the expected result in almost the same words: after the steps, a fake location bar can be used, leading to location bar spoofing. No fix, patch or resolution detail appears in the text.

Why it happens

The report does not analyse the underlying code. What it points to is a problem with how the browser keeps track of its own interface state. Think of a shop that puts up a "closed" sign while the staff work in the back: someone has to remember to take the sign down when they return. The report does not analyse the underlying code; it only records that the bar is not restored after these steps.

What the impact is

Within the report's own framing, the impact is that a user can be misled about which site they are on, because the genuine address bar is missing and a page can supply a convincing replacement. That is a phishing and trust problem, not a way to run code on your device. Phishing is the trick of impersonating a trusted site to get someone to type in a password or payment details. The report does not show credential theft or any other concrete attack, and it does not claim the missing bar survives navigation to a different site beyond the observation that it stays gone after pressing back.

In general, how this kind of bug works

Browsers tell you where you are through trusted interface elements: the address bar, the padlock icon, the site information panel. These are drawn by the browser itself, not by the website, which is exactly why you can trust them. Any state where that trusted strip is missing, moved, covered or imitated by page content breaks that trust, because users are trained to read the address bar as the truth.

Mobile browsers are especially exposed. Screen space is tight, fullscreen and immersive modes deliberately remove the browser controls, and tab management, pop-ups and screen rotation create many transitions between one interface state and another. Typical mechanisms include:

  • a fullscreen transition that hides the toolbar without a matching restore;
  • a pop-up dialog or permission prompt that interrupts the transition;
  • a new tab or pop-up window that inherits the hidden state;
  • page content positioned to fill the space where the bar would be.

Defences are mostly about discipline in managing state: one part of the browser should own the decision of whether the toolbar is visible, restoration should be guaranteed on every way out (closing a dialog, switching tabs, pressing back, losing focus), and page content should never be allowed to paint in the region reserved for browser controls.

In general, how to test for it

A method for this class of bug:

  1. List every feature that changes the browser's own controls: fullscreen, immersive mode, pop-ups, new tabs, modal dialogs, permission prompts, print or share sheets, screen rotation, the on-screen keyboard.
  2. For each one, build a minimal page that enters the state and then triggers a second transition, for example a fullscreen page that opens a new tab whose script calls alert(), as in this report.
  3. After each transition, check whether the address bar is present, correct and showing the current page. Try closing the dialog, pressing back, switching tabs and returning, and rotating the device.
  4. Look for a state where the bar is missing or out of date while page content is visible, then place your own styled bar in that space to confirm the fake is convincing.

A positive result is a repeatable sequence where the real controls are absent or wrong and page-controlled content takes their place, ideally surviving a navigation so the user cannot tell which site they are on. Common false positives: the bar is merely scrolled away or auto-hidden and comes back on tap or scroll; the page is a browser-internal or privileged page; the effect only happens on a debug build or with a non-default setting; or the fake bar is obviously page content because the real bar is still visible elsewhere.

In general, how it is fixed

Standard fixes for this class are to make toolbar visibility a single, explicit state machine (one clear set of states and rules for moving between them); to restore the toolbar on every exit from fullscreen, including closing a dialog, closing a tab, pressing back and sending the app to the background; to avoid opening new tabs or showing dialogs while the controls are hidden, or to force the controls back first; and to reserve the toolbar region so page content cannot paint over it. Automated regression tests that drive these sequences on real devices help stop the bug coming back.

In general, where to look

This class tends to hide in mobile browsers and in-app webviews (a browser engine embedded inside another app), around fullscreen video, immersive reading modes, pop-ups and tab switching, and anywhere a dialog can interrupt a transition in the interface. Signals worth watching include custom fullscreen implementations, heavy use of alert() or other blocking dialogs in flows, and recent changes to tab or toolbar handling.

Glossary

  • Bug bounty programme: a scheme where an organisation pays or credits people who report security problems in its software.
  • Location bar spoofing: making a fake address bar, or hiding the real one, so a user believes they are on a different site.
  • Location bar / address bar: the browser strip that shows the address of the current page.
  • Fullscreen mode: a mode where the page fills the whole screen and the browser hides its own controls.
  • JavaScript: the programming language that web pages run inside the browser to make themselves interactive.
  • alert(): a JavaScript function that makes the browser show a simple pop-up message box with an OK button.
  • User agent: a line of text a browser sends to websites identifying itself and its version.
  • Build ID: an internal identifier for the exact compiled version of a browser.
  • Tab: a separate page open inside the same browser window.
  • Modal dialog: a pop-up that blocks interaction with the rest of the page until it is dismissed.
  • Phishing: impersonating a trusted site to trick someone into giving away passwords or payment details.
  • Trust boundary: the line between what the browser itself controls and what a website controls; users rely on it to know who they are dealing with.
  • State machine: a formal way of describing the possible states of something and the allowed moves between them.
  • Regression test: an automated test that checks a fixed bug stays fixed.
  • Webview: a browser engine embedded inside another application.
  • CVSS: a standard scoring system for rating the severity of a security flaw.

More by Jordi Chancel

View all

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

Clickjacking and UI spoofing

The lesson behind this report.

The interface lies to the user: a framed page catches their clicks, or a browser shows the wrong address or a fake prompt. Paid when it leads to a sensitive action or convincing phishing.