Medium firefox Logic Error 🔧 Commit mapped

Overview

Medium
Severity
—
CVSS
No
Exploited ITW
Fixed
Fix Status
Impactmoderate
DescriptionSite isolation issue in the Networking: Cookies component
ComponentDOM
Bug ClassLogic Error
Tracker2050425
Fix commit7f6acbd461fe (firefox) +3/-3
CISA KEVNot listed
CreditedYaqoub Aldurayhim
Disclosed2026-08-18

Background

`CookieStore` API
A modern asynchronous DOM interface (dom/cookiestore/) that lets web content read and write cookies, brokered from the content process to the parent process over IPC.
`CheckContentProcessSecurity`
A parent-process helper in CookieStoreParent.cpp that validates whether a given content process is permitted to perform the requested cookie operation.
Site isolation
Gecko’s security model in which each content process is constrained to a specific origin/site, enforced in the parent so a compromised or misbehaving child cannot access another site’s data.
Fail-open vs. fail-closed
A design choice in which an authorization check either grants access (return true) or denies access (return false) when it cannot complete its validation.

Root Cause Analysis

CheckContentProcessSecurity walks a chain of IPC-managed actors — from ThreadsafeContentParentHandle to ContentParent, then to PNeckoParent, then to PCookieServiceParent — in order to reach the CookieServiceParent that actually enforces per-process cookie access policy. At each step, if the corresponding managed actor could not be resolved (contentParent, neckoParent, or csParent was null), the original code returned true, treating the missing security context as if the check had succeeded. This violated the fail-closed invariant that an authorization decision must never grant access when the data needed to make that decision is unavailable.

The fix changes all three early-exit branches to return false, so an inability to locate the enforcing actor now denies the cookie operation instead of silently permitting it. Because the null-actor states represent a content process without the expected Necko/cookie-service plumbing, denying them closes a path by which such a process could bypass the site-isolation cookie restrictions.

Key insight
The single mistake was a fail-open authorization check: CheckContentProcessSecurity returned “allowed” whenever it could not resolve the actor chain needed to evaluate the request. The fix flips those fallback returns to false, making an unresolvable security context deny access rather than grant it.

Attack Path

  1. Obtain a content process without full plumbing An attacker operates from a content process whose managed PNeckoParent or PCookieServiceParent actor is absent or not yet established, so the actor lookup returns null.
  2. Issue a CookieStore request The content process sends a cookie read/write request over IPC to CookieStoreParent, triggering CheckContentProcessSecurity.
  3. Trip the null-actor branch Because one of contentParent, neckoParent, or csParent is null, the original code short-circuits and returns true, skipping the per-process cookie enforcement in CookieServiceParent.
  4. Bypass site isolation The cookie operation proceeds without the site-isolation validation that CookieServiceParent would have applied, allowing access outside the process’s permitted scope.

Impact Assessment

An attacker gains the ability to bypass the content-process cookie access restrictions enforced for site isolation, potentially reading or writing cookies the process should not be allowed to touch. This occurs in the privileged parent process’s handling of a request originating from a content process, so it requires the attacker to already control or influence a content process reaching a state where the Necko/cookie-service actor chain is unresolved. Consistent with the metadata, the impact is rated moderate: a site-isolation/logic weakness rather than direct memory corruption.

Changed Functions

FunctionChangeNotes
if
dom/cookiestore/CookieStoreParent.cpp
modified

Files Changed

  • dom/cookiestore/CookieStoreParent.cpp

Audit Directions

  • Fail-open authorization
    Audit security/permission helpers for early return true (or “allow”) paths taken when a required object, actor, or context is null or missing; such fallbacks should deny by default.
  • IPC actor-chain resolution
    Review parent-process code that walks managed-actor chains (ContentParent → PNeckoParent → PCookieServiceParent and similar) and confirm every failed lookup results in denial, not a permissive default.
  • Site-isolation enforcement gaps
    Trace CookieStore and other cross-process data APIs to ensure the per-process enforcement object (e.g. CookieServiceParent) is always actually consulted, with no code path that skips it while still allowing the operation.
diff --git a/dom/cookiestore/CookieStoreParent.cpp b/dom/cookiestore/CookieStoreParent.cpp
index 3fb3498e7ab..c1ea81ad4e9 100644
--- a/dom/cookiestore/CookieStoreParent.cpp
+++ b/dom/cookiestore/CookieStoreParent.cpp
@@ -45,19 +45,19 @@ bool CheckContentProcessSecurity(ThreadsafeContentParentHandle* aParent,
 
   RefPtr<ContentParent> contentParent = aParent->GetContentParent();
   if (!contentParent) {
-    return true;
+    return false;
   }
 
   PNeckoParent* neckoParent =
       LoneManagedOrNullAsserts(contentParent->ManagedPNeckoParent());
   if (!neckoParent) {
-    return true;
+    return false;
   }
 
   PCookieServiceParent* csParent =
       LoneManagedOrNullAsserts(neckoParent->ManagedPCookieServiceParent());
   if (!csParent) {
-    return true;
+    return false;
   }
 
   auto* cs = static_cast<CookieServiceParent*>(csParent);
Loading diff…