Open Bug 1286083 Opened 9 years ago Updated 1 year ago

Invisible background page can navigate to arbitrary URLs

Categories

(WebExtensions :: General, defect, P5)

defect

Tracking

(Not tracked)

People

(Reporter: robwu, Unassigned)

References

Details

(Whiteboard: [addons-jira][wecg])

Attachments

(1 file)

Background pages should not be able to navigate to arbitrary URLs. Test case 1 (main frame-initiated navigation): 1. Inspect any background page. 2. location.href = 'http://example.com/'; 3. Wait a second. 4. document.documentElement.outerHTML; Result : Step 4 looks like example.com Expected: Step 2 should fail, the navigation should be rejected. Test case 2 (child frame-initiated navigation): 1. Load the attached addon via about:debugging 2. (The addon's background page inserts a frame, the frame has a script that navigates the top-level frame to example.com) 3. Debug the background page via about:debugging 4. Type location.href Result : http://example.com/ Expected: moz-extension://...
I don't think this is a big deal (now that bug 1226423 is fixed, anyway). If the background page wants to load remote iframes, it should sandbox them. I don't have any objection to preventing this, though.
Whiteboard: triaged
See Also: → 1392997
Priority: -- → P5
Product: Toolkit → WebExtensions
Component: Untriaged → General
See Also: → 1762225
Whiteboard: triaged → [wecg]
Whiteboard: [wecg] → [addons-jira][wecg]

This seems to have been assigned ages ago, so removing that and put it in jira to go into the backlog.

Assignee: rob → nobody
Status: ASSIGNED → NEW

We've discussed this in the WECG today (https://github.com/w3c/webextensions/issues/191), and the consensus is to block the ability to navigate to remote URLs.

Severity: normal → S3
See Also: → 1844217
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: