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

Incorrect authorization in WebAppInstalls (CVE-2026-106324)

WebappRegistry.hasAtLeastOneWebApkForOrigin() uses raw string prefix matching to check if an origin has an installed WebAPK, causing cross-origin false positives. An attacker controlling a domain that is a string prefix of a victim's WebAPK scope can bypass the notification permission prompt on Android 13+ and potentially inherit notification permissions or cause denial of service.

Narenda Singh Follow

Originally disclosed on Chrome VRP

Bounty$2,000 Medium View original
  • Fix shipped in 6 months

Report description

WebAPK origin prefix matching in WebappRegistry.java bypasses notification permission prompt on Android 13+ via scope.startsWith(origin) cross-origin false positives


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?

Chrome Android.


The problem

Please describe the technical details of the vulnerability

Summary

WebappRegistry.hasAtLeastOneWebApkForOrigin() uses raw string prefix matching (startsWith) to determine if a given origin has an installed WebAPK. This produces cross-origin false positives whenever one hostname is a string prefix of another, allowing an attacker-controlled origin to hijack the notification permission flow on Android 13+.

Java
// WebappRegistry.java:272-284 (current main)
if (scope.startsWith(origin) && PackageUtils.isPackageInstalled(webApkPackageName))

False positive examples:

  • "https://example.com/app/".startsWith("https://example.co") = true
  • "https://a.company.com/".startsWith("https://a.com") = true
  • "https://my.community.org/".startsWith("https://my.com") = true

On Android 13+, when hasAtLeastOneWebApkForOrigin() returns true, Chrome skips the normal notification permission prompt entirely and delegates the decision to InstalledWebappBridge::DecidePermission().

Affected code

Primary vulnerability: WebappRegistry.java:272-284 src/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappRegistry.java

Call chain (verified on current main branch):

  1. notification_permission_context.cc:168-169 calls ShortcutHelper::DoesOriginContainAnyInstalledWebApk(origin)
  2. ShortcutHelper.java calls WebappRegistry.getInstance().hasAtLeastOneWebApkForOrigin(origin.toLowerCase())
  3. WebappRegistry.java:272-284 uses scope.startsWith(origin) - vulnerable check
  4. If returns true, notification_permission_context.cc:180-189 delegates to InstalledWebappBridge::DecidePermission() instead of showing the normal prompt

Also affects: periodic_background_sync_permission_context.cc gates periodic background sync permission on installed-PWA status.

Attack scenario

  1. User installs a WebAPK for https://example.com/app/ (banking PWA).
  2. Attacker controls https://example.co.
  3. User visits https://example.co.
  4. Chrome checks hasAtLeastOneWebApkForOrigin("https://example.co").
  5. "https://example.com/app/".startsWith("https://example.co") = true (because "com" starts with "co").
  6. Chrome skips the normal notification permission prompt and enters the WebAPK delegation path.

Collision examples:

  • https://example.com/ vs https://example.co - "com" starts with "co"
  • https://a.company.com/ vs https://a.com - "company" starts with "com"
  • https://my.community.org/ vs https://my.com - "community" starts with "com"

Runtime confirmation (A/B test)

Tested on a Pixel 7 (Android 14, arm64) with Chrome 146.0.7680.178 and Google Play Services v26.12.33.

Setup:

  1. Installed a legitimate WebAPK for https://victim-bank.example.com/app/ via Chrome's "Add to Home screen"
  2. Set up attacker page at https://victim-bank.example.co/
  3. Verified prefix match: "https://victim-bank.example.com/app/".startsWith("https://victim-bank.example.co") = true

A/B comparison:

  • Control origin (no prefix match): Standard Chrome "Allow notifications?" prompt, blocks waiting for user input
  • Attack origin (prefix match): No dialog shown, returns denied instantly (<200ms), logcat shows cr_TWAClient: Unable to request notification permission

The cr_TWAClient log proves Chrome entered InstalledWebappBridge::DecidePermission() - the code path reserved for origins with installed WebAPKs.

Root cause

String-level origin comparison where parsed origin comparison is required. The same file already has a correct implementation:

