Permissions Policy is enforced only in the content process; a compromised content process bypasses every "allowed to use" gate
Categories
(Core :: DOM: Security, defect)
Tracking
()
People
(Reporter: tjr, Unassigned)
References
(Blocks 1 open bug)
Details
(Keywords: csectype-priv-escalation, sec-want)
Summary
Every Permissions Policy ("allowed to use") check in Gecko runs in the content process. The parent never re-verifies the result, so a compromised content process bypasses all of them by
skipping the check before sending the IPC message that acts on the feature.
This is a class-level gap, not a bug in one handler.
Details
The single enforcement entry point is FeaturePolicyUtils::IsFeatureAllowed. It takes a Document*, which only exists in the process hosting the document, and all 32 of its call sites in the
tree are content-process code — spread across DOM core, credential management, media, MIDI, payments, permissions, wake lock, WebSerial, and workers. There is no parent-process call site.
The parent does receive some policy data: ContentParent::RecvSetContainerFeaturePolicy stores a container policy on the BrowsingContext. But that value is only propagated back to child
documents, never consulted as an authorization gate — and it is the container's imposed policy, not the document's resolved policy, which is computed from response headers plus inheritance
and exists only in the content process.
The gap is already acknowledged in-tree: WindowGlobalParent::RecvSetDocumentDomain carries a comment asking whether it needs a feature policy check "like we currently do in the child
process," then mutates the principal's domain without one. That instance is minor on its own, since document-domain is an experimental feature disabled by default — it is cited because it
documents the pattern.
Every feature in the default-enforced list is affected: camera, geolocation, microphone, digital-credentials-create/get, display-capture, fullscreen, web-share, gamepad,
publickey-credentials-create/get, serial, speaker-selection, storage-access, screen-wake-lock, loopback-network, local-network, aria-notify, picture-in-picture.
CredentialsContainer::Create illustrates the shape: a single IsFeatureAllowed call for publickey-credentials-create guards the path to WebAuthnHandler::MakeCredential. A compromised
content process skips the branch and calls the handler directly. The same pattern guards digital-credentials-create and publickey-credentials-get.
Impact
Under a compromised-content-process threat model, an embedder's Permissions Policy restrictions are advisory. A framed origin the embedder restricted via allow= or a Permissions-Policy
header can reach the feature anyway.
For features that also have a parent-side permission prompt — camera, microphone, geolocation, display-capture — bypassing the policy does not by itself grant the
capability, since the user is still prompted. The impact there is loss of the embedder's restriction, not silent access. For features with no independent parent-side gate, the policy check
is the only enforcement.
Comment 1•3 months ago
|
||
The severity field is not set for this bug.
:freddy, could you have a look please?
For more information, please visit BugBot documentation.
| Reporter | ||
Updated•2 months ago
|
Updated•1 month ago
|
Description
•