Insufficient validation of untrusted input in Extensions (CVE-2026-17806)
A compromised renderer could commit a spoofed URL on a blocked subframe error page, and a later tracker rescan would match that URL against extension content script patterns without excluding error documents. This could let the attacker process be treated as running a content script for a target extension, bypassing browser-side checks and opening message channels to the extension's background page.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 2 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. Please see https://chromium.googlesource.com/chromium/src/+/main/docs/security/ai-generated-security-bugs-faq.md for more information.
Overview: A compromised renderer can spoof the committed URL of a blocked subframe error page, which is stored in the RenderFrameHost. During a subsequent tracker rescan, ScriptInjectionTracker::AddMatchingScriptsToProcess evaluates this spoofed URL without filtering out error documents. This potentially allows a compromised renderer to bypass browser-side IPC verification and act on behalf of extension content scripts.
Affected files:
extensions/browser/script_injection_tracker.cc
Estimated timestamp from git blame: 2023-12-08
Root Cause Analysis
In extensions/browser/script_injection_tracker.cc, the function AddMatchingScriptsToProcess is responsible for scanning the frames of a RenderProcessHost and registering which extensions are allowed to run content scripts in that process:
void AddMatchingScriptsToProcess(const Extension& extension,
content::RenderProcessHost& process) {
...
process.ForEachRenderFrameHost([&](content::RenderFrameHost* frame) {
const GURL& url = frame->GetLastCommittedURL();
if (!any_frame_matches_content_scripts) {
any_frame_matches_content_scripts =
DoWebViewScriptsMatch(extension, *frame) ||
DoStaticContentScriptsMatch(extension, *frame, url) ||
DoDynamicContentScriptsMatch(extension, *frame, url);
}
...
});
if (any_frame_matches_content_scripts) {
process_data.AddScript(ScriptType::kContentScript, extension.id());
}
}
During a navigation's initial commit phase, ScriptInjectionTracker explicitly ignores error pages (e.g., in ReadyToCommitNavigation and DidFinishNavigation). However, when a tracker rescan is triggered at a later point (such as during dynamic script updates or permission changes), AddMatchingScriptsToProcess iterates over all current RenderFrameHost instances and matches each frame's GetLastCommittedURL() without checking if the frame is hosting an error document.
Furthermore, under RenderFrameHostImpl::ValidateDidCommitParams (in content/browser/renderer_host/render_frame_host_impl.cc), when a renderer-initiated subframe navigation fails with a blocked request error (such as net::ERR_BLOCKED_BY_CSP), ShouldBypassSecurityChecksForErrorPage returns true. Consequently, the browser skips ValidateURLAndOrigin validation. This allows a compromised renderer to commit an arbitrary spoofed URL (e.g., https://victim.com/) with an opaque origin, which is stored in the frame's last_committed_url_ state.
When AddMatchingScriptsToProcess is later triggered, it queries frame->GetLastCommittedURL(), evaluates the spoofed URL against the extension's content script patterns, and falsely associates the extension ID with the attacker's renderer process.
Potential Security Impact
This vulnerability potentially permits a compromised renderer to bypass critical browser-side IPC validation checks. Specifically:
ScriptInjectionTracker::DidProcessRunContentScriptFromExtensionwill falsely returntruefor the attacker process and the target extension.- The attacker can bypass the check in
message_service_bindings.ccand successfully open message channels to the extension's background page usingMessagingEndpoint::Type::kContentScript. - The attacker can bypass
extension_util::CanRendererActOnBehalfOfExtension, enabling the process to execute privileged extension APIs intended only for trusted content scripts.
Suggested/Potential Verification Steps
Note: The following are suggested verification steps; our analysis is based on static code tracing and we do not have the capability to execute code.
- From a compromised renderer, create a subframe and navigate to a URL that triggers a blocked request error (e.g., violating a CSP directive).
- Intercept the commit request and respond with a forged
DidCommitProvisionalLoadIPC settingparams.urlto the target victim domain (e.g.,https://victim.com/) andparams.originto a browser-supplied opaque origin. - Wait for an event that updates scripts (such as dynamic script registration via
chrome.scripting.registerContentScripts), triggeringAddMatchingScriptsToProcess. - Attempt to open a message channel via Mojo to the target extension with
source_endpoint.type = kContentScript. The browser-side validation should pass, allowing communication.
Proposed Fix
Modify AddMatchingScriptsToProcess in extensions/browser/script_injection_tracker.cc to explicitly skip frames that are error documents:
process.ForEachRenderFrameHost([&](content::RenderFrameHost* frame) {
if (frame->IsErrorDocument()) {
return;
}
const GURL& url = frame->GetLastCommittedURL();
...
Evaluated with Chrome root at commit: a2bea94528f4bd6cc57739c43fa3bb890b8367d3
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
Likely the tracker rescan matches frames by their last committed URL without skipping error documents, and error-page commits skip URL and origin validation, so a renderer-supplied URL is trusted.
Impact
A compromised renderer could bypass browser-side IPC validation and act on behalf of an extension's content scripts, potentially reaching privileged extension APIs; the text notes the analysis is static and the steps were not executed.
What the attacker needed
Compromised renderer process; target extension with matching content scripts; a script-update event to trigger rescan
The fix
The rescan should skip frames that are error documents before reading their committed URL.
How it was found
- From a compromised renderer, create a subframe and navigate to a URL that triggers a blocked request error.
- Intercept the commit request and respond with a forged commit message carrying the target victim domain and an opaque origin.
- Wait for an event that updates scripts, such as dynamic script registration, to trigger the rescan.
- Attempt to open a message channel to the target extension claiming to be a content script, which should now pass validation.
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 pages into separate processes, and a 'renderer' is the process drawing a page; if an attacker can break into one, the browser is supposed to keep checking what it is allowed to do. Here the browser trusted a web address that the broken process claimed for a failed page, and later used that address to decide which extensions may talk to it. That could let the broken process pretend to be a trusted part of an extension.
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.