browser.devtools.panels.create does not ensure panel pagePath is relative URL
The devtools.panels.create API did not enforce that the panel pagePath is a relative URL, so an extension could load non-relative URLs including privileged about: pages. An attacker could use this to load privileged browser pages inside a devtools panel, breaking security measures.
Originally disclosed on Mozilla
- Fixed in 20 days
- Paid in 42 days
- Disclosed after 20 days
Created attachment 8936788
devtools-panels.zip
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36
Steps to reproduce:
PoC attached.
1. Unpack attached PoC addon
2. Go to about:debugging and temporarily load the unpacked addon
3. Open web console and navigate to 'My Panel'
Actual results:
We can load non-relative URLs including privileged about: urls
Expected results:
According to https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/devtools.panels/create
"The URL should be relative to the manifest.json file itself"
Also, as per Bug 1380597 this is breaking security measures.
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
An extension could load privileged about: pages in a devtools panel, which the report says breaks security measures.
What the attacker needed
Ability to install an extension; user opens the devtools panel
The fix
The API should be fixed to reject non-relative URLs and allow only paths relative to the manifest.json file.
How it was found
- Unpack the proof-of-concept addon.
- Load the unpacked addon temporarily through about:debugging.
- Open the web console and navigate to the panel named 'My Panel'.
- Observe that a non-relative, privileged about: URL is loaded.
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.
Browser extensions can add their own panels to the developer tools. The API that creates these panels is supposed to accept only a path relative to the extension's own files, but it accepted any URL, including special internal browser pages that normal extensions should not be able to load. That lets an extension reach privileged pages it should not have access to.
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.