Skip to content
Info disclosure Advisory Advanced CVE-2026-130942

Observable discrepancy in Extensions (CVE-2026-130942)

An extension with only declarativeNetRequest and declarativeNetRequestFeedback permissions, but no host permissions, can extract sensitive response headers cross-origin. It does this by creating ALLOW rules with responseHeaders conditions using wildcards and using getMatchedRules as an oracle to infer the header value byte-by-byte.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 8 months

Project Fortify, an experimental security project, has identified the following potential security issue.

Overview: An extension with declarativeNetRequest and declarativeNetRequestFeedback permissions, but no host permissions, can extract sensitive response headers (like Set-Cookie) cross-origin. It achieves this by creating ALLOW rules with responseHeaders conditions using wildcards, and using getMatchedRules as an oracle to infer the header value byte-by-byte.

Affected files:

  • extensions/browser/api/declarative_net_request/request_params.cc
  • extensions/browser/api/declarative_net_request/composite_matcher.cc
  • extensions/browser/api/declarative_net_request/action_tracker.cc
  • extensions/browser/api/declarative_net_request/declarative_net_request_api.cc
  • extensions/browser/api/declarative_net_request/rules_monitor_service.cc
  • extensions/browser/api/declarative_net_request/ruleset_manager.cc
  • extensions/browser/api/web_request/extension_web_request_event_router.cc
  • extensions/browser/api/web_request/web_request_info.cc
  • extensions/browser/api/declarative_net_request/indexed_rule.cc

Estimated timestamp from git blame: 2024-05-22

Summary

A potential vulnerability in the declarativeNetRequest (DNR) API allows an extension with only the declarativeNetRequest and declarativeNetRequestFeedback permissions to read sensitive response headers (such as Set-Cookie, Authorization, or CSRF tokens) from any website the user visits. This bypasses the Chrome extension permission model, which normally requires explicit host permissions for cross-origin data access.

Vulnerability Mechanism

The issue arises from the combination of DNR's responseHeaders matching condition and the getMatchedRules API, which together create a side-channel oracle:

  1. Response Header Matching: Extensions can define rules that match based on response headers. The matching logic in extensions/browser/api/declarative_net_request/request_params.cc uses base::MatchPattern, which supports wildcards (* for 0+ characters and ? for 0-1 characters).
  2. Forcing Cookie Visibility: By default, sensitive headers like Set-Cookie are stripped from the response headers sent from the Network Service to the browser process. To bypass this, an attacker extension can register a dummy chrome.webRequest.onHeadersReceived listener with the ["extraHeaders"] option. This sets has_any_extra_headers_listeners_ to true in WebRequestProxyingURLLoaderFactory::InProgressRequest, appending kURLLoadOptionUseHeaderClient to the URLLoader options and exposing the raw cookies to the browser process and DNR engine.
  3. Lack of Host Permission Check for Evaluation: Rulesets for extensions with the declarativeNetRequest permission are evaluated for every request regardless of host permissions. GetHostPermissionsAlwaysRequired (in rules_monitor_service.cc) returns false for this permission, causing DNR to evaluate rules with WebRequestPermissions::DO_NOT_CHECK_HOST in ruleset_manager.cc.
  4. Host Permission Bypass for ALLOW Actions: In CompositeMatcher::GetAction, only REDIRECT actions are flagged as requiring host permissions. ALLOW and BLOCK actions are returned even if the extension lacks host permissions for the request's origin.
  5. Information Leak via getMatchedRules: When a rule matches, if the extension has the declarativeNetRequestFeedback permission, the match is recorded by the ActionTracker (in action_tracker.cc). Crucially, ShouldRecordMatchedRule only checks for the feedback permission and does not verify if the extension has host access to the request's URL. The extension can then call chrome.declarativeNetRequest.getMatchedRules() to retrieve the rule_id of the rule that matched.

Potential Exploit Scenario (The Oracle)

An extension can implement a byte-by-byte extraction oracle as follows (note: these are suggested steps, our tooling agent doesn't yet have the ability to run code):

  1. The extension adds session rules matching prefixes of a sensitive header: sessionid=a*, sessionid=b*, etc., each with a unique rule_id encoding the character.
  2. The extension registers a dummy webRequest listener with ["extraHeaders"] to ensure cookies are sent to the browser process.
  3. When the user visits a target site (e.g., via a hidden iframe), the DNR engine matches the header against the rules. If the site sends Set-Cookie: sessionid=k7f3..., the rule for sessionid=k* matches because the ALLOW action bypasses host permission withholding.
  4. The extension calls getMatchedRules, learns the first byte is 'k' (converted to lowercase by base::ToLowerASCII in HasHeaderValue), and updates its session rules to probe the next byte (sessionid=ka*, sessionid=kb*, etc.).
  5. Through iterative updates and monitoring of subsequent requests or navigations, the extension can extract the full header value.

Suggested Fix

The vulnerability stems from the fact that getMatchedRules exposes information about requests for which the extension does not have host permissions. The fix should likely involve one or more of the following:

  1. Modify ActionTracker::ShouldRecordMatchedRule to ensure that rules are only recorded if the extension has host permissions for the request URL, similar to the checks performed for REDIRECT actions or when evaluating kDeclarativeNetRequestWithHostAccess extensions.
  2. Alternatively, declarativeNetRequest.getMatchedRules could be restricted to only return matches for URLs where the extension has host permissions at the time of the API call.
  3. Restrict the responseHeaders condition itself to only evaluate on requests where the extension has host permissions.

Evaluated with Chrome root at commit: a9cbf6e8b275fe4147435aa905f3b7f5a656f5f0


Results from 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

Likely the getMatchedRules API records rule matches without checking whether the extension has host permissions for the request URL, and ALLOW actions are returned even without host permissions.

Impact

An attacker could read sensitive response headers such as Set-Cookie, Authorization, or CSRF tokens from any website the user visits, bypassing the extension permission model.

What the attacker needed

Victim installs malicious extension; extension has DNR and feedback permissions; extension lacks host permissions; victim visits target site

The fix

The fix should likely involve ensuring that getMatchedRules only records or returns matches for URLs where the extension has host permissions, or restricting the responseHeaders condition to requests with host permissions.

How it was found

  1. The extension adds session rules matching prefixes of a sensitive header, each with a unique rule_id encoding the character.
  2. The extension registers a dummy webRequest listener with extraHeaders to ensure cookies are sent to the browser process.
  3. When the user visits a target site, the DNR engine matches the header against the rules.
  4. The extension calls getMatchedRules, learns the first byte, and updates its session rules to probe the next byte.
  5. Through iterative updates and monitoring of subsequent requests or navigations, the extension can extract the full header value.

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.

Browser extensions normally need explicit permission to read data from websites. This report shows that a malicious extension could bypass that requirement and read secret values like session cookies by asking the browser a series of yes/no questions about the cookie's value. The extension never directly sees the cookie, but it can guess it one character at a time.

What is Info disclosure?

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.

More from Google Chrome

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.