Race condition in WebAppInstalls (CVE-2026-91723)
Chrome's Web Install API dialog could remain open after the initiating page navigated to a trusted site, because the navigation observer was registered too late and the dialog read the current origin at display time. An attacker could therefore show an install prompt for a malicious PWA while the URL bar and dialog both displayed a trusted domain such as www.google.com.
Originally disclosed on Chrome VRP
- Fix shipped in 8 months
VULNERABILITY DETAILS
Chrome's Web Install API (navigator.install(install_url)) contains a race condition that allows an attacker to display a PWA installation dialog while a trusted domain (e.g., www.google.com) is shown in the URL bar.
The installation dialog is expected to be dismissed if the initiating page navigates away. However, due to late registration of a navigation observer, the navigation event may be missed, allowing the dialog to remain visible after a cross-origin navigation has already committed.
In addition, the dialog attempts to display the "initiating origin" by querying the current web_contents->GetPrimaryMainFrame()->GetLastCommittedOrigin() at display time rather than using a value captured when navigator.install() was invoked. As a result, the dialog may incorrectly display the navigated-to origin instead of the true initiating origin, further legitimizing the spoof.
For reference, similar issues with related impact have been addressed in the past, such as https://issues.chromium.org/issues/40061289 and https://issues.chromium.org/issues/40062424. However, this issue is more severe, as it allows both the URL bar and the install dialog itself to present a spoofed origin while installing a malicious PWA.
Late observer registration
A base class WebAppModalDialogDelegate registers a WebContentsObserver and implements PrimaryPageChanged() to close the dialog on navigation:
// web_app_modal_dialog_delegate.cc:14-16
WebAppModalDialogDelegate::WebAppModalDialogDelegate(
content::WebContents* web_contents)
: content::WebContentsObserver(web_contents) {}
// web_app_modal_dialog_delegate.cc:39-41
void WebAppModalDialogDelegate::PrimaryPageChanged(content::Page& page) {
CloseDialogAsIgnored();
}
WebAppInstallDialogDelegate inherits from this base class:
// web_app_install_dialog_delegate.cc:139-148
WebAppInstallDialogDelegate::WebAppInstallDialogDelegate(
content::WebContents* web_contents,
...)
: WebAppModalDialogDelegate(web_contents),
...
However, the delegate is still only constructed at the end of a long async chain involving permission prompts, manifest fetching, and icon downloads. If a navigation commits before the dialog is created, the PrimaryPageChanged event has already fired and the dialog never receives it.
Wrong origin displayed
The dialog shows the "initiating origin" but reads it from the current state of web_contents:
// web_app_simple_install_dialog.cc:137-143
if (show_initiating_origin) {
url::Origin initiating_origin =
web_contents->GetPrimaryMainFrame()->GetLastCommittedOrigin();
std::u16string origin_url = url_formatter::FormatOriginForSecurityDisplay(
initiating_origin, url_formatter::SchemeDisplay::OMIT_HTTP_AND_HTTPS);
dialog_model_builder.SetSubtitle(l10n_util::GetStringFUTF16(
IDS_INSTALL_PWA_DIALOG_ORIGIN_LABEL, origin_url));
}
This retrieves the current origin (after navigation), not the origin when navigator.install() was called.
Here's a breakdown of what is currently happening:
- User clicks a button on attacker's page, triggering
navigator.install(install_url). - A
setTimeout(5)callback immediately starts navigation to a trusted domain (e.g., https://www.google.com). - The browser begins async operations: permission check, manifest fetch, icon download.
- Navigation commits and
PrimaryPageChangedfires - but no dialog delegate exists yet to observe it. - The manifest is fetched from the
install_urland icons are downloaded. - The install dialog is finally created (
WebAppInstallDialogDelegateconstructor called). - The dialog delegate starts observing
web_contentsforPrimaryPageChanged- but the navigation already completed. - The dialog reads
GetLastCommittedOrigin()which returns the trusted domain. - The dialog shows "Install from www.google.com" while the malicious PWA is being installed.
- If the user accepts the installation, a malicious PWA is installed while the user believes it was requested by the trusted domain.
I have also attached a video reproducing the attack (repro.mp4).
BISECT
It seems the vulnerability was introduced when the feature was implemented (https://issuetracker.google.com/issues/333795265).
I attempted to bisect it, but had problems doing so, and then decided to track it down based on my root cause analysis. It appears the vulnerable code was added in https://chromium-review.googlesource.com/c/chromium/src/+/6626173.
VERSION
Chrome Version: 143.0.7499.170 (Stable)
Chrome Version: 144.0.7559.31 (Beta)
Chrome Version: 145.0.7587.5 (Dev)
Chrome Version: 145.0.7618.0 (Canary)
Operating System: Windows 11 24H2
REPRODUCTION CASE
- Download
index.htmland serve it from a web server on port 8080. This port must be used, as the provided Origin Trial token is bound to it. - Navigate to http://localhost:8080 and click the
Grant permissionsbutton. - The Web Install API permission prompt will appears. Grant the permission by clicking
Allow. - Click the
Execute PoCbutton. The page will automatically navigate to www.google.com. - The PWA installation dialog will appears while www.google.com is shown in the address bar, and the dialog itself will incorrectly list www.google.com as the initiating origin.
CREDIT INFORMATION
Reporter credit: Luan Herrera (@lbherrera_)
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 dialog delegate is constructed only after a long async chain, so it misses the navigation event, and it reads the current committed origin at display time instead of the origin captured when navigator.install() was called.
Impact
A user could be tricked into installing a malicious PWA while both the URL bar and the install dialog present a trusted origin, though the user must still accept the installation.
What the attacker needed
Chrome with Web Install API enabled; User grants install permission; Victim clicks attacker's button; Attacker page served on required port
How it was found
- Serve the provided page from a local web server on the required port.
- Open the page and grant the Web Install API permission when prompted.
- Click the button that triggers the install and the navigation to the trusted site.
- Observe the install dialog appearing while the trusted domain is shown in the address bar and in the dialog.
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 a website asks Chrome to install an app, Chrome shows a dialog naming the site that asked. This report shows that if the page quickly navigates to a trusted site, the dialog can appear late and name the trusted site instead of the attacker's page. A user could then install a malicious app believing a trusted site requested it.
What is Race condition?
Parallel requests reach a state the code assumed could not happen: a coupon used twice, a limit overrun, a check skipped.