Insufficient data validation in Extensions (CVE-2026-13919)
A logic flaw in ScriptInjectionTracker fails to ignore error pages during navigation commit, so a compromised renderer can force an error page to commit in its own process while retaining the victim's URL. This could let the attacker's process be wrongly granted extension content script privileges for that URL and forge IPC messages as if it were the legitimate content script.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 54 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 without the Chrome Security team. Please see https://chromium.googlesource.com/chromium/src/+/main/docs/security/ai-generated-security-bugs-faq.md for more information.
Overview: A logic flaw in ScriptInjectionTracker potentially allows a compromised renderer process to bypass Site Isolation and gain unauthorized extension content script privileges. By using a Content Security Policy to block a cross-origin iframe navigation, an attacker can force an error page to commit in their process while retaining the victim's URL. The tracker fails to ignore error pages, mistakenly granting the attacker's process the permissions associated with the victim's URL.
Affected files:
extensions/browser/script_injection_tracker.ccextensions/browser/extension_web_contents_observer.cccontent/browser/renderer_host/navigation_request.cc
Estimated timestamp from git blame: 2023-10-25
Summary
ScriptInjectionTracker tracks which renderer processes are authorized to run content scripts for specific extensions. This browser-side state is critical for validating IPC requests (like messaging) to ensure they originate from legitimate processes.
A potential vulnerability exists where ScriptInjectionTracker fails to account for error pages during navigation commit. If a subframe navigation is blocked by the parent frame's Content Security Policy (e.g., frame-src 'none'), an error page is committed. Because subframe error page isolation is generally disabled, this error page commits in the parent's (attacker's) process. The tracker observes the intended destination URL of the error page, assumes a successful cross-origin navigation, and incorrectly grants the attacker's process the privileges of any extension content scripts configured to run on the target URL.
Potential Vulnerability Flow
Based on code analysis, the following sequence outlines how an attacker could potentially trigger this issue:
- Attacker Setup: An attacker compromises a renderer process for
https://attacker.com/. The attacker's page serves a CSP headerContent-Security-Policy: frame-src 'none'. - Blocked Navigation: The compromised page injects an iframe targeting a victim site:
<iframe src="https://victim.com/">. - Error Page Assignment: The browser's
NavigationRequest::CheckContentSecurityPolicyblocks the request, resulting innet::ERR_BLOCKED_BY_CSP. BecauseSiteIsolationPolicy::IsErrorPageIsolationEnabledreturnsfalsefor subframes,NavigationRequest::ComputeErrorPageProcessdesignates the current (attacker's) process to host the error page. - Flawed Tracking: During the commit phase,
ScriptInjectionTracker::ReadyToCommitNavigation(and subsequentlyDidFinishNavigation) is invoked inextensions/browser/script_injection_tracker.cc. - Missing Error Check: Crucially, these methods extract the intended URL (
const GURL& url = navigation->GetURL();) but fail to verify if the navigation is an error page (navigation->IsErrorPage()). - Capability Granted: The tracker passes the victim URL to
GetExtensionsInjectingContentScriptsand thenStoreExtensionsInjectingScripts. This permanently adds the target extension's ID to the attacker'sRenderProcessHostUserData, authorizing the process to act as the extension's content script. - IPC Forgery: The compromised renderer crafts a forged IPC (e.g.,
ExtensionHostMsg_OpenChannelToExtension) claiming to be the extension's content script running onhttps://victim.com/. - Validation Bypass:
- The browser's
IsValidMessagingSourcechecks process capabilities viaScriptInjectionTracker::DidProcessRunContentScriptFromExtension. Because of Step 6, this passes. - The browser's
IsValidSourceUrlverifies the origin by checking if the iframe'sGetLastCommittedURL()matches the IPC payload. Because Chrome preserves the intended URL for error pages, the iframe's committed URL ishttps://victim.com/, matching the payload perfectly and bypassing base-origin checks.
- The browser's
As a result, the attacker process successfully escalates privileges to interact with the target extension's background context.
Note: These steps are suggested based on code analysis; a working Proof of Concept has not yet been executed in a live environment.
Suggested Fix
To remediate this issue, ScriptInjectionTracker should explicitly ignore navigations that result in an error page.
In extensions/browser/script_injection_tracker.cc:
- Modify
ReadyToCommitNavigationto return early for error pages:
void ScriptInjectionTracker::ReadyToCommitNavigation(
base::PassKey<ExtensionWebContentsObserver> pass_key,
content::NavigationHandle* navigation) {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
if (navigation->IsErrorPage()) {
return;
}
// ... existing code ...
- Add the same check to
DidFinishNavigation:
void ScriptInjectionTracker::DidFinishNavigation(
base::PassKey<ExtensionWebContentsObserver> pass_key,
content::NavigationHandle* navigation) {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
if (!navigation->HasCommitted() || navigation->IsSameDocument() ||
navigation->IsPrerenderedPageActivation() ||
navigation->IsErrorPage()) {
return;
}
// ... existing code ...
Evaluated with Chrome root at commit: eca8648a4e1cdfdda68c495a6003059fed641955
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
Likely, ScriptInjectionTracker does not check whether a navigation is an error page before recording the intended URL and granting content script permissions to the process hosting the error page.
Impact
A compromised renderer could bypass Site Isolation and gain unauthorized extension content script privileges, allowing it to interact with the target extension's background context; however, the report notes that a working proof of concept has not been executed.
What the attacker needed
Compromised renderer process; victim extension with content script on target URL; attacker page with CSP frame-src 'none'
The fix
ScriptInjectionTracker should be modified to return early for error pages in both ReadyToCommitNavigation and DidFinishNavigation.
How it was found
- The attacker compromises a renderer process and serves a page with a CSP that blocks all frame sources.
- The attacker's page injects an iframe pointing to a victim site.
- The browser blocks the iframe navigation due to CSP and commits an error page in the attacker's process, keeping the victim URL.
- ScriptInjectionTracker processes the navigation commit but does not check for an error page.
- The tracker records the victim URL and grants the attacker's process the extension content script permissions for that URL.
- The compromised renderer sends a forged IPC message claiming to be the extension's content script on the victim URL, and validation passes.
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 a web page loads another site in a frame, the browser keeps track of which process is allowed to run extension scripts for that site. Here, if the frame load is blocked by a security rule, the browser shows an error page but still remembers the address the frame was trying to reach. The bug is that the browser then treats the attacker's process as if it had really loaded that address, which could let it pretend to be the extension's script.
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.