Skip to content
Info disclosure Disclosed report Intermediate

Incoming "text/plain" dataTransfer items are potentially treated as files under GNU/Linux

Firefox on GNU/Linux treats file URIs in text/plain drag-and-drop data as trusted filenames, allowing a malicious web page to read local files such as /etc/passwd when a user drags an item from the page to the browser. The issue is demonstrated by dragging a Chrome icon from a web page to Firefox, which then displays the contents of /etc/passwd.

Rafael Gieschke Follow

Originally disclosed on Mozilla

  • Fixed in 9.8 years
  • Paid in 17 months
  • Disclosed after 9.8 years
Text
0. Use GNU/Linux
1. Open https://ebenda.org/2015/drag-drop/ in Chrome and Firefox
2. Drag and drop the displayed Chrome icon to Firefox
3. See the contents of your /etc/passwd, the web page has read access to it (and potentially to any file on your system when https://bugzilla.mozilla.org/show_bug.cgi?id=1164310 is finished )

Firefox treats file URIs in, e.g., "text/plain" as trusted filenames. It should ONLY treat file URIs in "text/uri-list" as trusted filenames.

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

Impact

A malicious web page could read local files on the user's system, potentially any file when a related Firefox bug is fixed.

What the attacker needed

GNU/Linux system; Firefox browser; Victim drags an item from a web page to Firefox

The fix

Firefox should only treat file URIs in text/uri-list as trusted filenames, not in text/plain.

How it was found

  1. Use GNU/Linux.
  2. Open the drag-and-drop demo page in Chrome and Firefox.
  3. Drag the displayed Chrome icon from the page to Firefox.
  4. Observe that Firefox displays the contents of /etc/passwd, giving the page read access to it.

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.

When you drag something from a web page into your browser, the browser may treat it as a file. Firefox on Linux incorrectly trusts file paths in plain text data, so a malicious page can trick you into dragging a link that points to a local file like /etc/passwd. Firefox then opens and shows that file, letting the page read it.

What is Info disclosure?

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

More by Rafael Gieschke

View all

1 more disclosed report, 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.