Skip to content
Info disclosure Disclosed report Intermediate CVE-2019-11698

Stealing history data using places querying and drag and drop

A Firefox bug allowed a malicious webpage to read a user's browsing history by abusing drag-and-drop of a bookmark that contained a places query. An attacker could trick a user into dragging a specially crafted bookmark into the page, which then exposed the query results as readable HTML data.

Abdulrahman Alqabandi Follow

Originally disclosed on Mozilla

  • Fixed in 10 days
  • Paid in 13 days
  • Disclosed after 10 days
Text
Created attachment 9057015
poc.htm

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Firefox/68.0

Steps to reproduce:

Using attached PoC:

1. If you don't have bookmarks bar open then open sidebar bookmark page by pressing CTRL+B
2. Drag and drop the anchor tag into the bookmark bar/sidebar 
3. Now drag and drop the newly created bookmark into the webpages body




Actual results:

For some reason the dragged object from the bookmark bar contains 'text/html' formatted data of all the queried history entries. Which means we can steal users history data (even loaded iframes) with precision, thanks to the use of the places query.

Step [2] creates a places query ( https://developer.mozilla.org/en-US/docs/Mozilla/Tech/Places/Places_query_URIs ) that looks like:

place:type=0&sort=1&terms=token&maxResults=10&includeHidden=true

I am looking within the users history for any entry with the term 'token' in the URL, for testing purposes I only grab 10 entries but this could be increased in an attack scenario. I also use the 'includeHidden' query operator to include otherwise hidden history entries that come from iframes and images, just to further expand my net.

Step [3] is where I think the bug exists. Once we drag the newly created places query bookmark back into our webpage, we can read all the results from our query by reading the 'text/html' data entry. 



Expected results:

There should not be a ''text/html' readable data when drag and dropping bookmarks from firefox and to firefox. I believe this may have been put there for cross application compatibility but is of no use (AFAIK) when it comes to drag and dropping within firefox.

The original report as published on Mozilla's Bugzilla, by Abdulrahman Alqabandi. 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, when a bookmark containing a places query is dragged into a webpage, Firefox includes the query results as 'text/html' data in the drag event, which the page can read.

Impact

An attacker could steal a user's browsing history, including hidden entries from iframes and images, with precision, but the attack requires the user to perform specific drag-and-drop actions.

What the attacker needed

Victim uses Firefox; victim opens bookmarks sidebar; victim drags anchor to bookmarks; victim drags bookmark into page

How it was found

  1. Open the bookmarks sidebar if it is not already open.
  2. Drag an anchor tag from the proof-of-concept page into the bookmarks bar or sidebar to create a bookmark.
  3. Drag the newly created bookmark from the bookmarks bar or sidebar into the body of the webpage.

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.

This report describes a way to steal a person's browsing history using Firefox's drag-and-drop feature. A bookmark can be set up to search history for certain words, and when that bookmark is dragged into a webpage, the page can read the search results. The attacker needs the user to perform a few drag-and-drop actions.

What is Info disclosure?

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.

More by Abdulrahman Alqabandi

View all

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

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.