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

Use after free DigitalCredentials (CVE-2026-12008)

A use-after-free was reported in the browser process of Chromium's DigitalIdentityProviderDesktop: resetting its multi-step dialog can synchronously destroy the hosting WebContents and therefore the provider itself, leaving a dangling pointer when the stored callback is then invoked. The text claims a compromised renderer could trigger this to crash the browser process, and possibly achieve code execution, though this is based on static analysis only.

Google Chrome

Originally disclosed on Chrome VRP

Critical View original
  • Fix shipped in 16 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 heap use-after-free (UAF) vulnerability exists in the browser process due to DigitalIdentityProviderDesktop synchronously destroying its multi-step dialog. Under specific conditions—such as when the dialog is modal to a WebContents hosted in a transient container (like an extension popup or bubble) that closes on deactivation—closing the dialog can trigger the synchronous destruction of the hosting WebContents. This results in the synchronous deletion of the DigitalIdentityProviderDesktop instance, leaving a dangling pointer when its member callback is subsequently invoked.

Affected files:

  • chrome/browser/digital_credentials/digital_identity_provider_desktop.cc
  • chrome/browser/ui/views/digital_credentials/digital_identity_multi_step_dialog.cc
  • content/browser/digital_credentials/digital_identity_request_impl.cc

Estimated timestamp from git blame: 2024-08-28

Root Cause Analysis

In DigitalIdentityProviderDesktop::EndRequestWithError, located in chrome/browser/digital_credentials/digital_identity_provider_desktop.cc, the code resets its multi-step dialog and then immediately attempts to move and invoke callback_:

C++
void DigitalIdentityProviderDesktop::EndRequestWithError(
    RequestStatusForMetrics status) {
  if (callback_.is_null()) {
    return;
  }

  bluetooth_manual_dialog_controller_.reset();
  dialog_.reset();                                     // [1]

  std::move(callback_).Run(base::unexpected(status));  // [2] UAF occurs here
}

At [1], dialog_.reset() triggers the destructor of DigitalIdentityMultiStepDialog (chrome/browser/ui/views/digital_credentials/digital_identity_multi_step_dialog.cc), which executes:

C++
DigitalIdentityMultiStepDialog::~DigitalIdentityMultiStepDialog() {
  if (dialog_ && !dialog_->IsClosed()) {
    dialog_->CloseWithReason(GetWidgetDelegate()->get_closed_reason());
  }
}

When the digital identity request is initiated from a transient container (such as an extension popup or bubble that is configured to close upon an activation or focus change), closing the widget via CloseWithReason() fires window deactivation or visibility observers synchronously. This can lead to the synchronous destruction of the hosting WebContents.

Because the Mojo interface implementation DigitalIdentityRequestImpl is a frame-bound DocumentService, the destruction of WebContents synchronously destroys the RenderFrameHostImpl, which in turn deletes the DigitalIdentityRequestImpl instance. Since DigitalIdentityRequestImpl owns DigitalIdentityProviderDesktop, the provider instance this is synchronously deleted on the stack.

When the destructor of DigitalIdentityProviderDesktop finishes, control returns to EndRequestWithError. At [2], the method attempts to access and move callback_, which now resides inside the deallocated memory space of the deleted DigitalIdentityProviderDesktop instance, resulting in a browser-process heap use-after-free (UAF).

Potential Attack Scenario

Since our security evaluation is based on static analysis and we do not have the ability to run functional code, the following sequence represents a potential attack flow:

  1. Renderer Compromise: An attacker compromises a renderer process that has access to a transient/bubble WebContents (such as an extension popup or bubble).
  2. Mojo Call: The compromised renderer calls blink::mojom::DigitalIdentityRequest::Get over the bound Mojo interface, initiating the digital identity credential flow.
  3. Dialog Display: The browser process instantiates DigitalIdentityProviderDesktop and shows the multi-step dialog to the user.
  4. Cancellation Trigger: The attacker triggers a cancellation or abort path (e.g., via Mojo or by driving deactivation events that dismiss the dialog).
  5. UAF Execution: EndRequestWithError is executed. The synchronous closure of the dialog triggers the destruction of the transient container and the DigitalIdentityProviderDesktop instance. The browser process then dereferences callback_ on the deleted instance, causing a UAF crash or potentially leading to remote code execution (RCE) in the privileged browser process.

Suggested Remediation

To prevent the potential use-after-free, move the callback to a local stack variable before resetting the dialog. This ensures that even if this is synchronously destroyed during dialog_.reset(), the callback resides safely on the execution stack and is not accessed via a dangling this pointer:

C++
void DigitalIdentityProviderDesktop::EndRequestWithError(
    RequestStatusForMetrics status) {
  if (callback_.is_null()) {
    return;
  }

  bluetooth_manual_dialog_controller_.reset();
  auto local_callback = std::move(callback_);
  dialog_.reset();

  std::move(local_callback).Run(base::unexpected(status));
}

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.

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

The code resets the dialog before moving the member callback, so a synchronous destruction chain triggered by closing the dialog deletes the object that owns the callback, which is then accessed through a dangling this pointer.

Impact

The text claims this could crash the browser process and potentially lead to remote code execution in the privileged browser process, but it is a static-analysis finding with no demonstrated exploit.

What the attacker needed

Compromised renderer process; access to a transient or bubble WebContents; dialog dismissed via deactivation

The fix

The callback should be moved to a local stack variable before the dialog is reset, so it is not read through a dangling this pointer.

How it was found

  1. A compromised renderer calls the digital identity request interface over Mojo.
  2. The browser process creates the desktop provider and shows the multi-step dialog.
  3. The attacker triggers a cancellation or abort path, or drives deactivation events that dismiss the dialog.
  4. Closing the dialog synchronously destroys the transient container and the provider instance.
  5. The error path then dereferences the callback on the deleted instance, causing a use-after-free.

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.

When a program frees a piece of memory but keeps using it afterwards, that is called a use-after-free. Here, closing a dialog can cause the object that owns the dialog to be deleted straight away, and the code then still tries to use a saved callback stored inside that deleted object. The report is a static code review, so nobody has actually run an exploit; the worst case claimed is a browser crash, with code execution only as a possibility.

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.