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

Use after free in Payments (CVE-2026-19175)

A use-after-free was identified in the browser process when payment app discovery completes and notifying observers synchronously triggers a fullscreen exit that destroys the WebContents, freeing the PaymentRequest and related objects. An attacker could potentially cause arbitrary indirect calls in the unsandboxed browser process, though the report notes this is an unverified analysis.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 9 days

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 Use-After-Free (UAF) vulnerability exists in the browser process during the completion of payment app discovery. Under certain conditions, notifying observers synchronously triggers a fullscreen exit and WebContents destruction, which destroys the PaymentRequest object and frees both SecurePaymentConfirmationController and PaymentRequestState on the stack. Subsequent unwinding of the execution flow leads to multiple potential Use-After-Free reads and callback execution on freed memory.

Affected files:

  • components/payments/content/payment_request_state.cc
  • components/payments/content/secure_payment_confirmation_controller.cc
  • components/payments/content/initialization_task.cc

Estimated timestamp from git blame: 2020-08-27

Root Cause Analysis

In PaymentRequestState::OnDoneCreatingPaymentApps (components/payments/content/payment_request_state.cc), NotifyInitialized() is called to notify initialization observers:

C++
  NotifyOnGetAllPaymentAppsFinished();
  NotifyInitialized();                               // Can synchronously free |this|

  // Fulfill the pending CanMakePayment call.
  if (can_make_payment_callback_)
    std::move(can_make_payment_callback_).Run(GetCanMakePaymentValue());

During the execution of NotifyInitialized(), the registered SecurePaymentConfirmationController observer receives the notification and triggers SetupModelAndShowDialogIfApplicable(), which shows a web-modal dialog via constrained_window::ShowWebModalDialogViews().

When blocking web contents for the modal dialog, BrowserWindowModalDialogDelegate::SetWebContentsBlocked() detects if the tab is in HTML5 content fullscreen and synchronously requests exiting fullscreen by calling web_contents->ExitFullscreen(true) to ensure the user has full context for making a security decision. If exiting fullscreen synchronously destroys the initiating WebContents (for example, due to fullscreen-exit re-entrancy or nested loops), the parent PaymentRequest (which is a DocumentService) will be destroyed. This synchronously resets the dialog controller (spc_dialog_.reset()) and deletes the PaymentRequestState (state_).

As the synchronous call stack unwinds:

  1. UAF in Controller: SecurePaymentConfirmationController::SetupModelAndShowDialogIfApplicable attempts to access its freed state (request_->spc_transaction_mode()).
  2. UAF in InitializationTask: InitializationTask::NotifyInitialized attempts to iterate over its freed observers_ list.
  3. UAF in PaymentRequestState: PaymentRequestState::OnDoneCreatingPaymentApps attempts to access and execute its pending callbacks (such as can_make_payment_callback_), which can result in an arbitrary indirect call in the unsandboxed browser process.

Potential Trigger Path

  1. Place the tab into HTML5 content fullscreen via element.requestFullscreen().
  2. Call PaymentRequest.show() with a secure-payment-confirmation payment method.
  3. Wait for the asynchronous payment app discovery to complete.
  4. Upon completion, PaymentRequestState::OnDoneCreatingPaymentApps() executes, calling NotifyInitialized(), which shows the SPC modal dialog and triggers ExitFullscreen(true).
  5. Trigger re-entrant/synchronous destruction of the WebContents during the fullscreen-exit state transition, causing both the controller and state object to be freed while they are still on the stack.

Note: The steps and behavior described above represent a potential analysis of the code flow; our tooling agent does not have the ability to run code or verify this via a live proof-of-concept.


Suggested Fix

To mitigate this potential issue, a base::WeakPtr self-liveness check should be introduced in PaymentRequestState::OnDoneCreatingPaymentApps() after calling NotifyInitialized(). If the state is destroyed, it should return immediately:

C++
  base::WeakPtr<PaymentRequestState> weak_this = weak_ptr_factory_.GetWeakPtr();
  NotifyInitialized();
  if (!weak_this)
    return;

Additionally, the SPC controller should be hardened with weak_ptr checks during dialog setup and after returning from showing the dialog to prevent use of a freed SecurePaymentConfirmationController or request_ pointer.

Evaluated with Chrome root at commit: 94d9235ebe3b7276e5284f0dc5d55577ff949908


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.

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 code calls NotifyInitialized() without checking whether the PaymentRequestState object is still alive after observers synchronously trigger a fullscreen exit that destroys the WebContents and frees the state.

Impact

The report claims this could result in an arbitrary indirect call in the unsandboxed browser process, but it is a potential analysis that has not been verified with a live proof-of-concept.

What the attacker needed

Victim visits a malicious page; page enters fullscreen; page calls PaymentRequest.show(); secure-payment-confirmation method

The fix

The report suggests adding a base::WeakPtr self-liveness check after NotifyInitialized() and hardening the SPC controller with weak_ptr checks, but it does not state that a fix was applied.

How it was found

  1. Place the tab into HTML5 content fullscreen via element.requestFullscreen().
  2. Call PaymentRequest.show() with a secure-payment-confirmation payment method.
  3. Wait for the asynchronous payment app discovery to complete.
  4. Upon completion, PaymentRequestState::OnDoneCreatingPaymentApps() executes, calling NotifyInitialized(), which shows the SPC modal dialog and triggers ExitFullscreen(true).
  5. Trigger re-entrant/synchronous destruction of the WebContents during the fullscreen-exit state transition, causing both the controller and state object to be freed while they are still on the stack.

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 happens when a program frees memory but keeps using it, like deleting a file and then trying to read it. Here, finishing a payment setup can unexpectedly close the tab, which frees the payment objects while the code is still running. The report suggests this could let an attacker run their own code in the browser's core process, but it 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.