Content permission requests carry a child-supplied user-activation flag; use the parent's authoritative value instead
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
People
(Reporter: tjr, Unassigned)
References
Details
(Keywords: csectype-priv-escalation, sec-low)
Summary
When content requests a permission, the content process tells the parent whether the request had transient user activation, and the parent believes it. A compromised content process asserts activation it never received and defeats the parent-side "requires user input" gate.
Bug 2061656 is adding a parent-authoritative activation signal on WindowGlobalParent. This bug is the consumer-side follow-up for the permission-prompt path, which that bug does not cover.
Details
ContentChild constructs the permission-request actor with a child-supplied aIsHandlingUserInput boolean. The parent stores it on the request object and re-exposes it through nsIContentPermissionPrompt as hasValidTransientUserGestureActivation. Nothing on the parent side derives or cross-checks the value — it is simply the child's assertion, forwarded.
The desktop Web Notifications prompt in PermissionUI acts on it directly: when its requiresUserInput getter is true it blocks the prompt and records a no_user_gesture reason unless the request reports valid activation. That getter is backed by om.webnotifications.requireuserinteraction, which defaults to true, so this is a live gate in the default configuration rather than an opt-in one. GeckoView reads the same pref for its permission handling.
This is a distinct route from the synced WindowContext activation state discussed in Bug 2061656. That state is spoofable by design, because a cross-process subframe legitimately activates its ancestors, and the fix there is a separate parent-maintained timestamp. The permission-request flag is a second, independent path that will still carry the child's word after that lands.
Impact
A compromised content process can raise notification permission prompts without user interaction, defeating the anti-abuse gate that exists specifically to prevent unsolicited prompts. The user still sees the prompt; the harm is that it can be timed rather than being tied to a real interaction.
Any future prompt that opts into requiresUserInput inherits the same weakness while the flag remains child-supplied.
Suggested direction
Once 2061656 lands, source the value from WindowGlobalParent.hasValidTransientUserGestureActivation in the parent rather than from the request, and drop aIsHandlingUserInput from the permission-request actor constructor so there is no child-supplied copy to trust.
Note the semantics differ slightly: per 2061656, the parent-side property means "the user recently interacted with this window or a same-process descendant," a superset of the document's own activation state. For an anti-abuse gate on notification prompts that looser definition should be acceptable, but it is worth confirming rather than assuming.
Comment 1•3 months ago
|
||
The severity field is not set for this bug.
:jjaschke, could you have a look please?
For more information, please visit BugBot documentation.
Updated•2 months ago
|
Description
•