Java
// getOriginsWithWebApk() - CORRECT:
Origin origin = Origin.create(scope);
origins.add(origin.toString());
// Uses Set.contains() for exact match

// hasAtLeastOneWebApkForOrigin() - VULNERABLE:
scope.startsWith(origin)  // Raw string prefix

Suggested fix

Java
public boolean hasAtLeastOneWebApkForOrigin(String origin) {
    for (WebappDataStorage storage : mStorages.values()) {
        String scope = getWebApkScopeFromStorage(storage);
        if (scope.isEmpty()) continue;
        String webApkPackageName = storage.getWebApkPackageName();
        assumeNonNull(webApkPackageName);
        Origin scopeOrigin = Origin.create(scope);
        if (scopeOrigin != null
                && scopeOrigin.toString().equals(origin)
                && PackageUtils.isPackageInstalled(webApkPackageName)) {
            return true;
        }
    }
    return false;
}

Chrome version

Chrome 146.0.7680.178 (arm64), Android 14 (Pixel 7).

Impact analysis

An attacker who controls a domain that is a string prefix of any installed WebAPK's scope URL can:

  1. Bypass notification permission prompt (Android 13+): Chrome skips the standard "Allow notifications?" dialog and routes through the WebAPK delegation path. The user never sees a permission prompt for the attacker's origin.

  2. Silent notification permission inheritance: If the victim's WebAPK already has notification permission granted, the attacker's origin can silently inherit that permission through the delegation path, enabling push notifications without any user consent.

  3. Permanent notification denial-of-service: When delegation fails, the attacker's origin gets denied instead of prompt, permanently preventing the user from ever granting notification permission for that origin through Chrome's normal flow.

  4. Unauthorized periodic background sync: The same prefix match check gates periodic background sync permissions, allowing the attacker to register background sync tasks without meeting Chrome's normal engagement requirements.

Attack complexity is low - attacker only needs to register a domain that is a string prefix of a victim's installed WebAPK scope. Many natural collisions exist between .co and .com TLDs, and .com substring in longer TLDs like .community, .company, .commerce.


The cause

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

146.0.7680.178 stable (Android 14, Pixel 7 emulator)

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?

Narenda Singh (@_3P1C)

The original report as published on the Chromium issue tracker, by Narenda Singh (@_3P1C). Images and videos are our own copies; raw HTML is shown as text. View it on Chromium issue tracker.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 6 min read.

Context

Chrome on Android lets sites that have been installed as a WebAPK (a Progressive Web App installed through "Add to Home screen") take part in the notification permission flow. On Android 13 and later, when an origin already has an installed WebAPK, Chrome does not show the usual "Allow notifications?" dialog. Instead it hands the decision to InstalledWebappBridge::DecidePermission(), the delegation path reserved for origins with installed WebAPKs.

The check that decides whether an origin has an installed WebAPK lives in WebappRegistry.java, in the method hasAtLeastOneWebApkForOrigin(). The report shows that this method compares origins as raw strings rather than as parsed origins, which produces cross-origin false positives and lets an attacker-controlled origin enter the WebAPK delegation path.

The issue was reported through the Chrome Vulnerability Reward Program and classified as a permissions bypass.

Setup

The researcher tested on a Pixel 7 running Android 14 (arm64) with Chrome 146.0.7680.178 and Google Play Services v26.12.33. The version field in the report lists 146.0.7680.178 stable on an Android 14 Pixel 7 emulator.

The test needed two things:

  1. A legitimate WebAPK installed for https://victim-bank.example.com/app/, installed through Chrome's "Add to Home screen".
  2. An attacker page served at https://victim-bank.example.co/.

No accounts, credentials or special tooling are described beyond the device, Chrome and Play Services versions and logcat output.

Finding it

The problem is in this check in WebappRegistry.java:272-284 (current main at the time of the report):

Java
// WebappRegistry.java:272-284 (current main)
if (scope.startsWith(origin) && PackageUtils.isPackageInstalled(webApkPackageName))

