Skip to content

Connection Allowlist and Context Menu Commands #5

@xiaochen-z

Description

@xiaochen-z

Context menu commands—such as "Open Link in New Tab"—are a common way for users to initiate network requests (including navigation and downloads) using the URL of a selected HTML element.

For a document with a connection allowlist enforced, should this enforcement apply to network requests initiated via context menu commands?

Consider a page containing an LLM-generated anchor element:

  • The URL of the anchor element's href attribute can be arbitrary, presenting a data exfiltration risk.
  • An event listener like oncontextmenu can alter the href URL the moment the user opens the context menu.

Two options:

  1. Enforce the allowlist for network requests initiated via context menu commands:
    • Mitigates exfiltration risks described above.
    • Requires more complex implementation.
    • May disrupt user expectations or perceived functionality.
  2. Treat these network requests as browser-initiated (out of scope for the connection allowlist):
    • In Chromium, a navigation request triggered by "Open Link in New Tab" sets initiator_frame to null and browser_initiated to true. This indicates the navigation is treated similarly to a user typing a URL into the Omnibox and pressing Enter, which is out of the scope of the connection allowlist.
    • Leaves exfiltration risk unaddressed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions