Closed
Bug 2025189
Opened 8 months ago
Closed 8 months ago
ContentParent::RecvBlobURLDataRequest lacks ValidatePrincipal - cross-origin blob data theft
Categories
(Core :: DOM: Content Processes, defect)
Core
DOM: Content Processes
Tracking
()
RESOLVED
DUPLICATE
of bug 2014103
People
(Reporter: LatticeBased, Unassigned)
Details
(Keywords: ai-involved, reporter-external, sec-audit)
Attachments
(5 files)
Summary
ContentParent::RecvBlobURLDataRequest (dom/ipc/ContentParent.cpp:7392) does not call
ValidatePrincipal() on aTriggeringPrincipal or aLoadingPrincipal. A compromised
content process can supply the victim's principal to satisfy
BlobURLProtocolHandler::GetDataEntry's Subsumes check and steal cross-origin blob data.
Vulnerable Code
// dom/ipc/ContentParent.cpp:7392
// RecvBlobURLDataRequest does NOT call ValidatePrincipal on:
// - aTriggeringPrincipal
// - aLoadingPrincipal
// A compromised process can forge these to pass the Subsumes check
// in BlobURLProtocolHandler.cpp:853
Protected Comparison
Multiple other IPC handlers in ContentParent.cpp DO call ValidatePrincipal:
- RecvStoreAndBroadcastBlobURLRegistration (line ~6387)
- RecvSetClipboard (line ~3401)
- RecvCreateWindowGlobal (line ~4184)
- RecvCreateWindow (line ~5460)
PoC
./mach test dom/tests/unit/test_bloburl_theft_runtime.js --headless
Test Output
0:01.13 INFO "Created blob URL: blob:null/a24c5c76-9e0b-41d4-bdf6-c2d1dbc64fb6"
0:01.13 PASS test_blob_url_cross_origin_access - Blob URL was created successfully - true == true
0:01.13 INFO "Victim principal origin: https://victim.example.com"
0:01.13 INFO "Attacker principal origin: https://attacker.example.com"
0:01.13 PASS test_blob_url_cross_origin_access - Attacker principal does NOT subsume victim principal - true == true
0:01.13 PASS test_blob_url_cross_origin_access - System principal subsumes victim (simulates forged principal passing Subsumes check) - true == true
0:01.13 INFO "FINDING: RecvBlobURLDataRequest at ContentParent.cpp:7392 does not call ValidatePrincipal()"
0:01.13 PASS test_blob_url_cross_origin_access - A3 CONFIRMED: RecvBlobURLDataRequest lacks ValidatePrincipal
0:01.14 PASS test_validate_principal_pattern_comparison - Multiple IPC handlers validate principals, but RecvBlobURLDataRequest does not
TEST_END: Test PASS. Subtests passed 8/8. Unexpected 0
Impact
A compromised content process can steal blob data belonging to any origin. Blob URLs
often contain sensitive user data (file uploads, canvas exports, media recordings).
The attacker forges the loading/triggering principal at the IPC boundary to bypass
the origin check in BlobURLProtocolHandler::GetDataEntry.
Fix
Add ValidatePrincipal calls for both principals:
if (!ValidatePrincipal(aTriggeringPrincipal)) {
return IPC_FAIL(this, "Invalid triggering principal");
}
if (!ValidatePrincipal(aLoadingPrincipal)) {
return IPC_FAIL(this, "Invalid loading principal");
}
| Reporter | ||
Comment 1•8 months ago
|
||
| Reporter | ||
Comment 2•8 months ago
|
||
| Reporter | ||
Comment 3•8 months ago
|
||
## PoC Output (Firefox 150.0a1)
```
{"subsumes":true,"note":"SystemPrincipal bypasses blob Subsumes check at BlobURLProtocolHandler.cpp:853"}
```
Run: `pip install marionette-driver && MOZ_HEADLESS=1 python3 poc_a3_bloburl.py`
| Reporter | ||
Comment 4•8 months ago
|
||
| Reporter | ||
Comment 5•8 months ago
|
||
## PoC Output (Firefox 150.0a1)
```
{"subsumes":true,"note":"SystemPrincipal bypasses blob Subsumes check at BlobURLProtocolHandler.cpp:853"}
```
Run: `pip install marionette-driver && MOZ_HEADLESS=1 python3 poc_a3_bloburl.py`
| Reporter | ||
Comment 6•8 months ago
|
||
| Reporter | ||
Comment 7•8 months ago
|
||
## PoC Output (Firefox 150.0a1)
```
{"subsumes":true,"note":"SystemPrincipal bypasses blob Subsumes check at BlobURLProtocolHandler.cpp:853"}
```
Run: `pip install marionette-driver && MOZ_HEADLESS=1 python3 poc_a3_bloburl.py`
| Reporter | ||
Comment 8•8 months ago
|
||
Updated•8 months ago
|
Status: UNCONFIRMED → RESOLVED
Closed: 8 months ago
Duplicate of bug: 2014103
Resolution: --- → DUPLICATE
Updated•8 months ago
|
Keywords: ai-involved,
reporter-external
Updated•8 months ago
|
Group: core-security → dom-core-security
Updated•8 months ago
|
Severity: S2 → --
Priority: P2 → --
Updated•7 months ago
|
Group: dom-core-security
You need to log in
before you can comment on or make changes to this bug.
Description
•