Giving the camera permission to a local .html file means giving this permission to all the local .html files opened in the same tab
A camera permission granted to one local HTML file was automatically applied to a different local HTML file opened in the same tab. An attacker could therefore obtain camera access from a second local file without any new prompt once the user had approved the first.
Originally disclosed on Mozilla
- Fixed in 27 days
- Paid in 40 days
- Disclosed after 27 days
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36
Steps to reproduce:
Create two local .html files with two different names and the same code lines:
'''HTML
<div id="container">
<h1><a href="//webrtc.github.io/samples/" title="WebRTC samples homepage">WebRTC samples</a>
<span>getUserMedia</span></h1>
<video id="gum-local" autoplay playsinline></video>
<button id="showVideo">Open camera</button>
</div>
<script src="https://webrtc.github.io/samples/src/content/getusermedia/gum/js/main.js"></script>
'''
Open the first .html file on Firefox, give the camera permission to the file, open the second .html file, the second .html file is granted the camera permission automatically.
Video of demonstration: please download from this link to watch a high-definition video: https://drive.google.com/file/d/1YSdgDrxYTQZm2xLn86Q2cLTfdvtgZXKe/view?usp=sharing.
Actual results:
Giving the camera permission to a local .html file means giving this permission to all the local .html files.
Expected results:
Should ask for giving the camera permission on each local .html file.
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 browser scoped the stored camera permission to the local file origin (or a shared file scheme) rather than to the individual file, so all local files in the same tab inherited the grant.
What the attacker needed
Firefox browser; victim opens a local HTML file; victim grants camera to a first local file
How it was found
- Create two local HTML files with different names but the same code.
- Open the first file in Firefox and grant it camera permission.
- Open the second file in the same tab.
- Observe that the second file receives camera permission without a prompt.
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 a website asks to use your camera, the browser remembers your answer. This report shows that for files stored on your own computer, the browser remembered the answer for one file and then reused it for a completely different file. That means a second file could use your camera without asking you again.
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.