Skip to content
Access control Disclosed report Advanced CVE-2026-12301

No ContentProcessHasCookie check in HttpChannelParent::RecvSetCookies

The parent process in Firefox does not validate the host in cookie IPC messages from child processes, allowing a compromised renderer to read and write cookies for any domain. An attacker could steal session cookies from other sites and perform session fixation.

Richard Belisle Follow

Originally disclosed on Mozilla

  • Fixed in 3 months
  • Paid in 3 months
  • Disclosed after 3 months

Created attachment 9543728 cookie_ipc_crossorigin.md

Cookie READ — RecvGetCookieList (CookieServiceParent.cpp:268)

aHost is entirely child-controlled with zero validation against the process's assigned site. The parent calls GetCookiesForURI(aHost) and returns full cookie data. Non-HttpOnly cookie values are fully exposed. The child also controls aIsForeign and aStorageAccessPermissionGranted, bypassing all ETP filtering.

Side effect: UpdateCookieInContentList(aHost) at line 283 auto-adds the host to mCookieKeysInContent, unlocking RecvSetCookies for that domain.

Cookie WRITE — two paths completely bypass ContentProcessHasCookie:

  1. HttpChannelParent::RecvSetCookies (HttpChannelParent.cpp:1055) calls cs->SetCookies() directly at line 1070 — the internal method, not RecvSetCookies. ContentProcessHasCookie is never called. Any content process with an active PHttpChannel can write cookies for any domain.

  2. WindowGlobalParent::RecvSetCookies (WindowGlobalParent.cpp:1792) — same pattern, calls cs->SetCookies() directly at line 1809. Added in Bug 1839918 (Firefox 119) for bounce tracking. Every content process has a WindowGlobalParent.

Both paths call the internal SetCookies() (line 322), which only validates cookie syntax, not whether the content process is authorized for the target domain.

Impact: Compromised renderer on evil.com reads bank.com session cookies, then writes session-fixation cookies via HttpChannelParent or WindowGlobalParent and bypassing the defense built in Bug 1484026. No FIXME or TODO in any of these handlers idenfified.

Fix: Validate aHost base domain against ContentParent::GetRemoteType() in RecvGetCookieList. Route HttpChannelParent and WindowGlobalParent SetCookies through RecvSetCookies (or add equivalent origin check). Long-term: complete Bug 1491018.

See attached analysis

=== HOW DID YOU FIND THIS BUG ===

Manual source code audit of parent-side IPC cookie handlers. Traced child-controlled parameters through RecvGetCookieList and RecvSetCookies, found ContentProcessHasCookie is only enforced on 1 of 4 write paths, and the read path has no host validation at all.

=== POC & README TO BE ATTACHED ===

  1. submission_cookie_ipc_crossorigin.md — full code trace with all 4 vectors
  2. poc_cookie_ipc.py — Marionette PoC demonstrating parent-side cookie leak and content-process IPC access

The original report as published on Mozilla's Bugzilla, by Richard Belisle. Images and videos are our own copies; raw HTML is shown as text. View it on Mozilla's Bugzilla.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

The parent process fails to check whether the child process is authorised to access the requested host in cookie IPC handlers, and two write paths bypass the existing ContentProcessHasCookie check entirely.

Impact

A compromised renderer could read non-HttpOnly cookies from any domain and write cookies to any domain, enabling session theft and session fixation; the report does not mention any defence that would block this.

What the attacker needed

Compromised renderer process; ability to send IPC messages

The fix

The report suggests validating the host against the process's remote type in RecvGetCookieList and routing all SetCookies calls through RecvSetCookies or adding an equivalent origin check.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

When you visit a website, your browser stores small pieces of data called cookies, which can include login sessions. Firefox separates web pages into processes for security, but this report shows that a malicious page could trick the browser into giving it cookies from other sites, like your bank. That would let an attacker log in as you.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

More by Richard Belisle

View all

3 more disclosed reports, best first.

More from Mozilla

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.