Use after free in Updater (CVE-2026-13827)
A heap use-after-free write exists in the macOS Google Updater because a heap-allocated integer's lifetime is mismanaged between two Mojo callbacks. A local attacker controlling the low-privileged child process could invoke the callbacks out of order to write a controlled value to freed memory in the root process, potentially escalating privileges to root.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 47 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) write exists in the macOS Google Updater due to mismanaged object lifetimes between two Mojo-driven callbacks. A local attacker controlling the low-privileged child process can trigger this write in the root updater process by invoking Mojo methods out of order. This vulnerability could facilitate a privilege escalation from a standard user to root.
Affected files:
chrome/updater/net/network_fetcher_mac.mmchrome/updater/net/fetcher_callback_adapter.cc
Estimated timestamp from git blame: 2025-06-18
Summary
A potential heap use-after-free (UAF) write vulnerability in the macOS Google Updater may allow a local attacker to escalate privileges from a standard user to root. The issue resides in the network fetcher logic where a heap-allocated integer's lifetime is mismanaged across two callbacks exposed via Mojo to a child process. By invoking these callbacks out of order, a compromised child process could write an attacker-controlled 32-bit value to a freed heap location in the parent root process.
Root Cause Analysis
In chrome/updater/net/network_fetcher_mac.mm, the functions WrapDownloadToFileCallbacksWithEventLogging and WrapPostRequestCallbacksWithEventLogging create a pair of callbacks for network events.
Both functions follow a similar pattern (e.g., line 471):
- A heap-allocated integer is created:
std::unique_ptr<int> response_code = std::make_unique<int>(0);. - A
RepeatingCallback(response_started_callback) is created, capturing a raw pointer to this integer:base::BindRepeating(..., response_code.get(), ...). - A
OnceCallback(download_to_file_complete_callback) is created, taking ownership of the integer:base::BindOnce(..., std::move(response_code), ...).
These callbacks are used by the FileDownloadObserverImpl or PostRequestObserverImpl (in chrome/updater/net/fetcher_callback_adapter.cc) to handle Mojo IPC messages from a child net-worker process. While the child process is spawned with dropped privileges (console user), the parent process runs as root.
Potential Attack Vector
An attacker who can control the net-worker child process (running as a standard user) can trigger the UAF write in the root process as follows:
- The attacker invokes the
OnDownloadComplete(orOnRequestComplete) Mojo method on the observer interface. - In the root process, the
OnceCallbackexecutes. When the callback's bound state is subsequently destroyed, theunique_ptr<int>is deleted, freeing the heap memory. - The attacker then invokes the
OnResponseStartedMojo method, providing a controlled 32-bit integer as the status code. - The root process executes the
RepeatingCallback, which dereferences its dangling raw pointer and writes the attacker's value to the freed memory:*out_response_code = response_code;.
Because the RepeatingCallback can be invoked multiple times, an attacker could use this primitive to corrupt the heap and achieve arbitrary code execution as root. Furthermore, current analysis suggests that PartitionAlloc with MiraclePtr (BackupRefPtr) protection is not active for this specific binary on macOS, making the UAF write more likely to be exploitable.
Suggested Potential Trigger Steps
- On a macOS system with Google Updater installed, identify the scenario triggering an out-of-process network fetch (e.g., forcing an update check).
- Hijack or manipulate the environment of the
net-workerchild process spawned by the root updater. - From the child process, use the Mojo handle for the observer interface to call
OnDownloadCompletewith arbitrary values. - Immediately follow with a call to
OnResponseStarted, providing the desired 32-bit value for thehttp_status_codeargument. - Monitor for memory corruption or a crash in the parent updater process.
Recommended Fix
Ensure that the shared state (response_code) remains valid as long as any callback holding a reference to it exists. This can be achieved by using a scoped_refptr to manage the lifetime of the integer or a small struct containing the integer, rather than a unique_ptr with raw pointer capture. Alternatively, the architecture of the observer implementations could be updated to enforce strict state transitions, preventing the execution of OnResponseStarted after completion.
Evaluated with Chrome root at commit: b3153093eb3c78c3e88ccf562bcbc20437a04b0e
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, a heap-allocated integer is captured as a raw pointer by a repeating callback while ownership is moved into a once callback, so the integer can be freed before the repeating callback writes to it.
Impact
A local attacker controlling the child process could corrupt the heap and potentially achieve arbitrary code execution as root, though the text notes that PartitionAlloc with MiraclePtr protection is not active for this binary, making the UAF write more likely to be exploitable.
What the attacker needed
MacOS with Google Updater installed; control of the net-worker child process; ability to invoke Mojo methods out of order
The fix
The shared state should be kept alive as long as any callback holds a reference, for example by using a scoped_refptr instead of a unique_ptr with raw pointer capture, or by enforcing strict state transitions to prevent OnResponseStarted after completion.
How it was found
- Identify the scenario triggering an out-of-process network fetch (e.g., forcing an update check).
- Hijack or manipulate the environment of the `net-worker` child process spawned by the root updater.
- From the child process, use the Mojo handle for the observer interface to call `OnDownloadComplete` with arbitrary values.
- Immediately follow with a call to `OnResponseStarted`, providing the desired 32-bit value for the `http_status_code` argument.
- Monitor for memory corruption or a crash in the parent updater process.
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 a piece of memory but keeps a pointer to it and later writes through that pointer. Here, two callbacks share a small integer: one callback owns it and frees it when done, while the other keeps a raw pointer and can write to it after it is freed. Because the child process can trigger these callbacks in any order, an attacker could cause the write to happen after the free, corrupting memory in a root process.
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.