Skip to content
Access control Disclosed report Intermediate

Web content can receive and dispatch events used by the screenshot component

Web content could observe and dispatch custom events used by Firefox's Screenshots component, allowing a malicious page to trigger actions like copying to the clipboard or downloading files. The reporter demonstrated that a test case could modify the user's clipboard and downloads folder.

Gregory Pappas Follow

Originally disclosed on Mozilla

  • Fixed in 14 hours
  • Paid in 21 days
  • Disclosed after 14 hours
Text
Created attachment 9389405
reduced.html

These events can be observed by web content. Additionally, web content can dispatch these events and the Screenshots component will respond! Not good...

- Screenshots:Close
- Screenshots:Copy
- Screenshots:Download
- Screenshots:RecordEvent
- Screenshots:OverlaySelection
- Screenshots:ShowPanel
- Screenshots:HidePanel

Steps to reproduce:
1) Open a fresh profile in Firefox Nightly
2) Load the attached test case

Actual results:
The attached test case can observe these events.
The attached test case is able to modify the user's clipboard and downloads folder.

Expected results:
The attached test case can't do that, ideally.

I found this issue while trying to figure out how to write an automated test for bug 1880634.

The original report as published on Mozilla's Bugzilla, by Gregory Pappas. 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 Screenshots component listens for custom events on a global object that is accessible to web content, without verifying the event's origin or restricting event dispatch to privileged code.

What the attacker needed

Firefox Nightly with Screenshots component; victim visits a malicious page

How it was found

  1. Open a fresh profile in Firefox Nightly.
  2. Load the attached test case (reduced.html).
  3. Observe that the test case can see the Screenshots events.
  4. Observe that the test case can modify the clipboard and downloads folder.

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.

Web pages can send and listen for special messages called events. Firefox's screenshot tool uses some of these events, and the report shows that a normal web page can also send them. This means a bad page could make the screenshot tool do things like copy data or save files without the user wanting it.

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 Gregory Pappas

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.

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.