Use after free in Autofill (CVE-2026-13038)
A use-after-free exists in the Autofill popup on Windows because an accessibility notification can spin a nested message loop that destroys the popup, yet the calling function continues to use the freed object. An attacker who grooms the heap could potentially hijack a virtual call and achieve remote code execution in the browser process.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 10 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 Use-After-Free (UAF) vulnerability exists in PopupViewViews on Windows when handling informational suggestions. Accessibility notifications can trigger a nested message loop that destroys the view, but the calling functions continue to access the freed this pointer.
Affected files:
chrome/browser/ui/views/autofill/popup/popup_view_views.ccchrome/browser/ui/views/autofill/popup/popup_view_views.h
Estimated timestamp from git blame: Unknown (Google3 checkout)
Description
A potential Use-After-Free (UAF) vulnerability exists in PopupViewViews, the Views-based implementation of the Autofill popup.
The issue occurs because PopupViewViews::MaybeA11yFocusInformationalSuggestion() triggers synchronous accessibility events on Windows but fails to propagate the destruction status of the view back to its callers. As a result, callers like PopupViewViews::Show() and PopupViewViews::OnSuggestionsChanged() will continue executing and access the freed this pointer if a concurrent task destroys the popup during the event dispatch.
Root Cause Analysis
When MaybeA11yFocusInformationalSuggestion() is called and the popup contains a single PopupWarningView (e.g., for mixed forms or insecure contexts), it calls NotifyAXSelection() for that child view. This execution is wrapped in a TrackAndRun utility to detect if the view is destroyed during the process.
However, on Windows, if an accessibility client (like a screen reader) is active, firing native events eventually calls ::NotifyWinEvent(). This Windows API can operate synchronously and spin a nested COM message loop. Chromium's MessagePumpForUI processes pending tasks during this nested loop. If a queued task (such as an IPC triggered by a web page calling window.close() or blurring the input) closes the Autofill popup, the PopupViewViews instance is synchronously destroyed.
While TrackAndRun correctly detects the destruction of the child view and returns false, MaybeA11yFocusInformationalSuggestion() is declared as a void function. It completely ignores this return value. Consequently, control returns to the caller.
In PopupViewViews::Show() (around line 328):
MaybeA11yFocusInformationalSuggestion();
return !CanActivate() || (GetWidget() && GetWidget()->IsActive());
If this was destroyed, the subsequent virtual call to CanActivate() dereferences the freed this pointer.
Impact
Because the this pointer in Show() and OnSuggestionsChanged() is a raw C++ pointer residing on the stack, its memory is not protected by MiraclePtr/BackupRefPtr (which relies on reference counting of raw_ptr<T> members).
If an attacker successfully grooms the browser process heap, the freed memory block can be replaced with attacker-controlled data. The virtual call to CanActivate() can then be hijacked via a forged vtable, potentially leading to arbitrary Remote Code Execution (RCE) and a full Sandbox Escape in the browser process.
Potential Steps to Reproduce
Note: These are suggested theoretical steps based on code analysis, as our tooling does not currently have the capability to run code to produce a working PoC.
- The attacker creates a malicious webpage that grooms the browser process heap.
- The page interacts with an input field to trigger an Autofill popup guaranteed to show a single informational row (e.g., triggering a mixed-form warning).
- Concurrently, the attacker's script triggers an action that queues an IPC task to close the browser window or hide the popup (e.g., navigating away, calling
window.close(), or rapidly blurring the input). - The browser process attempts to show the popup and fires the accessibility event.
::NotifyWinEventspins a nested message loop on Windows, processing the attacker's queued close task.- The popup is destroyed, the memory is freed, and the attacker's heap grooming takes over the memory block.
- Execution returns to
PopupViewViews::Show(), where the forged vtable is dereferenced, achieving RCE.
Suggested Fix
- Modify
MaybeA11yFocusInformationalSuggestion()to return aboolindicating whether thePopupViewViewsinstance survived the accessibility calls (by returning the result ofTrackAndRun). - Update callers like
PopupViewViews::Show()andPopupViewViews::OnSuggestionsChanged()to check this return value and return early if the view was destroyed. - Alternatively, implement
views::ViewTrackeror checkweak_ptr_factory_.GetWeakPtr()in the calling methods to verify the object is still alive before accessingthisagain.
Evaluated with Chrome root at commit: 65b3256311f3ab6fb9870eaa522de7e6dd2663bb
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 function that fires accessibility events is declared void and ignores the destruction status returned by its tracking helper, so callers keep using the freed object.
Impact
If an attacker successfully grooms the browser process heap, the freed memory block can be replaced with attacker-controlled data, potentially leading to arbitrary Remote Code Execution and a full Sandbox Escape in the browser process.
What the attacker needed
Windows with an active screen reader; Victim visits a malicious webpage; Attacker can groom the browser heap
The fix
The function should return whether the view survived the accessibility calls, and callers should check that result and return early if the view was destroyed.
How it was found
- The attacker creates a malicious webpage that grooms the browser process heap.
- The page interacts with an input field to trigger an Autofill popup guaranteed to show a single informational row.
- Concurrently, the attacker's script triggers an action that queues an IPC task to close the browser window or hide the popup.
- The browser process attempts to show the popup and fires the accessibility event.
- `::NotifyWinEvent` spins a nested message loop on Windows, processing the attacker's queued close task.
- The popup is destroyed, the memory is freed, and the attacker's heap grooming takes over the memory block.
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 an object's memory but keeps using it, like deleting a file and then trying to open it. Here, showing an accessibility alert can let other queued work run and close the popup, but the code that opened it carries on as if it still exists. If an attacker can control what fills that freed memory, they might redirect the program to run their own code.
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.