"frame-ancestors" CSP directive not enforced for framed extension pages
Firefox does not enforce the frame-ancestors CSP directive for web-accessible extension pages, while Chrome does. This allows web content to frame those pages and exposes them to clickjacking.
Originally disclosed on Mozilla
- Fixed in 11 days
- Paid in 31 days
- Disclosed after 11 days
Mart from Flowcrypt wrote the security alias to let us know that their WebExtension uses a CSP with a frame-ancestors directive, and that Firefox does not enforce it when web content frames one of their web-accessible extension pages. In contrast, Chrome does. This exposes their content to the risk of clickjacking.
Their CSP is:
`upgrade-insecure-requests; script-src 'self'; frame-ancestors https://mail.google.com 'self'; img-src 'self' https://*.googleusercontent.com data: blob:; frame-src 'self' blob:; worker-src 'self'; form-action 'none'; media-src 'none'; font-src 'none'; manifest-src 'none'; object-src 'none'; base-uri 'self'`
https://github.com/FlowCrypt/flowcrypt-browser/blob/master/extension/manifest.json#L93
It appears we intentionally limit frame-ancestor checks to HTTP channels,
https://searchfox.org/mozilla-central/rev/9b600caf7e9133876e44af4cd4558ed4f02870cf/dom/security/nsContentSecurityUtils.cpp#896-897,905-907
but it seems quite a useful thing to do for web extensions also
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 Firefox intentionally limits frame-ancestor checks to HTTP channels, so extension pages are not covered.
Impact
Web content could frame a web-accessible extension page and perform clickjacking, though this was only observed in Firefox.
What the attacker needed
Victim uses Firefox; extension has web-accessible pages; victim visits attacker page
The fix
Firefox should enforce frame-ancestors for web extension pages as well.
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 website can embed another page in a frame. A security rule called frame-ancestors tells the browser which sites are allowed to do that. Firefox ignored this rule for pages belonging to browser extensions, so any website could frame them and trick users into clicking things.
What is UI spoofing?
The interface lies to the user: a framed page catches their clicks, or a browser shows the wrong address or a fake prompt. Paid when it leads to a sensitive action or convincing phishing.