Observable discrepancy in CustomTabs (CVE-2026-78936)
A logic flaw in Chrome Custom Tabs allows a malicious embedder app to bypass the text-fragment guard that pauses engagement signals, by re-registering the callback during a pending browser-initiated navigation. This can let the embedder receive scroll notifications on a cross-origin page with a text fragment, leaking the position of matched text.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 3 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. Please see https://chromium.googlesource.com/chromium/src/+/main/docs/security/ai-generated-security-bugs-faq.md for more information.
Overview: A potential logic bypass in Chrome Custom Tabs allows a malicious embedder app to bypass the text-fragment guard meant to prevent scroll-based XS-Leaks. By triggering a pending browser-initiated navigation and re-registering the EngagementSignalsCallback, the new observer can be tricked into setting mSignalsPaused to false. This can allow the embedder to receive scroll notifications on a cross-origin text-fragment-targeted page.
Affected files:
chrome/android/java/src/org/chromium/chrome/browser/customtabs/content/RealtimeEngagementSignalObserver.javachrome/android/java/src/org/chromium/chrome/browser/customtabs/content/EngagementSignalsHandler.java
Estimated timestamp from git blame: 2026-04-29
Description
A potential security bypass exists in the text-fragment guard of Chrome Custom Tabs' (CCT) engagement signals mechanism. The text-fragment guard was introduced to set mSignalsPaused = true when a page is loaded with a text fragment (e.g., #:~:text=), preventing malicious embedders from measuring scroll percentages to execute cross-origin XS-Leaks. However, this guard can potentially be bypassed by re-registering the EngagementSignalsCallback during a pending, non-committing, browser-initiated navigation.
Root Cause Analysis
In RealtimeEngagementSignalObserver.java, mSignalsPaused is initialized at observer-creation time by checking the visible URL of the WebContents:
// RealtimeEngagementSignalObserver.java
if (mWebContents != null) {
mSignalsPaused = LinkToTextHelper.hasTextFragment(mWebContents.getVisibleUrl());
}
WebContents.getVisibleUrl() retrieves the visible URL, which corresponds to the pending entry for any new, browser-initiated navigation. If a second CustomTabsIntent is sent in the same session, it creates a browser-initiated pending entry. While that navigation is pending, getVisibleUrl() returns the pending URL instead of the currently active, committed URL.
If the embedder re-registers the EngagementSignalsCallback via setEngagementSignalsCallback over Binder while this navigation is pending, EngagementSignalsHandler destroys the old observer and instantiates a new RealtimeEngagementSignalObserver (via createEngagementSignalsObserver() in EngagementSignalsHandler.java).
During its synchronous initialization, the new observer checks getVisibleUrl(), which returns the pending URL (which does not contain a text fragment), and incorrectly sets mSignalsPaused = false.
If the pending navigation is subsequently cancelled or completed with a non-committing status (such as an HTTP 204 No Content response, a network error, or a Content-Disposition: attachment response), the navigation does not commit. The observer's didFinishNavigationInPrimaryMainFrame method skips updating mSignalsPaused because navigationHandle.hasCommitted() is false. As a result, the incorrect mSignalsPaused = false state persists on the active page, which remains scrolled to the matched text fragment.
Potential Attack Steps
Since our tooling does not yet have the ability to run code, these are potential/suggested steps to reproduce the vulnerability:
- A malicious Android app acting as a Custom Tabs embedder opens a Custom Tab to a target victim URL with a text-fragment directive (e.g.,
https://victim.example/page#:~:text=SECRET). The page commits, auto-scrolls to the match, andmSignalsPausedis set totrue. - The embedder dispatches a second
CustomTabsIntent(reusing the same session token) targeting an attacker-controlled slow URL (e.g.,https://attacker.example/slowwithout a fragment). This creates a browser-initiated pending entry, causinggetVisibleUrl()to return the attacker-controlled URL. - While the navigation is pending (e.g., held up by the attacker's server), the embedder calls
CustomTabsSession.setEngagementSignalsCallback()again. - On the UI thread,
EngagementSignalsHandlerdestroys the existing observer and creates a newRealtimeEngagementSignalObserver. The new observer initializes and reads the pending attacker-controlled URL, incorrectly settingmSignalsPaused = false. - The attacker's server responds with an HTTP 204 (No Content). The pending navigation completes without committing. The observer retains
mSignalsPaused = false, and the scroll state is not reset. - When the user performs a scroll gesture on the active victim page,
notifyGreatestScrollPercentageIncreaseddelivers the rounded scroll percentage of the text-fragment match to the embedder, leaking the position/presence of the matched text.
Suggested Fix
To resolve this issue, RealtimeEngagementSignalObserver should initialize mSignalsPaused using the last committed URL instead of the visible URL. This ensures that any pending browser-initiated navigations do not affect the text-fragment guard state of the currently active document.
In RealtimeEngagementSignalObserver.java (line 221), replace:
mSignalsPaused = LinkToTextHelper.hasTextFragment(mWebContents.getVisibleUrl());
with:
mSignalsPaused = LinkToTextHelper.hasTextFragment(mWebContents.getLastCommittedUrl());
Evaluated with Chrome root at commit: b1520ef4a76878853a31f0943b565e42060edec8
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
Likely the observer initialises its paused state from the visible URL, which during a pending browser-initiated navigation is the pending URL rather than the committed page, and a non-committing navigation then leaves the wrong state in place.
Impact
A malicious embedder app could learn the scroll position of a text-fragment match on a cross-origin page, enabling an XS-Leak; the report describes this as potential and does not demonstrate it.
What the attacker needed
Malicious Android app as embedder; victim page has a text fragment; attacker controls a slow URL; user scrolls the victim page
The fix
The observer should initialise its paused state from the last committed URL instead of the visible URL.
How it was found
- A malicious embedder opens a Custom Tab to a victim URL with a text fragment, so the page commits and signals are paused.
- The embedder starts a second CustomTabsIntent to an attacker-controlled slow URL without a fragment, creating a pending navigation.
- While the navigation is pending, the embedder re-registers the engagement signals callback.
- The handler creates a new observer that reads the pending URL and sets signals to unpaused.
- The attacker's server responds with HTTP 204 so the navigation does not commit, and the unpaused state persists.
- When the user scrolls the victim page, the embedder receives the scroll percentage of the text-fragment match.
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 Custom Tabs let an app show a web page inside itself. A safety check was meant to stop the app from learning where on the page a secret piece of text was found, by pausing scroll updates. The report shows a way to trick that check into staying off, so the app could still get scroll information.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.