scope is the scope URL of an installed WebAPK and origin is the origin being checked. Because the comparison is a plain string prefix test, any hostname that is a string prefix of another hostname matches. The report gives these false positive examples:

  • "https://example.com/app/".startsWith("https://example.co") = true
  • "https://a.company.com/".startsWith("https://a.com") = true
  • "https://my.community.org/".startsWith("https://my.com") = true

In each case the shorter string is not the same origin as the longer one, but it is a prefix of it, so the check returns true.

The call chain, verified on the current main branch, is:

  1. notification_permission_context.cc:168-169 calls ShortcutHelper::DoesOriginContainAnyInstalledWebApk(origin).
  2. ShortcutHelper.java calls WebappRegistry.getInstance().hasAtLeastOneWebApkForOrigin(origin.toLowerCase()).
  3. WebappRegistry.java:272-284 runs the vulnerable scope.startsWith(origin) check.
  4. If it returns true, notification_permission_context.cc:180-189 delegates to InstalledWebappBridge::DecidePermission() instead of showing the normal prompt.

The same kind of check also gates periodic background sync permission in periodic_background_sync_permission_context.cc, which uses installed-PWA status as a condition.

Exploitation

Step 1: install a legitimate WebAPK

The user installs a WebAPK for https://example.com/app/, described in the report as a banking PWA. This is the victim's installed app whose scope will be matched against.

Step 2: control a prefix domain

The attacker controls https://example.co. The hostname example.co is a string prefix of example.com, because com starts with co.

Step 3: get the user to visit the attacker origin

The user visits https://example.co.

Step 4: Chrome checks the origin

Chrome calls hasAtLeastOneWebApkForOrigin("https://example.co").

Step 5: the prefix match succeeds

Text
"https://example.com/app/".startsWith("https://example.co") = true

The installed scope string begins with the attacker origin string, so the check returns true even though the two are different origins.

Step 6: Chrome enters the delegation path

Because the check returned true, Chrome skips the normal notification permission prompt and enters the WebAPK delegation path through InstalledWebappBridge::DecidePermission().

The report lists these collision examples:

  • https://example.com/ vs https://example.co: "com" starts with "co"
  • https://a.company.com/ vs https://a.com: "company" starts with "com"
  • https://my.community.org/ vs https://my.com: "community" starts with "com"

Runtime confirmation (A/B test)

The researcher confirmed the behaviour on the Pixel 7 with Chrome 146.0.7680.178 and Google Play Services v26.12.33. The setup was a legitimate WebAPK for https://victim-bank.example.com/app/ and an attacker page at https://victim-bank.example.co/. The prefix match was verified directly:

Text
"https://victim-bank.example.com/app/".startsWith("https://victim-bank.example.co") = true

The A/B comparison was:

  • Control origin (no prefix match): the standard Chrome "Allow notifications?" prompt appears and blocks waiting for user input.
  • Attack origin (prefix match): no dialog is shown, the call returns denied instantly (under 200ms), and logcat shows cr_TWAClient: Unable to request notification permission.

The cr_TWAClient log line is the evidence that Chrome entered InstalledWebappBridge::DecidePermission(), the code path reserved for origins with installed WebAPKs.

Root cause

The code performs a string-level origin comparison where a parsed origin comparison is required. The same file already contains a correct implementation in getOriginsWithWebApk():

Java
// getOriginsWithWebApk() - CORRECT:
Origin origin = Origin.create(scope);
origins.add(origin.toString());
// Uses Set.contains() for exact match

// hasAtLeastOneWebApkForOrigin() - VULNERABLE:
scope.startsWith(origin)  // Raw string prefix

The correct version parses the scope into an Origin and relies on exact matching through Set.contains(). The vulnerable version compares raw strings, so any origin whose text is a prefix of an installed scope passes.

Impact

