Skip to content
RCE Advisory Advanced CVE-2026-113147

Improper input validation in WebShare (CVE-2026-113147)

The Android Sharing Hub in Chrome for Android decodes renderer-supplied image data in the unsandboxed browser process without a user activation check. A compromised renderer could exploit a memory corruption bug in a native image codec to achieve remote code execution in the browser process.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 6 months

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.

Overview: A compromised renderer can trigger the Android Sharing Hub silently via the ShareService Mojo interface due to a missing user activation check. The browser process saves the supplied image and decodes it in-process using Android system APIs to generate a UI preview. This allows an attacker to exploit vulnerabilities in native system codecs (e.g., libwebp) to achieve remote code execution in the unsandboxed browser process.

Affected files:

  • components/browser_ui/webshare/android/java/src/org/chromium/components/browser_ui/webshare/ShareServiceImpl.java
  • chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/share_sheet/ShareSheetBottomSheetContent.java
  • components/browser_ui/share/android/java/src/org/chromium/components/browser_ui/share/ShareImageFileUtils.java
  • base/android/java/src/org/chromium/base/ApiCompatibilityUtils.java
  • components/browser_ui/webshare/android/java/src/org/chromium/components/browser_ui/webshare/BlobReceiver.java
  • chrome/android/java/src/org/chromium/chrome/browser/share/ShareDelegateImpl.java
  • chrome/browser/chrome_browser_interface_binders.cc

Estimated timestamp from git blame: 2025-08-07

Summary

On Chrome for Android (specifically Android 13 and earlier), the Sharing Hub generates image previews by decoding renderer-supplied bytes directly within the browser process. This is accomplished using the Android framework's ImageDecoder. Decoding untrusted image data in a highly privileged process violates Chrome's "Rule of 2". A compromised renderer can potentially exploit this architectural flaw to achieve arbitrary code execution in the browser process, resulting in a full sandbox escape, by supplying malformed image bytes that trigger vulnerabilities in Android's native image codecs.

Technical Details

  1. Missing User Activation Check: The blink.mojom.ShareService Mojo interface is implemented in ShareServiceImpl.java within the browser process. The implementation lacks a check for transient user activation (e.g., RenderFrameHost::HasTransientUserActivation()). Consequently, a compromised renderer can trigger the sharing flow programmatically without any user interaction.
  2. Unvalidated Data Persistence: When the renderer calls the Mojo Share method with a file, ShareServiceImpl validates the file against an allowlist of extensions and MIME types. An attacker can easily spoof these (e.g., by sending a malformed WebP file disguised as an image/png with a .png extension). BlobReceiver.java then writes the renderer-supplied bytes verbatim to a temporary file in the browser's shared files directory. No safe out-of-process transcoding or content sniffing is performed.
  3. Unsandboxed Decoding: To display the Sharing Hub bottom sheet, ShareSheetBottomSheetContent.createPreview() is called to generate a thumbnail. For image MIME types, it invokes ShareImageFileUtils.getBitmapFromUriAsync(), which delegates to ApiCompatibilityUtils.getBitmapByUri(). On Android P and above, this calls android.graphics.ImageDecoder.decodeBitmap().
  4. Sandbox Escape: ImageDecoder.decodeBitmap() inspects the magic bytes of the file, determines its actual format, and routes it to the corresponding native system codec (e.g., libwebp, libheif). Because this system API is invoked directly by the browser process, the native codec executes in-process. Exploiting a memory corruption vulnerability within the system codec allows an attacker to hijack the execution flow of the unsandboxed browser process.

Suggested Exploitation Steps

Note: These are potential steps based on code analysis; a working proof-of-concept has not been executed.

  1. An attacker gains arbitrary code execution within the sandboxed renderer process.
  2. The compromised renderer connects to the blink.mojom.ShareService interface.
  3. The attacker crafts a payload exploiting a known vulnerability in an Android native image codec (e.g., CVE-2023-4863 in libwebp).
  4. The payload is encapsulated in a SharedFile object, with its extension spoofed to .png and MIME type spoofed to image/png to bypass initial validation in ShareServiceImpl.
  5. The renderer sends the Share IPC message. The lack of a user activation check permits this action to proceed silently.
  6. The browser process saves the malformed file and attempts to generate a preview using ImageDecoder.decodeBitmap().
  7. The Android system codec parses the malformed data in-process, triggering the vulnerability and granting the attacker RCE in the browser process.

Suggested Fix

  1. Enforce User Activation: Add a HasTransientUserActivation() check in the browser process, either during the Mojo interface binding in ForwardToJavaWebContents or within ShareServiceImpl.share(), to ensure the sharing flow requires legitimate user interaction.
  2. Isolate Image Decoding: Adhere to the "Rule of 2" by moving the decoding of untrusted images for the Sharing Hub preview into an isolated utility process, or rely on safely pre-decoded bitmaps passed from the renderer.

Evaluated with Chrome root at commit: 096fc8fdbfacf2546485756d03f160a3d04fcc9b


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 browser process decodes untrusted image data from the renderer using Android's ImageDecoder without isolating it, and the ShareService Mojo interface lacks a user activation check.

Impact

A compromised renderer could achieve remote code execution in the unsandboxed browser process, resulting in a full sandbox escape.

What the attacker needed

Compromised renderer process; Android 13 or earlier; known codec vulnerability

The fix

The fix should enforce a user activation check in the browser process and isolate image decoding into a separate utility process or use safely pre-decoded bitmaps.

How it was found

  1. An attacker gains code execution in the sandboxed renderer process.
  2. The compromised renderer connects to the ShareService Mojo interface.
  3. The attacker crafts a malformed image exploiting a native codec vulnerability.
  4. The payload is sent as a SharedFile with spoofed extension and MIME type.
  5. The renderer sends the Share IPC message without user activation.
  6. The browser process saves the file and decodes it in-process, triggering the codec bug.

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.

Chrome separates web pages into a sandboxed process, so a bug in a page cannot easily harm the whole browser. This report says a feature that shows a share preview takes image data from that sandboxed process and decodes it in the main browser process, which is not sandboxed. If the image decoder has a bug, an attacker who already controls the sandboxed process could use it to run code in the main browser process.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

More from Google Chrome

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.