Skip to content
Misconfiguration Disclosed report Intermediate CVE-2018-5142

Media Capture and Streams API permission does not inherit requester's origin

When a Media Capture and Streams API permission was requested from a data URL or Blob URL, Firefox showed the permission prompt as coming from 'Unknown protocol' instead of the requesting origin. An attacker could embed such a frame in a trusted page so the user, trusting the top document, grants camera or microphone access.

Jun Follow

Originally disclosed on Mozilla

  • Fixed in 7 months
  • Paid in 5 months
  • Disclosed after 7 months
Text
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36

Steps to reproduce:

1. Go to https://vuln.shhnjk.com/iframer.php?url=//test.shhnjk.com/permission.html
2. Click any button says contains word "Cam"


Actual results:

Permission notification says "Unknown protocol" is requesting permission. If you click Geo button, permission inherits origin correctly so it says "test.shhnjk.com".


Expected results:

When Media Capture and Streams API permission is requested from data URL or Blob URL, Firefox does not inherits origin in the permission notification. If top documents is trusted to user and child frame (ads) is untrusted site which requests permission, "Unknow protocol" will not give clear idea to users (Normal user does not what protocol is). Therefore user might allow permission by trusting top document.

So it should inherit origin of requester like Geo location permmision does

The original report as published on Mozilla's Bugzilla, by Jun. 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 permission prompt for Media Capture and Streams API did not derive the requesting origin from data URL or Blob URL frames, unlike the geolocation permission flow.

Impact

A user could be tricked into granting camera or microphone access by trusting the top document, because the prompt does not clearly identify the requesting origin.

What the attacker needed

Victim visits a crafted page; victim clicks a button to trigger permission

The fix

The permission prompt should inherit and display the requester's origin for data URL and Blob URL frames, as geolocation permission does.

How it was found

  1. Open the provided test page that embeds a frame pointing to a permission test page.
  2. Click a button containing the word 'Cam' to trigger the camera permission request.
  3. Observe that the permission notification says 'Unknown protocol' instead of the requester's origin.

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.

Browsers normally show which website is asking for a sensitive permission, such as your camera. Here, when the request came from a special kind of page (a data URL or Blob URL), Firefox did not show the real website name and instead said 'Unknown protocol'. A malicious site could put that request inside a trusted page, and you might allow it because you trust the page around it.

What is Misconfiguration?

Settings left unsafe: exposed panels, open storage buckets, debug modes, default credentials.

More by Jun

View all

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

Security misconfiguration

The lesson behind this report.

Settings left unsafe: exposed panels, open storage buckets, debug modes, default credentials.