The report describes four consequences for an attacker who controls a domain that is a string prefix of any installed WebAPK's scope URL:

  1. Bypass of the notification permission prompt (Android 13+). Chrome skips the standard "Allow notifications?" dialog and routes through the WebAPK delegation path. The user never sees a permission prompt for the attacker's origin.
  2. Silent notification permission inheritance. If the victim's WebAPK already has notification permission granted, the attacker's origin can silently inherit that permission through the delegation path, enabling push notifications without any user consent.
  3. Permanent notification denial of service. When delegation fails, the attacker's origin gets denied instead of prompted, permanently preventing the user from ever granting notification permission for that origin through Chrome's normal flow.
  4. Unauthorised periodic background sync. The same prefix match check gates periodic background sync permissions, allowing the attacker to register background sync tasks without meeting Chrome's normal engagement requirements.

The report rates attack complexity as low: the attacker only needs to register a domain that is a string prefix of a victim's installed WebAPK scope. It notes that many natural collisions exist between .co and .com TLDs, and with .com as a substring in longer TLDs such as .community, .company and .commerce.

Fix

The report proposes replacing the raw string prefix check with a parsed origin comparison, reusing the approach already present in getOriginsWithWebApk():

Java
public boolean hasAtLeastOneWebApkForOrigin(String origin) {
    for (WebappDataStorage storage : mStorages.values()) {
        String scope = getWebApkScopeFromStorage(storage);
        if (scope.isEmpty()) continue;
        String webApkPackageName = storage.getWebApkPackageName();
        assumeNonNull(webApkPackageName);
        Origin scopeOrigin = Origin.create(scope);
        if (scopeOrigin != null
                && scopeOrigin.toString().equals(origin)
                && PackageUtils.isPackageInstalled(webApkPackageName)) {
            return true;
        }
    }
    return false;
}

This parses each stored scope into an Origin, skips empty scopes, and only returns true when the parsed scope origin equals the requested origin exactly and the WebAPK package is installed.

Variants to test

  • Other prefix collisions between TLDs. Look for installed WebAPK scopes whose hostname has a shorter hostname as a string prefix, such as .co against .com, or .com inside .community, .company and .commerce. A positive result is a check that returns true for an origin that is not the installed scope's origin.
  • Subdomain prefix collisions. Test hostnames where one label is a prefix of another, for example a.com against a.company.com. A positive result is the shorter origin being treated as having an installed WebAPK.
  • Other callers of the same check. The report names periodic_background_sync_permission_context.cc as another place gated on installed-PWA status. A positive result is a permission decision for the attacker origin that follows the installed-PWA path rather than the normal prompt.
  • A positive result is the delegation path being entered for an origin that does not own the installed scope.
  • A positive result is a match that should not occur under exact origin comparison.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 11 min read.

What happened, in plain words

Chrome on Android has a feature that lets websites be installed like apps. You visit a site, tap "Add to Home screen", and the site gets its own icon and behaves a bit like a native app. These installed sites are called WebAPKs (a Progressive Web App, or PWA, packaged for Android).

One of the things an installed site can do is ask for permission to send you notifications, the little pop-ups that appear outside the browser. On Android 13 and later, Chrome treats installed sites specially: if a site is already installed as a WebAPK, Chrome does not show the usual "Allow notifications?" dialog. Instead it hands the decision to a piece of Chrome code called InstalledWebappBridge::DecidePermission(). Think of this as a fast lane reserved for sites the user has already installed.

To use that fast lane, Chrome has to answer one question: does this website have an installed WebAPK? The answer comes from a method called hasAtLeastOneWebApkForOrigin() in a file called WebappRegistry.java. The report shows that this method compares website addresses as plain text strings instead of comparing them as proper addresses. That means a website whose address merely starts with the same letters as an installed site's address can trick Chrome into thinking it is the installed site. The attacker's site then gets into the fast lane it should never have reached.

The issue was reported through the Chrome Vulnerability Reward Program and classified as a permissions bypass.

