Skip to content
Memory corruption Advisory Advanced CVE-2026-10923

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.cc
  • chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkServiceClient.java
  • chrome/android/java/src/org/chromium/chrome/browser/browserservices/permissiondelegation/NotificationPermissionUpdater.java
  • chrome/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:

C++
// 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:

C++
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):

Java
// 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.)

  1. Attacker installs a malicious Android app using the com.google.android.apps.mapslite package name and matching START_URL/SCOPE metadata to bypass signature validation.
  2. The app registers an intent filter for an attacker-controlled origin (e.g., https://attacker.com/) and implements org.webapk.IDENTITY_SERVICE_API to return Chrome's package name.
  3. The user visits https://attacker.com/, which triggers a notification permission request.
  4. Chrome sends a PendingIntent with the Messenger to the malicious app.
  5. The app sends two rapid messages to the Messenger.
  6. Chrome processes the first message, executing Run() and calling delete callback;. Because the object uses ADVANCED_MEMORY_SAFETY_CHECKS, it is temporarily placed in a global quarantine.
  7. The attacker uses JS to create/destroy many iframes, triggering sufficient browser-process ADVANCED_MEMORY_SAFETY_CHECKS allocations (e.g., RenderFrameHost) to exceed the 512KB quarantine limit, flushing the callback chunk back to the main PartitionAlloc free list.
  8. The attacker sends many small IPC payloads (e.g., via Mojo) to reclaim the 8-byte chunk, forging the bind_state_ pointer of the OnceCallback.
  9. Chrome processes the second message. The JNI method uses the same raw pointer, dereferences the forged bind_state_, and jumps to an attacker-controlled polymorphic_invoke_ pointer, achieving Remote Code Execution in the browser process.

Suggested Fix

  1. Enforce single execution in createPermissionHandler inside WebApkServiceClient.java by tracking whether the callback has already been fired (similar to mCalled elsewhere).
  2. Instead of passing a raw int64_t pointer across JNI, use an ID-based lookup mechanism (e.g., a map of integers to std::unique_ptr<PermissionCallbackWithAMSC>) in InstalledWebappBridge so that subsequent lookup attempts safely fail.
  3. Review and consider removing the Maps Lite signature validation bypass in WebApkValidator.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.

The original report as published on the Chromium issue tracker. Images and videos are our own copies; raw HTML is shown as text. View it on Chromium issue tracker.

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

  1. Install a malicious Android app using the Maps Lite package name and matching metadata to bypass signature validation.
  2. Register an intent filter for an attacker-controlled origin and implement the identity service API to return Chrome's package name.
  3. Have the user visit the attacker's site, which triggers a notification permission request.
  4. Chrome sends a PendingIntent with the Messenger to the malicious app.
  5. The app sends two rapid messages to the Messenger.
  6. 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.

More from Google Chrome

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.