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

Use after free in Extensions (CVE-2026-79026)

A use-after-free was reported in the Extensions Tabs API, where a raw browser window pointer is dereferenced after calling Show() on Windows. If the window is destroyed during synchronous Win32 message dispatch, the freed object could be accessed, leading to a browser-process crash or possible control-flow hijack.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 36 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 Extensions Tabs API where raw BrowserWindowInterface pointers are dereferenced after showing the window. On Windows, showing a window can synchronously dispatch Win32 window events and trigger the destruction of the underlying browser window. Because the pointer is a bare stack-local parameter, subsequent dereferences result in a UAF in the browser process.

Affected files:

  • chrome/browser/extensions/api/tabs/tabs_api.cc

Estimated timestamp from git blame: 2025-12-12

Potential Root Cause

In chrome/browser/extensions/api/tabs/tabs_api.cc, both WindowsCreateFunction::OnBrowserWindowCreated and TabsCreateFunction::OnBrowserWindowCreated handle browser window creation and receive a raw BrowserWindowInterface* pointer. These functions invoke Show() or ShowInactive() on the window, and subsequently dereference the raw pointer without checking if the window has been synchronously destroyed.

Specifically, calling new_window->GetWindow()->Show() on Windows can lead to HWNDMessageHandler::Show() which, for fullscreen states, executes SetFullscreen(true). This calls ::SetWindowPos or ::ShowWindow, which synchronously dispatches Win32 messages (e.g., WM_WINDOWPOSCHANGED, WM_SIZE, WM_ACTIVATE) into the nested event loop. If the browser window is closed or destroyed during this re-entrant message dispatch, BrowserWidget::OnNativeWidgetDestroyed() is invoked, synchronously running Browser::SynchronouslyDestroyBrowser() and freeing the Browser heap allocation.

Once the native call stack unwinds, control returns to OnBrowserWindowCreated. At this point, the raw pointer (new_window or browser) is dangling:

  • In WindowsCreateFunction::OnBrowserWindowCreated (line 1388), new_window->GetProfile() is invoked, resolving through a virtual method table of the freed object, resulting in a potential Use-After-Free (UAF).
  • In TabsCreateFunction::OnBrowserWindowCreated (line 2259), OpenTabInBrowser(*browser, opener) is called, passing the freed object by reference.

Because these raw pointers are stack-local variables and function arguments rather than class members, they are not protected by MiraclePtr (BackupRefPtr).

Potential Trigger Steps

Note: Since our testing tools do not have the ability to run code, these are potential/suggested steps to reproduce the vulnerability and have not been validated with a running proof of concept.

  1. Install an extension that has access to standard chrome.windows / chrome.tabs APIs (no elevated permissions required).
  2. The extension initiates window creation via chrome.windows.create({state: "fullscreen"}).
  3. During the synchronous window initialization and native display (HWNDMessageHandler::Show -> ::SetWindowPos), a racing listener or hook triggers the synchronous closure of the newly created window.
  4. The window's synchronous destruction path frees the underlying Browser object on the heap.
  5. Control returns to the calling extension function in tabs_api.cc, which attempts to dereference the now-dangling BrowserWindowInterface* pointer via virtual method calls (such as GetProfile()), leading to a browser-process crash or control-flow hijack.

Suggested Fix

To prevent this vulnerability, capture a base::WeakPtr<BrowserWindowInterface> before calling Show() or ShowInactive(). Verify the validity of the weak pointer immediately after the show call, and return an error or early-exit if the window was destroyed during event dispatching.

For WindowsCreateFunction::OnBrowserWindowCreated:

C++
base::WeakPtr<BrowserWindowInterface> weak_window = new_window->GetWeakPtr();
if (focused) {
  new_window->GetWindow()->Show();
} else {
  new_window->GetWindow()->ShowInactive();
}

if (!weak_window) {
  return Error(ExtensionTabUtil::kBrowserWindowNotAllowed);
}

For TabsCreateFunction::OnBrowserWindowCreated:

C++
base::WeakPtr<BrowserWindowInterface> weak_browser = browser->GetWeakPtr();
browser->GetWindow()->Show();
if (!weak_browser) {
  Respond(Error(ExtensionTabUtil::kBrowserWindowNotAllowed));
  return;
}

Evaluated with Chrome root at commit: bf775e5d75cb9e1767e2cd02cc93efa0077d14a5


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 Show() on a raw window pointer and then dereferences it without checking whether the window was synchronously destroyed during native event dispatch.

Impact

Could cause a browser-process crash or control-flow hijack, though the report notes the trigger steps were not validated with a running proof of concept.

What the attacker needed

An installed extension; access to windows/tabs APIs; Windows platform; window destroyed during show

The fix

The code should capture a weak pointer before calling Show() or ShowInactive() and check it afterwards, returning an error if the window was destroyed.

How it was found

  1. Install an extension with access to the standard windows and tabs APIs.
  2. The extension creates a window in fullscreen state.
  3. During synchronous native display, a racing listener or hook closes the new window.
  4. The window's destruction frees the underlying browser object.
  5. Control returns to the extension function, which dereferences the dangling pointer.

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 an object but keeps a pointer to it and later uses that pointer, it is called a use-after-free. Here, showing a new browser window on Windows can run other code that closes and frees the window, and the extension code then still tries to use the old pointer. That can crash the browser or, in theory, let an attacker influence what the program does next.

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.