Skip to content
Access control Advisory Advanced CVE-2026-17739

Insufficient policy enforcement in Extensions (CVE-2026-17739)

A logic flaw in the browser's extension permission check lets a malicious extension bypass the user's 'on click' restriction for a site. By racing a script injection request during a pending navigation, the extension can execute scripts on the restricted site because the browser checks permissions against the pending URL instead of the committed one.

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 vulnerability in ExtensionActionRunner allows extensions to bypass the "on click" (withheld host permissions) boundary. By timing a script injection request during a pending browser-initiated navigation, an extension can execute scripts on restricted origins because the browser incorrectly checks permissions against the pending URL rather than the committed URL.

Affected files:

  • chrome/browser/extensions/extension_action_runner.cc
  • chrome/browser/extensions/chrome_extension_frame_host.cc

Estimated timestamp from git blame: 2014-07-07

Summary

A Time-of-Check to Time-of-Use (TOCTOU) vulnerability exists in ExtensionActionRunner::RequiresUserConsentForScriptInjection() where the browser evaluates script injection permissions against the URL returned by web_contents()->GetVisibleURL() instead of the frame's committed URL. This allows a malicious extension with withheld permissions for a victim site to bypass the user consent requirement by triggering or waiting for a browser-initiated navigation to a site for which it already has permissions.

Technical Details

When an extension attempts to inject a script into a frame where its permissions are withheld (e.g., set to "On click"), the renderer pauses the injection and asks the browser for permission via the RequestScriptInjectionPermission IPC.

The browser handles this in ExtensionActionRunner::RequiresUserConsentForScriptInjection (chrome/browser/extensions/extension_action_runner.cc:250). At line 260, the browser fetches the URL to validate against:

C++
GURL url = web_contents()->GetVisibleURL();

In Chromium, GetVisibleURL() returns the pending navigation URL for browser-initiated navigations (like typing in the omnibox, clicking a bookmark, or using certain APIs like chrome.search.query) before the navigation has actually committed. However, the renderer process requesting the injection is still actively hosting the previous, committed document.

If an extension requests injection during this window, the browser sees the pending URL, concludes that the extension has permission (if it has access to the pending URL's origin), and grants the request. The renderer then blindly trusts this grant and injects the script into the still-active victim frame.

Potential Attack Scenario (Unverified)

Note: These steps are based on static analysis and have not been executed in a live environment.

  1. Setup: An attacker publishes a malicious extension requesting host_permissions for a victim site (https://victim.example/*) and an allowed site (https://allowed.example/*).
  2. Configuration: The user installs the extension and configures site access for victim.example to "On click" (withheld permissions). The extension retains full access to allowed.example.
  3. Navigation: The user navigates a tab to https://victim.example/. The page loads and the navigation commits.
  4. Trigger: A browser-initiated navigation to https://allowed.example/ is triggered in the same tab (e.g., via the omnibox or programmatically via an API like chrome.search.query which lacks the is_renderer_initiated flag).
  5. Race Condition: The extension detects the start of the navigation (e.g., via chrome.webNavigation.onBeforeNavigate). At this exact moment, NavigationControllerImpl::GetVisibleEntry() returns the pending entry for allowed.example.
  6. Injection Request: The extension immediately calls chrome.scripting.executeScript({target: {tabId: tab.id}, files: ["payload.js"]}).
  7. Renderer Check: The renderer checks the committed URL (victim.example), sees permissions are withheld, and sends RequestScriptInjectionPermission to the browser.
  8. Browser Bypass: The browser calls RequiresUserConsentForScriptInjection, evaluates web_contents()->GetVisibleURL() (which is now allowed.example), finds permissions are granted, and replies true.
  9. Execution: The renderer receives the grant and executes payload.js within the victim.example frame, bypassing the user's "On click" restriction.

Suggested Fix

Modify ExtensionActionRunner::RequiresUserConsentForScriptInjection to check permissions against the committed URL of the frame requesting the injection, rather than the GetVisibleURL() of the WebContents. This aligns with other permission checks, such as those in scripting::CanAccessTarget and ActiveTabPermissionGranter::GrantIfRequested.

C++
// In chrome/browser/extensions/extension_action_runner.cc:260
// Instead of:
// GURL url = web_contents()->GetVisibleURL();

// Use the last committed URL or the URL associated with the specific frame requesting injection.
GURL url = web_contents()->GetLastCommittedURL();

Evaluated with Chrome root at commit: e9e0fcbb690b1a8c1a26c81c2a9ea23d6e178368


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.

The original report as published on the Chromium issue tracker. Images and videos are our own copies; raw HTML is shown as text. View it on Chromium issue tracker.

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 browser uses the visible (pending) URL instead of the frame's committed URL when deciding whether an extension has permission to inject a script.

Impact

A malicious extension could execute scripts on a site where the user had withheld permissions, bypassing the 'on click' restriction.

What the attacker needed

Victim installs a malicious extension; extension has host permissions for victim and allowed sites; victim site access set to 'On click'; browser-initiated navigation to allowed site

The fix

The permission check should use the frame's committed URL instead of the visible URL.

How it was found

  1. Install a malicious extension that has host permissions for a victim site and an allowed site, and set the victim site's access to 'On click'.
  2. Navigate a tab to the victim site and let the page load.
  3. Trigger a browser-initiated navigation to the allowed site in the same tab.
  4. The extension detects the navigation start and immediately requests script injection.
  5. The renderer checks the committed URL (victim site) and asks the browser for permission.
  6. The browser checks the pending URL (allowed site), grants permission, and the script runs on the victim site.

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 install a browser extension, you can limit which websites it can access. This report shows a way for a malicious extension to get around that limit by asking to run code at the exact moment the browser is navigating to a different site that the extension is allowed to access. The browser mistakenly checks the new site's permissions instead of the current site's, so the extension can run code on the site you restricted.

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 from Google Chrome

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.