Skip to content
Race condition Disclosed report Advanced CVE-2020-26967

Screenshot exception with mutation observers

Taking a screenshot of a test case page that uses mutation observers causes the screenshot extension to throw an exception, apparently because it tries to access the screenshot iframe before it is ready. The reporter suggests that with correct timing this could potentially escalate into the extension's privileged context.

Daniel Veditz Follow

Originally disclosed on Mozilla

  • Fixed in 27 days
  • Paid in 33 days
  • Disclosed after 27 days
Text
Created attachment 9176455
hijackScreenshotInitialization-testcase-new.html

Filing this for kaisersoze, WIP for a screenshot bug. Currently if you take a screenshot of the testcase page using one of the two buttons in the top right (whole page or visible window) it will throw an exception in the extension itself. Seems to be trying to grab the screenshot iframe and getting there too early, but could be close to something like a priv-esc into the extension context if he gets the timing right.

The original report as published on Mozilla's Bugzilla, by Daniel Veditz. 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 a race condition where the extension accesses the screenshot iframe before the page's mutation observers have finished altering the DOM, so the expected element is missing or replaced.

Impact

The immediate effect is a crash in the extension; the reporter only speculates that a well-timed attack could lead to privilege escalation into the extension context, and no exploit is demonstrated.

What the attacker needed

Screenshot extension installed; victim opens crafted page; precise timing

How it was found

  1. Open the attached test case page.
  2. Use one of the two buttons in the top right to take a whole-page or visible-window screenshot.
  3. Observe the exception thrown inside the extension.

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 extension takes screenshots by briefly inserting a hidden frame into the page. This page changes its own content as it loads, so the extension reaches for that frame too early and crashes. The author thinks a clever attacker might time things to run code inside the extension, which has more power than a normal web page.

What is Race condition?

Parallel requests reach a state the code assumed could not happen: a coupon used twice, a limit overrun, a check skipped.

More by Daniel Veditz

View all

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

Race conditions

The lesson behind this report.

Parallel requests reach a state the code assumed could not happen: a coupon used twice, a limit overrun, a check skipped.