Skip to content
Access control Advisory Intermediate CVE-2026-5901

Policy bypass in DevTools (CVE-2026-5901)

Povcfe Follow

Originally disclosed on Chrome VRP

  • Fix shipped in 2 months

Report description

DevTools cookie write/delete APIs allow extensions to modify cookies for enterprise policy-blocked sites despite runtime_blocked_hosts restrictions


Bug location

Where do you want to report your vulnerability?

Chrome VRP – Report security issues affecting the Chrome browser. See program rules

Which URL (or repository) have you found the vulnerability in?

https://chromium.googlesource.com/chromium/src/


The problem

Please describe the technical details of the vulnerability

1. technical details

Chromium enforces enterprise host restrictions for extensions via runtime_blocked_hosts in the ExtensionSettings policy. On Windows this can be configured, for example, as:

REG
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Policies\Google\Chrome\ExtensionSettings]
"*"="{\"runtime_blocked_hosts\":[\"https://www.google.com/*\"]}"

This is intended to ensure that extensions cannot interact with https://www.google.com/*, even if they have powerful permissions like debugger.

When an extension uses the chrome.debugger API, the DevTools client for extensions (ExtensionDevToolsClientHost) consults ExtensionMayAttachToURL / ExtensionMayAttachToURLOrInnerURL, which explicitly treats policy-blocked hosts as forbidden:

C++
// chrome/browser/extensions/api/debugger/debugger_api.cc
bool ExtensionMayAttachToURL(const Extension& extension,
                             Profile* extension_profile,
                             const GURL& url,
                             std::string* error) {
  ...
  const GURL& url_for_restriction_check =
      url.SchemeIsBlob() ? url::Origin::Create(url).GetURL() : url;
  if (extension.permissions_data()->IsRestrictedUrl(url_for_restriction_check,
                                                    error)) {
    return false;
  }

  // Policy blocked hosts supersede the `debugger` permission.
  if (extension.permissions_data()->IsPolicyBlockedHost(url) ||
      extension.permissions_data()->IsPolicyBlockedHost(
          url_for_restriction_check)) {
    *error = kRestrictedError;
    return false;
  }
  ...
}

