Inappropriate implementation in Extensions (CVE-2026-17748)
A logic flaw in UserScriptLoader::SendUpdate causes the origin check for Isolated Web App content scripts to be skipped for normal web renderers, so a compromised renderer can read the private script source code of an IWA. An attacker who already has code execution in a renderer could map the shared memory and extract the scripts, bypassing Site Isolation.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 4 months
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 without the security team.
Overview: A logic flaw in UserScriptLoader::SendUpdate potentially allows regular web renderers to receive the private content script source code of Isolated Web Apps (IWAs). The security check meant to restrict IWA scripts to their specific origin is completely bypassed for non-guest renderers. A compromised renderer can map the broadcasted shared memory region and read the cross-origin IWA scripts, bypassing Site Isolation.
Affected files:
extensions/browser/user_script_loader.cc
Estimated timestamp from git blame: 2025-02-10
Summary
There is a potential cross-origin information disclosure vulnerability in extensions/browser/user_script_loader.cc. The function UserScriptLoader::SendUpdate is responsible for distributing serialized user scripts (including those from Isolated Web Apps' <controlledframe> elements) to renderer processes via shared memory. However, a logic error causes the script-to-origin authorization check to be skipped for all standard (non-guest) web renderers, indiscriminately broadcasting sensitive IWA scripts to them.
Vulnerability Details
- When an Isolated Web App (IWA) registers a content script (e.g., via
controlledframe.addContentScripts), amojom::HostIDof typekControlledFrameEmbedderis generated for it. - The script source code is serialized into a
base::ReadOnlySharedMemoryRegion. - The browser process iterates over all active
RenderProcessHostinstances to distribute the updated scripts, callingUserScriptLoader::SendUpdate(). - Normal web tabs and IWAs share the same
BrowserContext(Profile). Thus, the initialIsSameContextcheck inSendUpdatepasses for normal web renderers. SendUpdatecontains a validation block designed to prevent scripts from being sent to the wrong origin:
#if BUILDFLAG(ENABLE_GUEST_VIEW)
if (process->IsForGuestsOnly() &&
!CanExecuteScriptEverywhere(browser_context_, host_id())) {
// ...
std::string owner_host;
// ...
switch (host_id().type) {
case mojom::HostID::HostType::kControlledFrameEmbedder:
if (owner_host != host_id().id) {
return SendUpdateResult::kNoActionTaken;
}
}
}
#endif
- For a standard web renderer (e.g., an attacker's website),
process->IsForGuestsOnly()evaluates tofalse. - As a result, the entire validation block is skipped. The strict
owner_host != host_id().idcomparison is never executed. - Execution falls through to
renderer->UpdateUserScripts(...), dispatching an IPC with the duplicated shared memory handle containing the IWA's scripts to the regular web renderer.
Potential Attack Steps
Note: Our tooling agent does not have the ability to run code, so these are suggested/potential steps based on static analysis.
- The victim installs and opens an IWA that registers private content scripts.
- The victim navigates to an attacker-controlled website (e.g.,
https://evil.com) in a normal browser tab within the same Profile. - The attacker leverages a separate vulnerability (such as a V8 memory corruption bug) to gain code execution within the sandboxed renderer process for
evil.com. - The compromised renderer intercepts the
mojom::Renderer::UpdateUserScriptsIPC broadcasted by the browser process. - The attacker maps the
ReadOnlySharedMemoryRegionand unpickles the data to read the plaintext source code of the IWA's content scripts, bypassing IWA and Site Isolation boundaries.
Suggested Fix
The authorization checks for specific host types (like kControlledFrameEmbedder) must not be gated exclusively behind process->IsForGuestsOnly(). The logic should be refactored so that if a HostID is explicitly tied to a specific embedder or origin, it is only sent to renderers matching that origin, regardless of whether the target process is a guest view or a normal tab. For example, explicitly block kControlledFrameEmbedder scripts from being sent to any renderer where the origin does not match the host_id().id.
Evaluated with Chrome root at commit: 137d451a126685dd5010e6609db9f6d4a78d8234
Results so far have been promising, but there can be wrong deductions. If this proves to be a false positive, please close as WAI; 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
The origin validation for controlled-frame embedder scripts is inside a block that only runs for guest-only renderer processes, so normal web renderers skip the check entirely.
What the attacker needed
Victim installs an IWA with private scripts; victim visits attacker site in same profile; attacker has separate renderer exploit
The fix
The origin check for controlled-frame embedder scripts should not be limited to guest-only processes; scripts tied to a specific embedder should only be sent to renderers matching that origin.
How it was found
- The victim installs and opens an IWA that registers private content scripts.
- The victim navigates to an attacker-controlled website in a normal tab within the same profile.
- The attacker uses a separate vulnerability to gain code execution in the renderer for that website.
- The compromised renderer intercepts the UpdateUserScripts IPC broadcast from the browser process.
- The attacker maps the shared memory region and reads the plaintext source code of the IWA's content scripts.
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.
Isolated Web Apps (IWAs) are special web apps that run in their own protected area, and their internal scripts are meant to stay private. A mistake in the browser code means those private scripts are also sent to ordinary websites running in the same browser profile. If an attacker can already run code inside a website's process, they could read those scripts, but they need that first step.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.