Race condition in Payments (CVE-2026-78894)
A time-of-check to time-of-use flaw in the Payment Request API's payment app info fetcher allows a compromised renderer to delay a manifest response and navigate the frame cross-origin, causing a subsequent icon download to run in the context of the new site. This gives a 1-bit oracle that can reveal whether a credentialed request on the victim site succeeded, leaking login state or resource existence.
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: A potential Time-Of-Check to Time-Of-Use vulnerability exists in PaymentAppInfoFetcher. A compromised renderer can delay a web app manifest response and navigate the frame, causing a subsequent icon download to execute in the context of the newly committed cross-origin frame. This allows an attacker to leak cross-origin state via a 1-bit oracle.
Affected files:
content/browser/payments/payment_app_info_fetcher.cccontent/browser/web_contents/web_contents_impl.cccontent/browser/manifest/manifest_icon_downloader.cccontent/public/browser/manifest_icon_downloader.h
Estimated timestamp from git blame: 2024-07-19
Summary
A potential Time-Of-Check to Time-Of-Use (TOCTOU) vulnerability exists in the PaymentAppInfoFetcher component of the Payment Request API. A compromised renderer can exploit this to trigger a credentialed icon fetch using the context of a cross-origin site (e.g., a site the user has navigated to in the same tab). This results in a 1-bit cross-origin oracle that can leak information like login status or resource existence on the victim site.
Root Cause
The vulnerability resides in PaymentAppInfoFetcher::SelfDeleteFetcher, which handles fetching payment app information, including the manifest and icon.
- In
SelfDeleteFetcher::Start(), the code verifies that the providedcontext_urlis same-origin with theWebContents's current primary main frame (web_contents_->GetLastCommittedURL()). After this check passes, it stores aWeakPtrto theWebContentsand initiates an asynchronous IPC to the renderer to fetch the web app manifest viaGetManifest(). - When the manifest response eventually arrives, execution resumes in
SelfDeleteFetcher::FetchPaymentAppManifestCallback. The code verifies that theWebContentsis still alive via theWeakPtr, but it fails to re-verify that the frame's current origin is still the same as the originalcontext_url. - The code then extracts an icon URL from the manifest and initiates a download via
ManifestIconDownloader::Download(). Crucially, this function call does not specify aninitiator_frame_routing_id. - Inside
WebContentsImpl::DownloadImageInFrame(), because theinitiator_frame_routing_idis empty, the browser falls back to callingGetPrimaryMainFrame()to resolve the initiator frame. - If the tab has navigated cross-origin between the time the manifest was requested and the response was received,
GetPrimaryMainFrame()will return the newly committed, cross-origin frame. Consequently, theDownloadImageMojo request is sent to the new trusted renderer, executing a first-party, credentialed fetch.
Potential Attack Vector
Note: These are suggested steps; our tooling has not executed this as a live exploit.
- An attacker controls a compromised renderer process hosting
https://attacker.com/. - The attacker uses the bound
payments::mojom::PaymentManagerMojo interface to callInit(), ensuring the browser will attempt to fetch payment app info, followed bySetPaymentInstrument(). - The browser validates the origin in
PaymentAppInfoFetcher, passes the check, and sends aRequestManifestIPC to the attacker's renderer. - The attacker's compromised renderer intentionally stalls the
RequestManifestresponse and initiates a top-level navigation of the frame tohttps://victim.com/. - After the browser commits the navigation (updating
GetPrimaryMainFrame()to point tovictim.com), the oldattacker.comframe enters thepending_deletestate but remains alive to rununloadhandlers. During this window, the attacker's renderer finally sends the delayedRequestManifestResponse, containing an icon URL pointing to a private resource onvictim.com(e.g.,https://victim.com/private_avatar.png). - The browser processes the response. Because it skips re-validating the origin, it attempts to download the icon.
- Due to the lack of an
initiator_frame_routing_id, the download request falls back toGetPrimaryMainFrame(), routing theDownloadImagerequest to the trustedvictim.comrenderer. - The
victim.comrenderer executes a same-origin fetch for the image, attaching all relevant credentials (includingSameSite=Strictcookies). - The success or failure of the image decode operation is returned to the browser. This result dictates whether the original
SetPaymentInstrumentcall succeeds or fails (FETCH_PAYMENT_APP_INFO_FAILED). - The attacker receives this success/failure signal via their original Mojo callback, providing a 1-bit oracle confirming whether the credentialed fetch on
victim.comsucceeded.
Impact
While an attacker cannot read the image pixels directly, they gain a 1-bit oracle that can detect whether a specific credentialed request on a cross-origin site succeeded. This can be used to infer the user's login state or the existence of private resources on the victim domain.
Suggested Fix
- In
PaymentAppInfoFetcher::SelfDeleteFetcher::FetchPaymentAppManifestCallback, re-validate thaturl::IsSameOriginWith(context_url_, web_contents_->GetLastCommittedURL())before proceeding with the icon download. - In
PaymentAppInfoFetcher::SelfDeleteFetcher::Start, capture theGlobalRenderFrameHostIdof the validated frame and pass it explicitly toManifestIconDownloader::Download()rather than relying on theGetPrimaryMainFrame()fallback. This ensures the download request is routed to the correct, originally validated frame, failing safely if that frame is no longer active.
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 code fails to re-validate the frame's origin after an asynchronous manifest fetch and does not pass the original frame's routing ID to the icon downloader, so the download falls back to the current primary main frame.
Impact
An attacker cannot read the image pixels directly but gains a 1-bit oracle that can infer the user's login state or the existence of private resources on the victim domain.
What the attacker needed
Compromised renderer process; victim visits attacker-controlled page; victim has an account on the target site
The fix
The fix should re-validate that the context URL is still same-origin with the current committed URL before downloading the icon, and should capture and pass the original frame's routing ID to the icon downloader instead of relying on the primary main frame fallback.
How it was found
- Attacker controls a compromised renderer hosting a site and calls the payment manager interface to start fetching payment app info.
- The browser validates the origin and sends a manifest request to the attacker's renderer.
- The attacker stalls the manifest response and navigates the frame to the victim site.
- After the navigation commits, the attacker sends the delayed manifest response with an icon URL pointing to a private resource on the victim site.
- The browser processes the response without re-checking the origin and attempts to download the icon.
- Because no initiator frame routing ID is provided, the download is routed to the victim site's renderer, which performs a credentialed fetch; success or failure is returned to the attacker as a 1-bit signal.
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 browser component checks that a request comes from the same website as the current page, but it only checks once at the start. If the page navigates to a different site before the check finishes, the later steps still use the new site's identity. An attacker who controls the first page can then make the browser fetch a private image from the second site and learn from success or failure whether the user is logged in there.
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.