Skip to content
UI spoofing Disclosed report Intermediate

Firefox allows you to insert confirm/alert/prompt dialog in any domain with the back button

A page could trigger a confirm/alert/prompt dialog that persisted after the user pressed the browser back button, so the dialog appeared over a different site. An attacker could use this to show a misleading prompt on an unrelated domain, though the page underneath could not be interacted with.

Jose María Acuña Follow

Originally disclosed on Mozilla

  • Fixed in 3.1 years
  • Paid in 22 months
  • Disclosed after 3.1 years
Text
User Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36

Steps to reproduce:

1- go to: http://createcharts.esy.es/permission-prompt.html
2- click the "test" button
3- click the back button of the browser
4- an alert appears on the current page


Some observations:

- the url changes to the "about: blank" format but does not change the behavior of the current page
- it is not possible to interact with the elements of the page (links, buttons, etc.)
- I believe that the content of the page should be changed  (blank page?) to avoid fraudulent use
- Tested on Firefox 56.0 (64-bit)
- Firefox Nightly 58.0a1 and Firefox Developer Edition 57.0b7 return: SecurityError - Permission denied to access property "document" on cross-origin object

The original report as published on Mozilla's Bugzilla, by Jose María Acuña. 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

Likely the browser did not dismiss a pending dialog when the user navigated back, so the dialog outlived the page that created it.

Impact

An attacker could show a misleading dialog that appears to belong to a different site, but the underlying page could not be interacted with, and newer Firefox builds blocked it with a cross-origin error.

What the attacker needed

Victim uses Firefox 56; victim clicks the test button; victim presses the back button

The fix

The browser should clear any pending dialog when the user navigates away, so the dialog cannot appear over another page.

How it was found

  1. Open the test page in Firefox.
  2. Click the test button to trigger the dialog.
  3. Press the browser back button.
  4. Observe the alert appearing on the current page.

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 browser dialog is the small pop-up box that asks you to confirm something or shows a message. Normally a site can only show one while you are on that site. Here, after the user pressed back, the dialog stayed on screen while the browser showed a different page, so the message looked like it came from the wrong site.

What is UI spoofing?

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.

More by Jose María Acuña

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.

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.