Before going further, a few words that come up constantly.

  • An origin is the combination of protocol, hostname and port that identifies a website, for example https://example.com. Two pages with different origins are treated as different sites by the browser, even if they look similar.
  • A scope is the range of addresses that belong to an installed WebAPK. If a site is installed for https://example.com/app/, that string is its scope.
  • A string prefix is the beginning of a piece of text. In "banana", the prefix "ban" matches because "banana" starts with "ban". A prefix check asks "does this text start with that text?" and says yes even when the two texts are different things.
  • A TLD (top-level domain) is the last part of a hostname, such as .com, .co, .org or .community.
  • logcat is Android's system log, a stream of messages that developers read to see what the device is doing.
  • A CVE is a public identifier for a known security flaw, so people can refer to it unambiguously.

Setup

The researcher tested on a Pixel 7 running Android 14 (arm64) with Chrome 146.0.7680.178 and Google Play Services v26.12.33. The version field in the report lists 146.0.7680.178 stable on an Android 14 Pixel 7 emulator.

The test needed two things:

  1. A legitimate WebAPK installed for https://victim-bank.example.com/app/, installed through Chrome's "Add to Home screen". This plays the role of the victim's banking app.
  2. An attacker page served at https://victim-bank.example.co/. Notice the ending: .co instead of .com.

No accounts, credentials or special tooling are described beyond the device, Chrome and Play Services versions and logcat output.

Finding it

The problem is in this check in WebappRegistry.java:272-284 (current main at the time of the report):

Java
// WebappRegistry.java:272-284 (current main)
if (scope.startsWith(origin) && PackageUtils.isPackageInstalled(webApkPackageName))

Line by line:

  • scope is the scope URL of an installed WebAPK, the address range the installed site owns.
  • origin is the origin Chrome is currently checking, in other words the site the user is visiting.
  • scope.startsWith(origin) asks a plain text question: does the installed scope's text begin with the visiting origin's text? It does not ask whether the two are the same site. This is the flawed part.
  • PackageUtils.isPackageInstalled(webApkPackageName) checks that the Android app package for that WebAPK is actually installed on the phone.
  • The && means both conditions must be true for the whole check to pass.

Because the comparison is a plain string prefix test, any hostname that is a string prefix of another hostname matches. The report gives these false positive examples:

  • "https://example.com/app/".startsWith("https://example.co") = true
  • "https://a.company.com/".startsWith("https://a.com") = true
  • "https://my.community.org/".startsWith("https://my.com") = true

In each case the shorter string is not the same origin as the longer one, but it is a prefix of it, so the check returns true. The first example works because com starts with co. The second because company starts with com. The third because community starts with com.

The call chain, verified on the current main branch, is:

  1. notification_permission_context.cc:168-169 calls ShortcutHelper::DoesOriginContainAnyInstalledWebApk(origin). This is the notification permission code asking whether the origin has an installed WebAPK.
  2. ShortcutHelper.java calls WebappRegistry.getInstance().hasAtLeastOneWebApkForOrigin(origin.toLowerCase()). This passes the question down to the registry that keeps track of installed WebAPKs, lowercasing the origin first.
  3. WebappRegistry.java:272-284 runs the vulnerable scope.startsWith(origin) check.
  4. If it returns true, notification_permission_context.cc:180-189 delegates to InstalledWebappBridge::DecidePermission() instead of showing the normal prompt.

The same kind of check also gates periodic background sync permission in periodic_background_sync_permission_context.cc, which uses installed-PWA status as a condition. Periodic background sync is a feature that lets a site wake up in the background at intervals to refresh data; it is normally limited to sites the user engages with.

Exploitation

Step 1: install a legitimate WebAPK

The user installs a WebAPK for https://example.com/app/, described in the report as a banking PWA. This is the victim's installed app whose scope will be matched against. The attacker needs a real installed WebAPK to exist, because the flawed check compares against installed scopes.

Step 2: control a prefix domain

The attacker controls https://example.co. The hostname example.co is a string prefix of example.com, because com starts with co.

Step 3: get the user to visit the attacker origin

The user visits https://example.co.

Step 4: Chrome checks the origin

Chrome calls hasAtLeastOneWebApkForOrigin("https://example.co"). It wants to know whether this site has an installed WebAPK, so it can decide whether to show the normal notification prompt or use the fast lane.

Step 5: the prefix match succeeds

Text
"https://example.com/app/".startsWith("https://example.co") = true

