Cross-Origin Blob Data Theft: RecvBlobURLDataRequest performs zero principal validation
Categories
(Core :: DOM: Content Processes, defect)
Tracking
()
People
(Reporter: b00rito.dumb, Unassigned)
Details
(Keywords: reporter-external)
Attachments
(1 file)
|
16.67 KB,
text/markdown
|
Details |
Steps to reproduce:
- A compromised content process calls SendBlobURLDataRequest with:
- aBlobURL = any blob URL from any origin (e.g., "blob:https://bank.com/<uuid>")
- aTriggeringPrincipal = forged SystemPrincipal
- aLoadingPrincipal = forged SystemPrincipal
- The parent process receives the message in ContentParent::RecvBlobURLDataRequest
(ContentParent.cpp:7456-7483) - The handler passes both unvalidated principals directly to
BlobURLProtocolHandler::GetDataEntry() for access control
Actual results:
RecvBlobURLDataRequest performs zero validation on either principal -- no
ValidatePrincipal(), no LogAndAssert, nothing. The forged SystemPrincipal
bypasses both access control checks in GetDataEntry():
- The OriginAttributes check (line 848) is skipped entirely because
aLoadingPrincipal->IsSystemPrincipal() returns true - The Subsumes() check (line 855) passes because SystemPrincipal->Subsumes()
returns true for all principals
The victim's blob data is serialized via IPCBlobUtils::Serialize and returned
to the attacker's content process. Any blob URL from any origin can be read.
The same zero-validation pattern exists in RecvLoadURIExternal
(ContentParent.cpp:4674-4699), where forged SystemPrincipal bypasses all
access control in nsExternalHelperAppService::LoadURI.
Expected results:
RecvBlobURLDataRequest should call ValidatePrincipal() on both
aTriggeringPrincipal and aLoadingPrincipal before passing them to
GetDataEntry(). If either principal fails validation (e.g., a content process
claims to be SystemPrincipal), the handler should return IPC_FAIL and kill
the child process. The blob data should not be returned to a process that
forged its principals.
Every other handler in ContentParent.cpp that accepts nsIPrincipal* from a
content process calls at least ValidatePrincipal(). RecvBlobURLDataRequest
and RecvLoadURIExternal are outliers with zero validation.
Updated•8 months ago
|
Updated•8 months ago
|
Updated•7 months ago
|
Description
•