Insufficient validation of untrusted input in Network (CVE-2026-14022)
A cookie manager in the network service updated its cookie-change subscription to a renderer-supplied URL before checking whether the renderer was allowed to access that origin. A compromised renderer could therefore keep watching cookie writes for an arbitrary victim origin, including HttpOnly cookies, through a shared memory counter.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 33 days
Project Fortify, an experimental security project, has identified the following potential security issue. If you're a feature owner CC-ed on this bug, please do your best to review these reports. Please see https://chromium.googlesource.com/chromium/src/+/main/docs/security/ai-generated-security-bugs-faq.md for more information.
Overview: A potential validation-after-side-effect in RestrictedCookieManager allows a compromised renderer to swap its cookie subscription to a victim origin before validation occurs. On official builds, bad message reporting on point-to-point peer channels does not terminate the renderer and bypasses the local disconnect handler, leaking the manager instance. This allows the surviving compromised renderer to persistently monitor victim cookie writes via shared memory.
Affected files:
services/network/restricted_cookie_manager.ccservices/network/network_context.ccservices/network/network_service.cc
Estimated timestamp from git blame: 2023-08-17
Summary
A potential validation-after-side-effect and Mojo object lifecycle leak in RestrictedCookieManager allows a compromised renderer to establish a persistent, cross-origin cookie-write oracle. Because origin validation is executed after the cookie subscription is updated to a target URL, and because bad message reporting on introduced peer channels does not terminate the renderer in official builds while leaking the manager instance, a compromised renderer can continuously monitor unpartitioned cookie writes to arbitrary origins (including HttpOnly cookies) via shared memory.
Vulnerability Mechanism
1. Validation-After-Side-Effect in GetCookiesString
In services/network/restricted_cookie_manager.cc, RestrictedCookieManager::GetCookiesString processes requests as follows:
base::ReadOnlySharedMemoryRegion shared_memory_region;
if (get_version_shared_memory) {
shared_memory_region = GetAndPrepareSharedMemoryRegion(url);
}
// ...
GetAllForUrl(url, ...);
GetAndPrepareSharedMemoryRegion(url) is invoked with the unvalidated, renderer-supplied url before GetAllForUrl performs origin validation via ValidateAccessToCookiesAt.
Inside GetAndPrepareSharedMemoryRegion(url):
bool new_url = cookie_store_subscription_ && change_subscribed_url_ != url;
if (!cookie_store_subscription_ || new_url) {
change_subscribed_url_ = url;
cookie_store_subscription_ =
cookie_store_->GetChangeDispatcher().AddCallbackForUrl(
url, cookie_partition_key_, ...);
}
If the renderer requests a new URL (e.g., https://victim.com), the subscription cookie_store_subscription_ is immediately updated to monitor cookie changes for the victim URL. Subsequently, GetAllForUrl invokes ValidateAccessToCookiesAt, which correctly detects that the renderer origin is unauthorized to access the victim URL and reports a bad message. However, the side effect—updating the subscription—has already occurred.
2. Renderer Survives Bad Message Termination
Ordinarily, bad messages terminate the sending process. However, the renderer-to-network Mojo channel is a point-to-point peer channel created via broker introduction (mojo/core/node_controller.cc:1280) with an empty ProcessErrorCallback.
As a result, HasBadMessageHandler() returns false, causing Core::NotifyBadMessage to fall back to the default process error handler HandleBadMessage registered in the Network Process (services/network/network_service.cc).
In official builds, HandleBadMessage logs a warning and calls base::debug::DumpWithoutCrashing(), but does not crash or terminate the process. Therefore, the compromised renderer continues running.
3. RestrictedCookieManager Instance is Leaked
When ReportBadMessage is called on the Mojo receiver, Mojo's bindings layer closes the receiver locally via binding->Close().
Because the receiver endpoint is closed/reset locally, the registered disconnect handler (which is configured as NetworkContext::OnRCMDisconnect) is discarded and not executed. Consequently, the RestrictedCookieManager instance is never removed from NetworkContext::restricted_cookie_managers_ and is permanently leaked.
4. Shared Memory Cookie Write Oracle
The subscription callback to IncrementSharedVersion remains active because the leaked RestrictedCookieManager is kept alive inside the NetworkContext's owner set:
void RestrictedCookieManager::IncrementSharedVersion() {
shared_memory_version_controller_.Increment();
}
Since the compromised renderer previously performed a legitimate GetCookiesString call on the same interface instance, it retains the read-only shared memory mapping. Any unpartitioned cookie write/update/deletion on the victim origin (including HttpOnly cookies) synchronously triggers the subscription, incrementing the atomic version counter in the mapped region. The compromised renderer can spin-read this memory at CPU speeds to reliably detect victim cookie writes.
Potential Steps to Reproduce
Note: These are suggested steps; our tooling cannot execute code.
- Obtain Shared Memory Mapping: A compromised renderer bound to
https://attacker.comrequests aRestrictedCookieManagerreceiver. It callsGetCookiesStringforhttps://attacker.comwithget_version_shared_memory = true. It maps the receivedReadOnlySharedMemoryRegioninto its address space. - Swap Subscription: The renderer calls
GetCookiesStringagain asynchronously on the same interface, passingurl = "https://victim.com"andget_version_shared_memory = true. - Trigger Validation Failure: In the network process,
GetAndPrepareSharedMemoryRegionswaps the subscription tohttps://victim.com, after which validation fails andReportBadMessageis invoked. - Leak and Monitor: The receiver closes, but the
RestrictedCookieManageris leaked with the victim subscription active, and the renderer is not terminated. The renderer reads the atomic variable in the mapped shared memory. Any increment confirms a cookie modification occurred on the victim origin.
Suggested Fix
Move the origin access check ValidateAccessToCookiesAt to the beginning of RestrictedCookieManager::GetCookiesString before GetAndPrepareSharedMemoryRegion is executed:
void RestrictedCookieManager::GetCookiesString(
const GURL& url,
const net::SiteForCookies& site_for_cookies,
const url::Origin& top_frame_origin,
net::StorageAccessApiStatus storage_access_api_status,
bool get_version_shared_memory,
bool is_ad_tagged,
bool apply_devtools_overrides,
bool force_disable_third_party_cookies,
GetCookiesStringCallback callback) {
TRACE_EVENT("net", "RestrictedCookieManager::GetCookiesString");
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
base::ElapsedTimer timer;
if (!ValidateAccessToCookiesAt(url, site_for_cookies, top_frame_origin)) {
std::move(callback).Run(mojo::shared_memory_version::kInvalidVersion,
base::ReadOnlySharedMemoryRegion());
return;
}
if (metrics_updater_) {
metrics_updater_->OnGetCookiesString();
}
base::ReadOnlySharedMemoryRegion shared_memory_region;
if (get_version_shared_memory) {
shared_memory_region = GetAndPrepareSharedMemoryRegion(url);
}
// ...
}
Evaluated with Chrome root at commit: 5133b93d189b383c37805b1cf3a9d2dbfe8d7379
Results so far have been promising, but there can be wrong deductions. Feel free to adjust as follows:
- If you are familiar with the severity guidelines, you may adjust the severity.
- If this is a false positive, and there's no work to be done, please close as WAI.
- If there is work to do here but not a vulnerability, please change the issue type to Task/Bug/FR.
Data from false positives will be used to improve accuracy over time. And please feel free to reach out to me directly if you have concerns or feedback on the project.
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
Origin validation in GetCookiesString runs after the cookie-change subscription has already been switched to the renderer-supplied URL, and the bad-message path neither kills the renderer nor runs the disconnect handler, so the manager leaks with the victim subscription active.
Impact
A compromised renderer could persistently detect cookie writes on arbitrary origins, including HttpOnly cookies, giving it a cross-origin cookie-write oracle; the text notes the steps are suggested and were not executed.
What the attacker needed
Renderer already compromised; official Chrome build
The fix
The origin access check should be moved to the start of GetCookiesString, before the shared memory region and subscription are prepared.
How it was found
- A compromised renderer requests a cookie manager interface and asks for cookies for its own origin with the shared memory version enabled, then maps that memory.
- It calls the same method again on the same interface with the victim origin as the URL.
- The network process switches the subscription to the victim origin, then validation fails and a bad message is reported.
- The receiver closes but the manager is leaked with the victim subscription active and the renderer keeps running, so it can read the shared counter to detect victim cookie writes.
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.
A web browser splits itself into parts, and one part (the renderer) shows web pages while another (the network service) handles cookies. The network service is supposed to check that a page is allowed to see cookies for a given site before doing anything with that site. Here the check happened too late, so a page that had already been taken over by an attacker could start listening for cookie changes on another site and learn when that site's cookies were written.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.