The installed scope string begins with the attacker origin string, so the check returns true even though the two are different origins. The text https://example.com/app/ really does start with the characters https://example.co; the rest of the text is ignored.

Step 6: Chrome enters the delegation path

Because the check returned true, Chrome skips the normal notification permission prompt and enters the WebAPK delegation path through InstalledWebappBridge::DecidePermission(). The user never sees a prompt for the attacker's site, and the decision is made by code meant only for installed apps.

The report lists these collision examples:

  • https://example.com/ vs https://example.co: "com" starts with "co"
  • https://a.company.com/ vs https://a.com: "company" starts with "com"
  • https://my.community.org/ vs https://my.com: "community" starts with "com"

Runtime confirmation (A/B test)

An A/B test means running the same scenario twice, once with the condition and once without, and comparing the results. The researcher confirmed the behaviour on the Pixel 7 with Chrome 146.0.7680.178 and Google Play Services v26.12.33. The setup was a legitimate WebAPK for https://victim-bank.example.com/app/ and an attacker page at https://victim-bank.example.co/. The prefix match was verified directly:

Text
"https://victim-bank.example.com/app/".startsWith("https://victim-bank.example.co") = true

The A/B comparison was:

  • Control origin (no prefix match): the standard Chrome "Allow notifications?" prompt appears and blocks waiting for user input. This is the normal, safe behaviour.
  • Attack origin (prefix match): no dialog is shown, the call returns denied instantly (under 200ms), and logcat shows cr_TWAClient: Unable to request notification permission.

The cr_TWAClient log line is the evidence that Chrome entered InstalledWebappBridge::DecidePermission(), the code path reserved for origins with installed WebAPKs. The log message itself says the request could not be made, which is what happens when the delegation path is used instead of the normal prompt.

Root cause

The code performs a string-level origin comparison where a parsed origin comparison is required. Parsing means taking the address apart into its components (protocol, hostname, port) and comparing those, rather than comparing the raw text. The same file already contains a correct implementation in getOriginsWithWebApk():

Java
// getOriginsWithWebApk() - CORRECT:
Origin origin = Origin.create(scope);
origins.add(origin.toString());
// Uses Set.contains() for exact match

// hasAtLeastOneWebApkForOrigin() - VULNERABLE:
scope.startsWith(origin)  // Raw string prefix

Line by line:

  • Origin origin = Origin.create(scope); turns the scope text into a proper origin object, so the browser understands its parts.
  • origins.add(origin.toString()); stores that origin in a collection.
  • Set.contains() then checks for an exact match, not a prefix match.
  • The vulnerable line scope.startsWith(origin) compares raw strings, so any origin whose text is a prefix of an installed scope passes.

The correct version parses the scope into an Origin and relies on exact matching through Set.contains(). The vulnerable version compares raw strings, so any origin whose text is a prefix of an installed scope passes.

Impact

The report describes four consequences for an attacker who controls a domain that is a string prefix of any installed WebAPK's scope URL:

  1. Bypass of the notification permission prompt (Android 13+). Chrome skips the standard "Allow notifications?" dialog and routes through the WebAPK delegation path. The user never sees a permission prompt for the attacker's origin.
  2. Silent notification permission inheritance. If the victim's WebAPK already has notification permission granted, the attacker's origin can silently inherit that permission through the delegation path, enabling push notifications without any user consent.
  3. Permanent notification denial of service. When delegation fails, the attacker's origin gets denied instead of prompted, permanently preventing the user from ever granting notification permission for that origin through Chrome's normal flow.
  4. Unauthorised periodic background sync. The same prefix match check gates periodic background sync permissions, allowing the attacker to register background sync tasks without meeting Chrome's normal engagement requirements.

The report rates attack complexity as low: the attacker only needs to register a domain that is a string prefix of a victim's installed WebAPK scope. It notes that many natural collisions exist between .co and .com TLDs, and with .com as a substring in longer TLDs such as .community, .company and .commerce.

Fix

The report proposes replacing the raw string prefix check with a parsed origin comparison, reusing the approach already present in getOriginsWithWebApk():

