Cryptographic Flaw in WebAppInstalls (CVE-2026-17872)
The HMAC used to authenticate a PWA shortcut is computed over the URL and icon bytes concatenated without a delimiter, so two different (URL, icon) pairs that concatenate to the same string share a valid MAC. A local malicious app, such as a custom launcher, could reuse a genuine MAC with shifted field boundaries to make the privileged Chrome browser process decode attacker-controlled image data.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 51 days
Flapjack, 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. Please see https://chromium.googlesource.com/chromium/src/+/main/docs/security/ai-generated-security-bugs-faq.md for more information.
Overview: WebappAuthenticator.java calculates a MAC over a URL and an icon sequentially without a delimiter. A malicious launcher application can exploit this to shift data from the URL to the icon field while maintaining a valid MAC, forcing the unsandboxed Chrome Browser process to decode an untrusted image payload.
Affected files:
chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappAuthenticator.javachrome/android/java/src/org/chromium/chrome/browser/webapps/WebappLauncherActivity.javachrome/browser/android/browserservices/intents/java/src/org/chromium/chrome/browser/browserservices/intents/WebappIcon.java
Estimated timestamp from git blame: Unknown (Google3 checkout)
Description
A potential MAC Delimiter Injection vulnerability exists in WebappAuthenticator.java due to the lack of delimiters between fields during HMAC calculation. When creating a homescreen shortcut for a Progressive Web App (PWA), Chrome generates a MAC to authenticate the shortcut intent. This prevents unauthorized apps from launching Chrome activities with arbitrary data.
However, in WebappAuthenticator.getMacForUrlAndIcon(String url, String encodedIcon), the strings are fed into the HMAC sequentially:
mac.update(ApiCompatibilityUtils.getBytesUtf8(url));
if (encodedIcon != null) {
mac.update(ApiCompatibilityUtils.getBytesUtf8(encodedIcon));
}
Because there is no delimiter, HMAC(URL + ICON) will produce the identical MAC for any (URL, ICON) pair as long as their contiguous concatenation remains the same.
Potential Attack Scenario
An attacker can exploit this flaw to bypass the trusted icon check:
- Preparation: The attacker hosts a PWA where the manifest defines a
start_urlcontaining a malicious image payload appended to the path (e.g.,https://attacker.com/PAYLOAD). The manifest also defines a legitimate base64 icon (LEGIT_ICON). - Installation & MAC Generation: The victim installs the PWA. Chrome generates a valid MAC for
url="https://attacker.com/PAYLOAD"andicon="LEGIT_ICON". This MAC is sent to the Android system to pin the shortcut. - MAC Acquisition: A malicious app on the victim's device (e.g., acting as the default Launcher) intercepts the shortcut creation intent and extracts the valid MAC.
- Forging the Intent: The malicious app fires an Intent to
WebappLauncherActivity.ACTION_START_WEBAPPwith shifted boundaries:EXTRA_URL:https://attacker.com/EXTRA_ICON:PAYLOADLEGIT_ICONEXTRA_MAC: The valid MAC obtained in Step 3.
- Verification Bypass:
WebappLauncherActivitycallsWebappAuthenticator.verifyMac. The method calculates the MAC forhttps://attacker.com/+PAYLOADLEGIT_ICON. Because this concatenation matches the original input (https://attacker.com/PAYLOADLEGIT_ICON), the MAC is successfully validated asMAC_TRUSTED. - Unsandboxed Execution: Because the MAC is trusted,
WebappLauncherActivitysetsEXTRA_IS_ICON_TRUSTED = true. Later,WebappIcon.javablindly decodes the maliciousEXTRA_ICONpayload in the highly-privileged, unsandboxed Chrome Browser process using Android's nativeBitmapFactory.decodeByteArray.
(Note: These are suggested steps based on static analysis; our tooling cannot run code to produce a working exploit).
Impact
This vulnerability allows a local malicious application (typically a custom launcher) to force the unsandboxed Chrome Browser process to parse untrusted, attacker-controlled image data. If the image payload is crafted to exploit a vulnerability in underlying native image decoders (e.g., Skia or Android graphics libraries), it could lead to Remote Code Execution (RCE) and a complete sandbox escape.
Suggested Fix
Include a robust delimiter (such as a null byte or a length prefix) between the URL and the icon bytes when updating the HMAC state in WebappAuthenticator.java.
mac.update(ApiCompatibilityUtils.getBytesUtf8(url));
if (encodedIcon != null) {
mac.update((byte) 0); // Null byte delimiter
mac.update(ApiCompatibilityUtils.getBytesUtf8(encodedIcon));
}
Evaluated with Chrome root at commit: 2155cb00003ec35716a76ed3246eae995f87b7ff
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 HMAC input is built by concatenating the URL and icon bytes with no delimiter or length prefix, so the field boundary is ambiguous.
Impact
A local malicious app could force the unsandboxed browser process to parse untrusted image data, which may lead to code execution and a sandbox escape only if the image decoder itself has a memory-safety flaw; the report notes the steps come from static analysis and no working exploit was produced.
What the attacker needed
Victim installs the attacker's PWA; malicious app on the device; app can act as default launcher; image decoder flaw for RCE
The fix
A delimiter such as a null byte or a length prefix should be inserted between the URL and icon bytes before updating the HMAC state.
How it was found
- The attacker hosts a PWA whose start_url carries a malicious image payload in the path and whose manifest declares a legitimate icon.
- The victim installs the PWA, and Chrome generates a valid MAC for that URL and icon pair.
- A malicious app on the device, for example the default launcher, intercepts the shortcut creation intent and extracts the MAC.
- The malicious app sends an intent to the webapp launcher activity with the URL truncated and the payload moved into the icon field, reusing the same MAC.
- The MAC check passes because the concatenation is unchanged, so the icon is marked trusted and decoded in the unsandboxed browser process.
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 message authentication code (MAC) is a short tag that proves some data came from a trusted source and was not changed. Here the tag is calculated over two pieces of text glued together with nothing in between, so an attacker can move characters from the end of one piece to the start of the other and the tag still matches. That lets a hostile app on the phone trick Chrome into treating a crafted image as trusted.
What is Crypto?
Encryption, signatures, randomness or certificate checks that do not protect what they claim to.