CVE-2026-74953
Overview
Background
- `RecvSetCookies`
- the IPC receive handler in the parent process that services a content process’s request to write cookies.
- `CookieServiceParent`
- the parent-side cookie service that actually commits cookies to storage on behalf of content processes.
- `ContentProcessHasCookie`
- a validation predicate that checks whether the requesting content process is legitimately associated with the given base domain and origin attributes.
- Origin attributes
- the partitioning keys (
OriginAttributes) that isolate cookies by container, private-browsing state, and first-party domain.
Root Cause Analysis
The vulnerable path was WindowGlobalParent::RecvSetCookies, which received a base domain, origin attributes, and cookie data over IPC and forwarded them directly to CookieServiceParent::SetCookies without confirming that the sending content process was actually permitted to operate on that base domain and those origin attributes. Because content processes are untrusted and can be compromised, the parent must independently verify that any domain and partition a child asks to modify corresponds to content the child is legitimately hosting; this invariant — never trust a child-supplied aBaseDomain/aOriginAttributes pair — was violated.
The fix inserts a call to cs->ContentProcessHasCookie(aBaseDomain, aOriginAttributes) and returns IPC_FAIL when the process has no legitimate association with that cookie scope. This works because it re-establishes the parent-side authorization check before the cookie write, so a process can only set cookies for scopes it actually holds.
RecvSetCookies trusted the content process’s claimed base domain and origin attributes instead of validating them. The fix addresses it by gating the write on ContentProcessHasCookie, rejecting requests for cookie scopes the process is not entitled to.Attack Path
- Compromise a content process An attacker gains code execution in a sandboxed content process, for example via an unrelated renderer bug.
- Forge a set-cookie IPC message
The attacker sends a
RecvSetCookiesrequest supplying anaBaseDomainandaOriginAttributesfor a site the process does not legitimately host. - Bypass the absent check
Before the fix, the parent forwards the forged request straight to
CookieServiceParent::SetCookieswith no verification. - Write cross-origin cookies The parent commits cookies for the victim domain or a different partition, escalating the content process’s privilege over cookie state it should not control.
Impact Assessment
Files Changed
dom/ipc/WindowGlobalParent.cpp
Audit Directions
- Unvalidated IPC domain/origin argumentsAudit every parent-side
Recv*handler that accepts a child-supplied domain, origin, orOriginAttributesand confirm it validates the value against the process’s legitimate scope before acting. - Cookie and storage brokeringReview other entry points into
CookieServiceParentand related storage actors to ensure each performs the sameContentProcessHasCookie-style authorization check. - Trust-boundary forwardingFlag parent code that forwards child-provided parameters directly into privileged service calls without an intervening capability or ownership check.
Patch
diff --git a/dom/ipc/WindowGlobalParent.cpp b/dom/ipc/WindowGlobalParent.cpp
index 891ad30aba6..b2b38aecb1e 100644
--- a/dom/ipc/WindowGlobalParent.cpp
+++ b/dom/ipc/WindowGlobalParent.cpp
@@ -1823,6 +1823,10 @@ IPCResult WindowGlobalParent::RecvSetCookies(
NS_ENSURE_TRUE(csParent, IPC_OK());
auto* cs = static_cast<net::CookieServiceParent*>(csParent);
+ if (!cs->ContentProcessHasCookie(aBaseDomain, aOriginAttributes)) {
+ return IPC_FAIL(this, "Invalid set-cookie request from content process");
+ }
+
return cs->SetCookies(aBaseDomain, aOriginAttributes, aHost, aIsThirdParty,
aCookies, GetBrowsingContext());
}