Java
public boolean hasAtLeastOneWebApkForOrigin(String origin) {
    for (WebappDataStorage storage : mStorages.values()) {
        String scope = getWebApkScopeFromStorage(storage);
        if (scope.isEmpty()) continue;
        String webApkPackageName = storage.getWebApkPackageName();
        assumeNonNull(webApkPackageName);
        Origin scopeOrigin = Origin.create(scope);
        if (scopeOrigin != null
                && scopeOrigin.toString().equals(origin)
                && PackageUtils.isPackageInstalled(webApkPackageName)) {
            return true;
        }
    }
    return false;
}

Line by line:

  • for (WebappDataStorage storage : mStorages.values()) walks through every stored WebAPK record.
  • String scope = getWebApkScopeFromStorage(storage); reads the scope of that record.
  • if (scope.isEmpty()) continue; skips records with no scope.
  • String webApkPackageName = storage.getWebApkPackageName(); reads the Android package name of the installed app.
  • assumeNonNull(webApkPackageName); tells the code checker the value is expected to be present.
  • Origin scopeOrigin = Origin.create(scope); parses the scope into a proper origin.
  • if (scopeOrigin != null && scopeOrigin.toString().equals(origin) && PackageUtils.isPackageInstalled(webApkPackageName)) returns true only when the parsed scope origin equals the requested origin exactly and the WebAPK package is installed.
  • return false; at the end means no exact match was found.

This parses each stored scope into an Origin, skips empty scopes, and only returns true when the parsed scope origin equals the requested origin exactly and the WebAPK package is installed.

Variants to test

  • Other prefix collisions between TLDs. Look for installed WebAPK scopes whose hostname has a shorter hostname as a string prefix, such as .co against .com, or .com inside .community, .company and .commerce. A positive result is a check that returns true for an origin that is not the installed scope's origin.
  • Subdomain prefix collisions. Test hostnames where one label is a prefix of another, for example a.com against a.company.com. A positive result is the shorter origin being treated as having an installed WebAPK.
  • Other callers of the same check. The report names periodic_background_sync_permission_context.cc as another place gated on installed-PWA status. A positive result is a permission decision for the attacker origin that follows the installed-PWA path rather than the normal prompt.
  • A positive result is the delegation path being entered for an origin that does not own the installed scope.
  • A positive result is a match that should not occur under exact origin comparison.

Glossary

  • A/B test: running the same scenario twice, once with a condition and once without, and comparing the results.
  • Android: the operating system used by most phones that are not iPhones.
  • API: a defined way for one piece of software to ask another piece of software to do something.
  • arm64: a common processor architecture used in many phones.
  • Chrome VRP (Chrome Vulnerability Reward Program): Google's programme that pays people for reporting security flaws in Chrome.
  • CVE: a public identifier for a known security vulnerability.
  • Delegation path: a code route where Chrome hands a decision to another component instead of handling it itself.
  • False positive: a check that says yes when the correct answer is no.
  • Google Play Services: a background app on Android that provides many services to other apps.
  • Hostname: the part of a web address that names the site, such as example.com.
  • logcat: Android's system log, a stream of messages developers read to see what the device is doing.
  • Origin: the combination of protocol, hostname and port that identifies a website, for example https://example.com.
  • Package name: the unique identifier of an Android app, such as com.example.app.
  • Permissions bypass: a flaw that lets something get past a permission check it should not pass.
  • Prefix: the beginning of a piece of text; a prefix check asks whether one text starts with another.
  • Progressive Web App (PWA): a website built to behave like an installed app.
  • Push notification: a message a site or app can send to a user's device even when the site is not open.
  • Scope: the range of addresses that belong to an installed WebAPK.
  • Severity: a rating of how serious a vulnerability is, here medium.
  • String: a piece of text in programming.
  • TLD (top-level domain): the last part of a hostname, such as .com, .co or .org.
  • WebAPK: a Progressive Web App packaged for Android so it can be installed and behave like a native app.
  • WebappRegistry: the Chrome component that keeps track of installed WebAPKs.

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.