Use after free in WebAppInstalls (CVE-2026-10923)
A use-after-free exists in Android WebAPK permission handling because a Java handler can be invoked multiple times, causing the same native callback pointer to be freed twice. A malicious app spoofing the Maps Lite package could bypass signature checks and potentially achieve arbitrary code execution in the browser process.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 60 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 without the security team.
Overview: A Use-After-Free exists in InstalledWebappBridge due to an unenforced single-execution assumption in Java handlers. A malicious Android app can bypass WebAPK signature checks by spoofing 'Maps Lite' and send multiple permission responses to trigger a double-free/UAF of an 8-byte callback object. This can potentially be exploited for arbitrary code execution in the browser process.
Affected files:
chrome/browser/webapps/installable/installed_webapp_bridge.ccchrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkServiceClient.javachrome/android/java/src/org/chromium/chrome/browser/browserservices/permissiondelegation/NotificationPermissionUpdater.javachrome/android/java/src/org/chromium/chrome/browser/browserservices/permissiondelegation/InstalledWebappBridge.java
Estimated timestamp from git blame: 2026-01-20
Summary
A memory safety vulnerability (Use-After-Free leading to arbitrary code execution) exists in the JNI callback mechanism used for webapp permission requests on Android. The vulnerability is located in InstalledWebappBridge::DecidePermission and its associated JNI logic, and can be triggered by a malicious Android application.
Technical Details
In InstalledWebappBridge::DecidePermission, a heap-allocated PermissionCallbackWithAMSC (a wrapper for base::OnceCallback) is created, and its raw pointer is passed to the Java layer:
// chrome/browser/webapps/installable/installed_webapp_bridge.cc
PermissionCallbackWithAMSC* callback_ptr = new PermissionCallbackWithAMSC(...);
Java_InstalledWebappBridge_decidePermission(..., reinterpret_cast<int64_t>(callback_ptr));
The Java side is expected to call the JNI method JNI_InstalledWebappBridge_RunPermissionCallback exactly once. When called, the C++ side casts the pointer back, executes the callback, and deletes the object:
static void JNI_InstalledWebappBridge_RunPermissionCallback(
JNIEnv* env, int64_t callback_ptr, int setting) {
auto* callback = reinterpret_cast<PermissionCallbackWithAMSC*>(callback_ptr);
std::move(*callback).Run(...);
delete callback;
}
When notification permissions are requested via a WebAPK, WebApkServiceClient.requestNotificationPermission creates a Java Handler wrapped in a Messenger to receive the result. Crucially, this Handler does not enforce single execution (unlike TrustedWebActivityClient.PermissionCallback which uses mCalled):
// chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkServiceClient.java
private static Handler createPermissionHandler(Callback<Integer> permissionCallback) {
return new Handler(Looper.getMainLooper(), message -> {
// ...
permissionCallback.onResult(settingValue);
return true;
});
}
If the WebAPK sends multiple messages to this Messenger, the Handler processes each one, calling the JNI method multiple times with the exact same callback_ptr.
Bypassing Signature Checks
To trigger this as an attacker, the WebAPK signature check must be bypassed. WebApkValidator.java contains a hardcoded bypass (verifyMapsLite) that skips cryptographic signature validation if the package name is com.google.android.apps.mapslite and certain manifest metadata matches. A malicious app can adopt this package name, spoof the identity service, and successfully masquerade as a valid WebAPK.
Potential Attack Steps
(Note: These are suggested steps based on static analysis.)
- Attacker installs a malicious Android app using the
com.google.android.apps.mapslitepackage name and matchingSTART_URL/SCOPEmetadata to bypass signature validation. - The app registers an intent filter for an attacker-controlled origin (e.g.,
https://attacker.com/) and implementsorg.webapk.IDENTITY_SERVICE_APIto return Chrome's package name. - The user visits
https://attacker.com/, which triggers a notification permission request. - Chrome sends a
PendingIntentwith theMessengerto the malicious app. - The app sends two rapid messages to the
Messenger. - Chrome processes the first message, executing
Run()and callingdelete callback;. Because the object usesADVANCED_MEMORY_SAFETY_CHECKS, it is temporarily placed in a global quarantine. - The attacker uses JS to create/destroy many iframes, triggering sufficient browser-process
ADVANCED_MEMORY_SAFETY_CHECKSallocations (e.g.,RenderFrameHost) to exceed the 512KB quarantine limit, flushing the callback chunk back to the main PartitionAlloc free list. - The attacker sends many small IPC payloads (e.g., via Mojo) to reclaim the 8-byte chunk, forging the
bind_state_pointer of theOnceCallback. - Chrome processes the second message. The JNI method uses the same raw pointer, dereferences the forged
bind_state_, and jumps to an attacker-controlledpolymorphic_invoke_pointer, achieving Remote Code Execution in the browser process.
Suggested Fix
- Enforce single execution in
createPermissionHandlerinsideWebApkServiceClient.javaby tracking whether the callback has already been fired (similar tomCalledelsewhere). - Instead of passing a raw
int64_tpointer across JNI, use an ID-based lookup mechanism (e.g., a map of integers tostd::unique_ptr<PermissionCallbackWithAMSC>) inInstalledWebappBridgeso that subsequent lookup attempts safely fail. - Review and consider removing the
Maps Litesignature validation bypass inWebApkValidator.java.
Evaluated with Chrome root at commit: 09ec9e7cc4d24823d20b6d37cf3d282734f6bf0f
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 Java handler for WebAPK permission results does not enforce single execution, so the same native callback pointer can be passed to the JNI method more than once and freed twice.
Impact
A malicious Android app could potentially achieve arbitrary code execution in the browser process, though the report notes this is based on static analysis and may be a false positive.
What the attacker needed
Malicious Android app installed; victim visits attacker-controlled site; Chrome on Android
The fix
The handler should enforce single execution, and the raw pointer should be replaced with an ID-based lookup so repeated calls safely fail; the Maps Lite signature bypass should also be reviewed.
How it was found
- Install a malicious Android app using the Maps Lite package name and matching metadata to bypass signature validation.
- Register an intent filter for an attacker-controlled origin and implement the identity service API to return Chrome's package name.
- Have the user visit the attacker's site, which triggers a notification permission request.
- Chrome sends a PendingIntent with the Messenger to the malicious app.
- The app sends two rapid messages to the Messenger.
- Chrome processes the first message, freeing the callback, then the attacker reclaims the memory and Chrome processes the second message, leading to code execution.
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 use-after-free is a memory bug where a program keeps using a piece of memory after it has been freed, which can let an attacker control what happens next. Here, a permission request from a web app creates a callback object, and a malicious Android app can make the browser free it twice by sending two replies. The report suggests this could lead to code execution, but it is based on static analysis and has not been proven.
What is Memory corruption?
Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.