Compromised renderer can issue authenticated cross-origin fetch requests as any origin - IPC-supplied principalInfo used for Origin header and cookie access without sender authorization
Categories
(Core :: DOM: Networking, defect, P1)
Tracking
()
People
(Reporter: pakhunov.anton.n, Assigned: jesup)
References
(Blocks 1 open bug)
Details
(Keywords: ai-involved, reporter-external, sec-want, Whiteboard: [client-bounty-form][necko-triaged][necko-priority-queue])
Attachments
(1 file, 1 obsolete file)
|
8.74 KB,
text/markdown
|
Details |
Found by: manual code review - same root cause as Cache API, IndexedDB, OPFS
(filed separately); IPC-supplied PrincipalInfo accepted for Fetch security
context without validating sender process is authorized for claimed origin.
Files:
ipc/glue/BackgroundParentImpl.cpp ~line 1472 (AllocPFetchParent)
dom/fetch/FetchParent.cpp ~lines 88-115 (RecvFetchOp)
dom/fetch/FetchService.cpp ~lines 179-211, 257-269 (FetchInstance::Fetch)
dom/fetch/PFetch.ipdl (manager PBackground; FetchOpArgs.principalInfo)
ipc/glue/PBackground.ipdl line 83 ([ChildProc=anydom] on PBackground)
Firefox version: mozilla-central (trunk)
OS: all platforms
BackgroundParentImpl::AllocPFetchParent (line 1472) creates a FetchParent
actor with no IsOtherProcessActor check and no ValidatePrincipal call.
FetchParent::RecvFetchOp (line 88) stores aArgs.principalInfo() as
mPrincipalInfo without any validation. aArgs.isWorkerRequest controls which
fetch path is taken - setting it to true uses the WorkerFetchArgs path which
has no keepalive assertion.
FetchService::FetchInstance::Fetch converts mPrincipalInfo via
PrincipalInfoToPrincipal (lines 179-184 or 206-210) and uses the resulting
principal to create a FetchDriver. The FetchDriver uses the principal for:
- HTTP Origin header (derived from the forged principal)
- Cookie access (channel security context = forged principal)
- CORS enforcement
A compromised renderer sends FetchOp with:
principalInfo = ContentPrincipalInfo{ spec: "https://bank.com/" }
request = { url: "https://api.bank.com/accounts", method: "GET",
credentials: "include" }
isWorkerRequest: true
The browser fetches api.bank.com with Origin: https://bank.com and the user's
bank.com session cookies. The server returns account data. The full response
body is relayed to the compromised renderer via OnResponseAvailableInternal.
This is the most impactful instance of the IPC principal-forgery pattern:
unlike WebSocket/WebTransport (Origin header only), Fetch returns the full
authenticated HTTP response body to the renderer.
Requires compromised renderer (not triggerable from JavaScript alone).
Updated•7 months ago
|
Updated•7 months ago
|
Comment 1•7 months ago
|
||
Bug 2025183 recently fixed RecvFetchOp but apparently missed the others, unless there are other bugs for those I didn't find.
| Assignee | ||
Comment 2•7 months ago
|
||
Updated•7 months ago
|
| Assignee | ||
Updated•7 months ago
|
| Assignee | ||
Comment 3•6 months ago
|
||
Already fixed in bug 2025183
Updated•6 months ago
|
Updated•6 months ago
|
Updated•6 months ago
|
Updated•1 month ago
|
Description
•