Race condition in Start (CVE-2026-79057)
The Android New Tab Page image upload feature decodes untrusted image URIs in the browser process using native codecs, and a double-open TOCTOU lets a malicious ContentProvider bypass the size check. An attacker could supply a malformed image that triggers memory corruption in the codec, potentially leading to remote code execution.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 4 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. Please see https://chromium.googlesource.com/chromium/src/+/main/docs/security/ai-generated-security-bugs-faq.md for more information.
Overview: The Android NTP customization feature decodes untrusted image URIs in the browser process using native C++ codecs, violating Chrome's Rule of 2. Additionally, a Time-of-Check Time-of-Use (TOCTOU) vulnerability during decoding allows a malicious ContentProvider to bypass image size constraints.
Affected files:
chrome/browser/ntp_customization/java/src/org/chromium/chrome/browser/ntp_customization/NtpCustomizationUtils.javachrome/browser/ntp_customization/java/src/org/chromium/chrome/browser/ntp_customization/theme/NtpThemeMediator.java
Estimated timestamp from git blame: 2026-02-04
Description
The Android New Tab Page (NTP) customization feature (behind kNewTabPageCustomizationV2) contains two architectural security issues when handling user-uploaded background images:
1. Rule of 2 Violation (In-Process Untrusted Data Parsing)
When a user selects "Upload an image", NtpThemeMediator.java uses ActivityResultContracts.GetContent() to retrieve an image URI. This URI can be supplied by any app on the device. The URI is passed to NtpCustomizationUtils.getBitmapFromUriAsync(), which executes an AsyncTask on the THREAD_POOL_EXECUTOR. This task runs in the unsandboxed Chrome Browser process.
Within this task, Chrome calls BitmapFactory.decodeStream() on the untrusted URI. BitmapFactory is a Java wrapper around Android's native C++ image codecs (Skia). Chrome's security policy (Rule of 2) explicitly identifies BitmapFactory as unsafe and mandates that parsing untrusted data using unsafe languages must occur in a sandboxed utility process. Decoding untrusted images in the high-privilege Browser process exposes Chrome to full compromise if the underlying Android codec has a memory corruption vulnerability.
2. Double-Open TOCTOU (Size Check Bypass)
NtpCustomizationUtils.getBitmapFromUriAsync() exhibits a Time-of-Check Time-of-Use (TOCTOU) vulnerability. It opens the untrusted URI twice:
- TOC:
openInputStreamis called, andBitmapFactory.decodeStreamis used withinJustDecodeBounds = trueto check dimensions.calculateInSampleSizeis then called to determine downsampling against aMAX_IMAGE_SIZE(2556). - TOU:
openInputStreamis called a second time, and the stream is decoded using the previously calculatedinSampleSize.
A malicious ContentProvider can serve a benign 10x10 image on the first open (resulting in inSampleSize = 1) and a massive or malformed payload on the second open. This completely bypasses the intended MAX_IMAGE_SIZE protections, allowing the attacker to force the codec to parse arbitrarily large or complex malicious payloads without downsampling.
Potential Attack Scenario
(Note: These are suggested steps to illustrate the impact; our tooling does not execute code to provide a working PoC.)
- An attacker tricks a user into installing a malicious Android app. The app registers an intent filter for
image/*and a customContentProvider. - The user opens the Chrome NTP and selects "Upload an image" from the customization menu.
- The Android system picker opens. The user selects the attacker's application.
- The attacker's app returns a URI pointing to its custom
ContentProvider. - Chrome's Browser process attempts to decode the image.
- The attacker's
ContentProviderintercepts the firstopenInputStreamcall and returns a valid 10x10 PNG header to pass size checks. - The attacker's
ContentProviderintercepts the secondopenInputStreamcall and returns a crafted payload designed to trigger a known memory corruption vulnerability (e.g., heap overflow) in Android'slibpngorlibjpeg. - The native codec parses the malformed stream inside the Chrome Browser process. The resulting memory corruption allows the attacker to execute arbitrary code (RCE) and compromise the browser.
Suggested Fix
- Enforce Rule of 2: Do not use
BitmapFactorydirectly on untrusted URIs in the Browser process. Image decoding should be delegated to the sandboxeddata_decoderservice. This is how the desktop implementation of this feature safely handles untrusted images. - Eliminate TOCTOU: If local processing is strictly required before sending to the decoder, read the entire stream from the
ContentResolverinto a local, temporary file or memory buffer exactly once. Perform both the bounds check and the full decode on that static local copy.
Evaluated with Chrome root at commit: 3acbde3302da0cb19488c22c0eb007c791207b4b
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 feature decodes untrusted image data in the browser process instead of a sandboxed service, and it opens the same URI twice, allowing the content to change between the size check and the decode.
Impact
The native codec parses the malformed stream inside the Chrome Browser process, and the resulting memory corruption could allow the attacker to execute arbitrary code and compromise the browser.
What the attacker needed
Victim installs a malicious Android app; victim selects the malicious app in the picker; Chrome NTP customization feature enabled
The fix
Image decoding should be delegated to the sandboxed data_decoder service, and the stream should be read once into a local buffer so the bounds check and decode use the same static copy.
How it was found
- An attacker tricks a user into installing a malicious Android app that registers an intent filter for images and a custom ContentProvider.
- The user opens the Chrome NTP and selects 'Upload an image' from the customization menu.
- The Android system picker opens and the user selects the attacker's application.
- The attacker's app returns a URI pointing to its custom ContentProvider.
- Chrome's Browser process attempts to decode the image.
- The attacker's ContentProvider returns a valid small image on the first open and a crafted payload on the second open.
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's New Tab Page lets you upload a background image. The report says Chrome reads that image in a part of the browser that has high privileges, and it reads it twice: once to check the size and once to actually decode it. A malicious app on the phone can give a tiny image the first time and a huge or broken one the second time, so the size check is fooled and the image decoder may crash or be exploited.
What is Race condition?
Parallel requests reach a state the code assumed could not happen: a coupon used twice, a limit overrun, a check skipped.