RecvBlobURLDataRequest does not ValidatePrincipal before GetDataEntry authorization checks
Categories
(Core :: DOM: Content Processes, defect)
Tracking
()
People
(Reporter: yuki.detective, Unassigned)
Details
(Keywords: ai-involved, reporter-external)
Steps to reproduce:
Code audit of ContentParent IPC handlers accepting nsIPrincipal*
in mozilla-central (rev 34fc93ba, 2026-04-12).
-
RecvBlobURLDataRequest(ContentParent.cpp:7394) accepts
nsIPrincipal* aTriggeringPrincipalandnsIPrincipal* aLoadingPrincipal
from a content process without callingValidatePrincipalon either. -
Both principals are passed directly to
BlobURLProtocolHandler::GetDataEntry(BlobURLProtocolHandler.cpp:817)
which uses them for authorization:- Line 846: if
aLoadingPrincipal->IsSystemPrincipal(),
OriginAttributes comparison is skipped - Line 853:
aTriggeringPrincipal->Subsumes(info->mPrincipal)
gates access to the blob data
- Line 846: if
-
By contrast,
RecvStoreAndBroadcastBlobURLRegistration(line 5845)
validates the principal for blob URL registration:
ValidatePrincipal(aPrincipal, {ValidatePrincipalOptions::AllowSystem})The blob URL write path is protected; the read path is not.
Actual results:
A compromised content process may be able to forge a triggering
principal matching another origin's blob URL owner, and a
SystemPrincipal as loading principal, to bypass both authorization
checks in GetDataEntry and read cross-origin blob data.
Blob URL strings may be available to the compromised process via
the SendBlobURLRegistration broadcast mechanism
(ContentParent.cpp:5793), though broadcast reach may be filtered
by mLoadedOriginHashes.
This has not been runtime-demonstrated; the finding is based on code audit.
Expected results:
RecvBlobURLDataRequest should call ValidatePrincipal on both
aTriggeringPrincipal and aLoadingPrincipal, consistent with how
RecvStoreAndBroadcastBlobURLRegistration and other IPC handlers
(RecvSetClipboard, RecvGetClipboardDataSnapshot, RecvCreateWindow)
validate their principal parameters.
A content process should not be able to send a SystemPrincipal or a
principal from a different site via this IPC message.
See also: Bug 1421099 (blob URL OriginAttributes isolation, sec-moderate)
Updated•7 months ago
|
Updated•7 months ago
|
Updated•7 months ago
|
Description
•