Missing ValidatePrincipal in RecvBlobURLDataRequest allows cross-origin blob URL data theft via forged SystemPrincipal
Categories
(Core :: DOM: Content Processes, defect)
Tracking
()
People
(Reporter: tranquac0312, Unassigned)
Details
(Keywords: reporter-external, Whiteboard: [client-bounty-form])
Attachments
(1 file)
|
4.20 KB,
text/x-c++src
|
Details |
Summary
RecvBlobURLDataRequest (ContentParent.cpp:7382) does not call ValidatePrincipal() on two IPC-received principals. A compromised content process forges SystemPrincipal to read blob URL content from any origin, bypassing private browsing and container isolation.
Root Cause
// dom/ipc/ContentParent.cpp:7382-7409 — NO ValidatePrincipal
mozilla::ipc::IPCResult ContentParent::RecvBlobURLDataRequest(
const nsACString& aBlobURL, nsIPrincipal* aTriggeringPrincipal,
nsIPrincipal* aLoadingPrincipal, ...) {
// Both principals passed straight through, unvalidated
BlobURLProtocolHandler::GetDataEntry(aBlobURL, ..., aLoadingPrincipal,
aTriggeringPrincipal, ...);
aResolver(ipcBlob); // blob data returned to caller
}
Contrast: RecvStoreAndBroadcastBlobURLRegistration (same file, line 5850) DOES call ValidatePrincipal. This handler is the only blob-URL IPC handler that skips it.
IPC deserializes TSystemPrincipalInfo into real SystemPrincipal with no process-origin check (BackgroundUtils.cpp:52-58).
What Gets Bypassed
Check 1 — Origin-attributes isolation (BlobURLProtocolHandler.cpp:781-787):
// "We also allow the system principal to create the channel regardless of
// the OriginAttributes."
if ((!aLoadingPrincipal || !aLoadingPrincipal->IsSystemPrincipal()) &&
!IsOriginAttributesEqual(...)) {
return false; // HARD check — SystemPrincipal SKIPS this entirely
}
Private browsing, container tabs, first-party isolation — all bypassed.
Check 2 — Origin subsumption (BlobURLProtocolHandler.cpp:789-791):
if (!aTriggeringPrincipal->Subsumes(info->mPrincipal)) {
return false; // HARD check — SystemPrincipal subsumes ALL principals
}
Blob URL UUIDs Are Not a Barrier
The parent broadcasts blob URL registrations (including full UUIDs) to content processes:
// ContentParent.cpp:5776-5783
bool toBeSent = IsBlobURLBroadcastPrincipal(aPrincipal); // true for system/addon
for (auto* cp : AllProcesses(eLive)) {
if (!toBeSent && !cp->mLoadedOriginHashes.Contains(originHash))
continue; // content-origin: filtered. System/addon: sent to ALL.
cp->SendBlobURLRegistration(uri, ipcBlob, aPrincipal, ...);
}
IsBlobURLBroadcastPrincipal (BlobURLProtocolHandler.cpp:895-898) returns true for SystemPrincipal and addon principals → every content process receives their blob URLs.
ContentParent.h:1594-1595 states "receiving a Blob URL does not grant access to its contents" — this assumption is broken by the missing ValidatePrincipal.
Impact
Full attack chain: enumerate blob URLs from broadcast → forge SystemPrincipal → read cross-origin data. This enables:
- Cross-origin file theft — file upload previews (photos, tax docs), canvas exports, PDF blobs, media from any tab
- Private browsing leak — normal process reads blobs from private browsing windows
- Container isolation bypass — blobs leak across Firefox Multi-Account Containers
- Post-revocation access —
aAlsoIfRevoked=true(line 7394) gives ~5s window past revokeObjectURL()
Related: CVE-2021-23999 (Bug 1691153), CVE-2018-5108 (Bug 1421099). Bug 1670242 (IPC principal vetting meta) still open.
Affected
Firefox Release, Beta, Nightly, ESR (all current). Verified on mozilla-firefox/firefox main HEAD 2026-04-23.
Suggested Fix
Add ValidatePrincipal with IPC_FAIL on failure. See attached diff.
Updated•6 months ago
|
Updated•6 months ago
|
Description
•