Insufficient validation of untrusted input in WebAppInstalls (CVE-2026-9987)
The exported WebappLauncherActivity authenticates launch intents with a MAC that only covers the URL, so other extras such as the icon are attacker-controlled, and the factory then hardcodes the icon as trusted. A co-installed malicious app could therefore supply arbitrary image bytes that are decoded by native codecs in the unsandboxed browser process.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 14 days
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: The WebappLauncherActivity validates launch intents using a MAC that only covers the URL, allowing other extras to be attacker-controlled. WebappIntentDataProviderFactory then hardcodes the 'isTrusted' flag for the icon provided in the intent, leading to its decoding via native codecs in the unsandboxed browser process. This potentially violates the 'Rule of 2' by parsing untrusted image data in a privileged process.
Affected files:
chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappIntentDataProviderFactory.javachrome/android/java/src/org/chromium/chrome/browser/webapps/WebappLauncherActivity.javachrome/browser/android/browserservices/intents/java/src/org/chromium/chrome/browser/browserservices/intents/WebappIcon.javachrome/browser/android/browserservices/intents/java/src/org/chromium/chrome/browser/browserservices/intents/BitmapHelper.java
Estimated timestamp from git blame: 2020-04-28
Summary
A potential vulnerability in the Android web app launch process allows an attacker to trigger an unsandboxed image decode in the Chrome browser process. By exploiting partial authentication of launch intents and a hardcoded trust assignment, a malicious application can supply arbitrary image bytes that are parsed by native codecs (e.g., Skia, libpng) in the privileged browser process.
Root Cause Analysis
-
Partial Intent Authentication:
WebappLauncherActivity(an exported activity) uses an HMAC-SHA256 MAC to validate launch intents. However, this MAC only authenticates theEXTRA_URLparameter (seeWebappLauncherActivity.java:336andWebappAuthenticator.java:74). Other intent extras, such asEXTRA_ICON, are copied to the internal launch intent without verification (WebappLauncherActivity.java:367). -
Hardcoded Trust in Factory: When
WebappActivitystarts,WebappIntentDataProviderFactory.create()extracts the icon from the intent and instantiates aWebappIconobject with theisTrustedflag hardcoded totrue(WebappIntentDataProviderFactory.java:140):Java new WebappIcon(icon, /* isTrusted= */ true) -
Unsandboxed Native Decode: During activity startup, the splash screen construction (via
WebappSplashController) triggersWebappIcon.bitmap(). Because the icon is marked as trusted, it proceeds to decode the base64-encoded string using native codecs in the browser process:Java // WebappIcon.java:127 return BitmapHelper.decodeBitmapFromString(mEncoded); // BitmapHelper.java:43 return BitmapFactory.decodeByteArray(decoded, 0, decoded.length);
Potential Attack Vector
An attacker would follow these suggested steps:
- Obtain a valid
(URL, MAC)pair for a Chrome installation (e.g., from a leaked shortcut intent or a malicious launcher). - From a co-installed malicious app, send an intent to
org.chromium.chrome.browser.webapps.WebappLauncherActivitywith actioncom.google.android.apps.chrome.webapps.WebappManager.ACTION_START_WEBAPP. - Include the valid
EXTRA_URLandEXTRA_MACto pass the launcher's initial check. - Include a non-existent
EXTRA_ID(to ensure the app falls back to the intent-provided icon) and a maliciousEXTRA_ICONcontaining base64-encoded bytes targeting a native codec vulnerability. - Upon launch, Chrome will decode the malicious bytes in the unsandboxed browser process during splash screen initialization.
Suggested Fix
- Extend MAC Coverage: Update the
WebappAuthenticatorto includeEXTRA_ICON(and other sensitive extras) in the MAC calculation. - Remove Hardcoded Trust: Do not hardcode
isTrusted = trueinWebappIntentDataProviderFactory.create(). Instead, icons provided via intents from external apps should be treated as untrusted by default, or trust should only be granted if the MAC explicitly covers the icon data.
Evaluated with Chrome root at commit: b3153093eb3c78c3e88ccf562bcbc20437a04b0e
Results so far have been promising, but there can be wrong deductions. Feel free to adjust as follows:
- If you are familiar with the severity guidelines, you may adjust the severity.
- If this is a false positive, and there's no work to be done, please close as WAI.
- If there is work to do here but not a vulnerability, please change the issue type to Task/Bug/FR.
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
The intent MAC only covers the URL while the icon extra is copied unverified and then hardcoded as trusted, so untrusted image data reaches native decoders in the privileged browser process.
Impact
A malicious co-installed app could potentially trigger memory corruption in the browser process by feeding crafted image data to native codecs, though this depends on an underlying decoder vulnerability.
What the attacker needed
A co-installed malicious app; a valid URL and MAC pair; an exploitable native image decoder bug
The fix
The MAC should cover the icon and other sensitive extras, and intent-provided icons should be treated as untrusted rather than hardcoded as trusted.
How it was found
- Obtain a valid URL and MAC pair for the Chrome installation.
- Send an intent to the exported WebappLauncherActivity with the web app start action.
- Include the valid URL and MAC extras to pass the launcher check.
- Include a non-existent ID so the app falls back to the intent-provided icon, plus a crafted icon extra.
- Chrome decodes the supplied bytes in the unsandboxed browser process during splash screen setup.
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.
Android apps can send messages called intents to other apps, and Chrome's web app launcher accepts them. Chrome checks a signature (a MAC, a kind of tamper check) but only over the web address, not the attached icon image. So another app on the phone could slip in a crafted image that Chrome decodes in its main, less protected process, which is risky if the image decoder has a bug.
What is Access control?
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.