This correctly prevents an extension from attaching DevTools directly to a tab whose URL matches runtime_blocked_hosts (such as https://www.google.com).

However, once an extension is attached to any allowed tab, it can still use DevTools Protocol (CDP) commands that operate on the global cookie jar and supply arbitrary target URLs or domains. For cookie read operations, the implementation has been updated to use the DevTools client’s MayAttachToURL check when deciding which hosts are accessible:

C++
// content/browser/devtools/protocol/network_handler.cc
void NetworkHandler::GetCookies(
    std::unique_ptr<Array<String>> protocol_urls,
    std::unique_ptr<GetCookiesCallback> callback) {
  ...
  std::vector<GURL> urls = ComputeCookieURLs(host_, protocol_urls);
  bool is_webui = host_ && host_->web_ui();

  std::erase_if(urls, [=, this](const GURL& url) {
    return !client_->MayAttachToURL(url, is_webui);
  });
  ...
}

and similarly for GetAllCookies, which filters the results using synthesized HTTP/HTTPS URLs per cookie domain. This ensures that enterprise host restrictions are applied to cookie enumeration.

In contrast, cookie write/delete/clear DevTools handlers do not perform any MayAttachToURL or policy-based checks on the target url or domain. They act only on the presence of a StoragePartition and the syntactic validity of the cookie parameters:

C++
// content/browser/devtools/protocol/network_handler.cc
void NetworkHandler::SetCookie(
    const std::string& name,
    const std::string& value,
    std::optional<std::string> url,
    std::optional<std::string> domain,
    std::optional<std::string> path,
    std::optional<bool> secure,
    std::optional<bool> http_only,
    std::optional<std::string> same_site,
    std::optional<double> expires,
    std::optional<std::string> priority,
    std::optional<bool> same_party,
    std::optional<std::string> source_scheme,
    std::optional<int> source_port,
    std::unique_ptr<Network::CookiePartitionKey> partition_key,
    std::unique_ptr<SetCookieCallback> callback) {
  if (!storage_partition_) {
    callback->sendFailure(Response::InternalError());
    return;
  }

  auto cookie_or_error = MakeCookieFromProtocolValues(
      name, value, url.value_or(""), domain.value_or(""), path.value_or(""),
      secure.value_or(false), http_only.value_or(false), same_site.value_or(""),
      expires.value_or(-1), priority.value_or(""), source_scheme, source_port,
      partition_key);
  ...
  storage_partition_->GetCookieManagerForBrowserProcess()->SetCanonicalCookie(
      *cookie, net::cookie_util::SimulatedCookieSource(*cookie, "https"),
      options,
      base::BindOnce(net::cookie_util::IsCookieAccessResultInclude)
          .Then(base::BindOnce(&SetCookieCallback::sendSuccess,
                               std::move(callback))));
}

void NetworkHandler::DeleteCookies(
    const std::string& name,
    std::optional<std::string> url_spec,
    std::optional<std::string> domain,
    std::optional<std::string> path,
    std::unique_ptr<Network::CookiePartitionKey> partition_key,
    std::unique_ptr<DeleteCookiesCallback> callback) {
  if (!storage_partition_) {
    callback->sendFailure(Response::InternalError());
    return;
  }
  if (!url_spec.has_value() && !domain.has_value()) {
    callback->sendFailure(Response::InvalidParams(
        "At least one of the url and domain needs to be specified"));
  }
  ...
  cookie_manager->GetAllCookies(
      base::BindOnce(&DeleteFilteredCookies, base::Unretained(cookie_manager),
                     name, normalized_domain, path.value_or(""),
                     std::move(partition_key), std::move(callback)));
}

The storage domain DevTools handler exposes a similar cookie-clearing operation without policy checks:

C++
// content/browser/devtools/protocol/storage_handler.cc
void StorageHandler::ClearCookies(
    std::optional<std::string> browser_context_id,
    std::unique_ptr<ClearCookiesCallback> callback) {
  StoragePartition* storage_partition = nullptr;
  Response response = StorageHandler::FindStoragePartition(browser_context_id,
                                                           &storage_partition);
  if (!response.IsSuccess()) {
    callback->sendFailure(std::move(response));
    return;
  }

  storage_partition->GetCookieManagerForBrowserProcess()->DeleteCookies(
      network::mojom::CookieDeletionFilter::New(),
      base::BindOnce([](std::unique_ptr<ClearCookiesCallback> callback,
                        uint32_t) { callback->sendSuccess(); },
                     std::move(callback)));
}

As a result, once an extension is attached to a tab that is not policy-blocked, it can use chrome.debugger.sendCommand to invoke:

  • Network.setCookie with url: "https://www.google.com/", to create or overwrite a cookie on a host that is policy-blocked for the extension.
  • Network.deleteCookies with domain: "www.google.com", to remove specific cookies for that host.
  • Storage.clearCookies, to clear all cookies in the current profile’s cookie store, including those for policy-blocked sites such as https://www.google.com/.

The PoC extension in web/devtools_cookies/extension demonstrates this pattern. Its popup script attaches to the active tab and then calls DevTools cookie commands targeting https://www.google.com/:

JavaScript
// web/devtools_cookies/extension/popup.js
const PROTOCOL_VERSION = '1.3';
const TARGET_URL = 'https://www.google.com/';
const TARGET_DOMAIN = 'www.google.com';
...
function sendCommand(method, params) {
  ...
  chrome.debugger.sendCommand(debuggee, method, params, (result) => {
    ...
  });
}

document.getElementById('setCookie').addEventListener('click', () => {
  ensureAttached((ok) => {
    if (!ok) return;
    const params = {
      name: 'devtools_poc',
      value: 'ts_' + Date.now(),
      url: TARGET_URL,
      path: '/',
      secure: true,
      httpOnly: false
    };
    sendCommand('Network.setCookie', params);
  });
});

The extension only requires the debugger permission and user interaction to attach; it does not require host permissions for https://www.google.com/, and the enterprise runtime_blocked_hosts policy entry does not prevent these DevTools cookie operations.

Overall, this creates a discrepancy: cookie reads respect runtime_blocked_hosts via MayAttachToURL, while cookie writes/deletes/clears do not, allowing extensions to mutate cookie state on policy-blocked hosts.

2. vulnerability reproduction

  1. On Windows, import the provided policy file:
    • Double-click web/devtools_cookies/policy_runtime_blocked_hosts_google.reg to add the ExtensionSettings policy under HKCU\Software\Policies\Google\Chrome.
    • Restart Chrome and verify on chrome://policy that ExtensionSettings is present and runtime_blocked_hosts contains https://www.google.com/*.
  2. In Chrome, open chrome://extensions, enable Developer mode, and load the unpacked extension from web/devtools_cookies/extension.
  3. Open any tab that is not https://www.google.com (for example, https://example.com).
  4. Click the extension’s toolbar icon:
    • Click “Attach to active tab” (step 1) to call chrome.debugger.attach for the current tab.
    • Click “Set poc cookie on https://www.google.com/” (step 2). The extension invokes Network.setCookie with url: "https://www.google.com/".
    • Optionally click “Delete poc cookie on https://www.google.com/” (step 3) and “Clear all cookies in current profile” (step 4), which invoke Network.deleteCookies and Storage.clearCookies.
  5. In a separate tab, visit https://www.google.com (or clear and then visit it) and observe that:
    • The devtools_poc cookie is present or has been removed according to the actions performed by the extension.
    • If you were logged in, removing or clearing cookies can force sign-out and disrupt the session.

These steps show that an extension subject to runtime_blocked_hosts: ["https://www.google.com/*"] can still modify (set, delete, or clear) cookies for https://www.google.com/ via DevTools cookie APIs, even though direct attachment to that URL is correctly blocked.

Impact analysis

  • Who can exploit it: Any installed extension that declares the debugger permission and can run in an environment where administrators configure runtime_blocked_hosts to restrict host access (for example, adding https://www.google.com/*). A user must interact with the extension (e.g., click its action) to allow it to attach to some non-policy-blocked tab via chrome.debugger.attach.

  • What they gain: Once attached to an allowed tab, the extension can use DevTools cookie APIs (Network.setCookie, Network.deleteCookies, Storage.clearCookies) to modify cookies for hosts that are policy-blocked for that extension, including https://www.google.com/. Practically, this enables:

    • Injecting or overwriting cookies on policy-blocked sites (which may influence site behavior or application state, and could become more serious in combination with site-side weaknesses such as session fixation vulnerabilities).
    • Deleting specific cookies or clearing all cookies, forcing sign-outs and disrupting user sessions on policy-blocked sites.
  • Security significance (classification): This is best categorized as a Permissions Bypass / enterprise policy enforcement bypass for extension host restrictions. It does not grant the ability to read cookie values that are otherwise protected, nor does it provide remote code execution, a sandbox escape, or a privilege escalation beyond the extension’s existing capabilities. However, it weakens administrator expectations that runtime_blocked_hosts completely prevents extensions from influencing sensitive sites, by allowing extensions to tamper with cookie-based session and configuration state on those policy-blocked hosts.


The cause

What version of Chrome have you found the security issue in?

145.0.7632.1/stable

Is the security issue related to a crash?

No, it is not related to a crash.

Choose the type of vulnerability

Permissions Bypass

How would you like to be publicly acknowledged for your report?

Povcfe of Tencent Security Xuanwu Lab

The original report as published on the Chromium issue tracker, by Povcfe of Tencent Security Xuanwu Lab. 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.

What is known

A low-severity access control bug in DevTools (Google Chrome). Chrome VRP made it public on 7 April 2026 as CVE-2026-5901. Fixed in version 147.0.7727.55.

About 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.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

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 by Povcfe

View all

6 more disclosed reports, best first.

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.