Use after free in Updater (CVE-2026-13844)
A race condition in the Windows updater's shutdown callback allows two threads to move the same callback object concurrently, causing a double-release of its internal state and a use-after-free. A local non-admin user could potentially exploit this to escalate privileges to SYSTEM.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 35 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 race condition in GoogleUpdater's AppServerWin::Stop() method on Windows allows unsynchronized concurrent execution of the on_service_stopping_ callback. This can lead to a double-release of the underlying BindState, causing a potential Use-After-Free (UAF) vulnerability. If successfully exploited, a local non-admin user could potentially achieve local privilege escalation to SYSTEM.
Affected files:
chrome/updater/app/app_server_win.ccchrome/updater/app/app_server_win.h
Estimated timestamp from git blame: 2025-12-11
Summary
A potential race condition exists in the Chromium updater's AppServerWin::Stop() implementation due to unsynchronized access to the on_service_stopping_ callback. This callback is executed when the system-level COM server is shutting down. Because the callback is invoked and moved without thread synchronization, concurrent execution across multiple threads (such as COM RPC threads and the Service Control Manager thread) can cause a double-release of the underlying BindStateBase, potentially leading to a Use-After-Free (UAF) vulnerability.
Root Cause Analysis
In chrome/updater/app/app_server_win.cc, AppServerWin::CreateWRLModule() registers AppServerWin::Stop as the WRL Module release notifier:
void AppServerWin::CreateWRLModule() {
Microsoft::WRL::Module<Microsoft::WRL::OutOfProc>::Create(
this, &AppServerWin::Stop);
}
AppServerWin::Stop() can also be called via the SCM (Service Control Manager) dispatcher thread when the service is stopped by the OS.
The Stop() method is implemented as follows:
void AppServerWin::Stop() {
VLOG(2) << __func__ << ": COM server is shutting down.";
if (IsSystemInstall(updater_scope())) {
if (on_service_stopping_) {
std::move(on_service_stopping_).Run();
}
}
UnregisterClassObjects();
...
}
If Thread A (e.g., an SCM stop thread) and Thread B (e.g., a COM RPC thread executing due to a transition to zero objects) call Stop() concurrently, the following sequence of events can occur:
-
Both threads evaluate the
if (on_service_stopping_)check as true concurrently before either can clear or move the member variable. -
Both threads proceed to execute
std::move(on_service_stopping_).Run(). -
In
base/functional/callback.h,OnceCallback::Run() &&moves the internal state holder:C++ internal::BindStateHolder holder = std::move(holder_); -
This invokes the move constructor of
scoped_refptr<BindStateBase>inbase/memory/scoped_refptr.h:C++ scoped_refptr(scoped_refptr&& r) noexcept : ptr_(r.ptr_) { r.ptr_ = nullptr; } -
Because this move operation is non-atomic, both threads can copy the same raw pointer address
r.ptr_into their respective localholdervariables before either thread assignsnullptrto the source pointer. -
Both threads successfully execute the check
CHECK(!is_null())and invoke the callback. -
When the local
holdervariables on both threads go out of scope, their destructors invokeRelease(ptr_)on the sameBindStateBasepointer. -
The first destructor decrements the reference count to 0, deleting the
BindStateobject. The second destructor attempts to release the already-deleted pointer, causing a Use-After-Free.
Because scoped_refptr::ptr_ is annotated with the RAW_PTR_EXCLUSION macro, this smart pointer is not protected by MiraclePtr/BackupRefPtr.
Potential Exploitation Path
Note: These are suggested and potential steps, as our analysis is static and we have not executed a live proof-of-concept.
- An unprivileged local user logged into an interactive session (who is explicitly granted COM execute permissions via the
InteractiveSID) activates the updater's COM classes. - The attacker triggers rapid reference additions and releases (or coordinates a COM release with an SCM service stop request) to trigger concurrent invocations of
AppServerWin::Stop()on separate threads. - If the race condition is successfully triggered, the underlying
BindStateis double-released. - By reclaiming the freed heap memory of the
BindStatebefore the second thread's destructor runs, the attacker could overwrite thedestructor_function pointer. - When the second thread executes
destructor_(this), control flow is redirected, potentially allowing arbitrary code execution in the context of the service (NT AUTHORITY\SYSTEM). This would result in Local Privilege Escalation (LPE).
Suggested Fix
Protect the access to on_service_stopping_ with a mutex or base::Lock to perform a synchronized move-and-invoke, similar to the pattern utilized in ModuleReleaseHelper within chrome/windows_services/service_program/process_wrl_module.cc:
void AppServerWin::Stop() {
VLOG(2) << __func__ << ": COM server is shutting down.";
base::OnceClosure on_stopping;
{
base::AutoLock lock(lock_);
on_stopping = std::move(on_service_stopping_);
}
if (on_stopping) {
std::move(on_stopping).Run();
}
UnregisterClassObjects();
...
}
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.
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 on_service_stopping_ callback is checked and moved without a lock, so two threads can both move the same OnceCallback and double-release its BindState.
Impact
A local non-admin user could potentially achieve local privilege escalation to SYSTEM, though the analysis is static and no live proof-of-concept was executed.
What the attacker needed
Local interactive user session; COM execute permission via Interactive SID; ability to trigger COM release and SCM stop
The fix
The access to on_service_stopping_ should be protected with a mutex or base::Lock to perform a synchronized move-and-invoke.
How it was found
- An unprivileged local user with COM execute permissions activates the updater's COM classes.
- The attacker triggers rapid reference additions and releases, or coordinates a COM release with an SCM service stop request.
- This causes concurrent calls to AppServerWin::Stop() on separate threads.
- Both threads move the same callback, leading to a double-release of the BindState.
- The attacker reclaims the freed heap memory and overwrites the destructor_ function pointer.
- When the second thread calls destructor_(this), control flow is redirected, potentially achieving code execution as SYSTEM.
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 memory but another part still tries to use it, that is a use-after-free. Here, two threads can both try to take ownership of the same shutdown callback at the same time, so the memory behind it gets freed twice. An attacker who can trigger this might then take over the freed memory and run their own code with higher privileges.
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.