Web extensions can open any url using view-source:
A web extension could open view-source URLs for file and about:cache pages, bypassing the normal blocking that applies when such URLs are opened directly. An attacker could use this to read local files or internal browser data.
Originally disclosed on Mozilla
- Fixed in 36 days
- Paid in 43 days
- Disclosed after 36 days
Created attachment 8941398
POC.zip
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36
Steps to reproduce:
Install attached extension
Actual results:
view-source urls for a file URL and about:cache is opened
Expected results:
blocked the same way as when opening directly
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 checked the URL scheme for blocking but did not treat the view-source wrapper as equivalent to the inner URL, so the sensitive target was not blocked.
What the attacker needed
Victim installs a malicious 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.
Web extensions are small add-ons that run inside the browser. Normally the browser blocks extensions from opening certain sensitive pages, such as local files or internal browser pages. This report shows that by adding a 'view-source:' prefix, an extension could get around that block and open those pages anyway.
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.