Use after free in Extensions (CVE-2026-19165)
A use-after-free occurs in the extension API event dispatch code when converting event arguments can re-enter JavaScript, allowing an extension-controlled getter to tear down its own context and free the emitter map. The stale reference is then dereferenced, causing a renderer-side native memory corruption crash.
- Fix shipped in 19 days
Report description
UAF in Extension API event dispatch
Bug location
Where do you want to report your vulnerability?
Chrome VRP – Report security issues affecting the Chrome browser. See program rules
Which URL (or repository) have you found the vulnerability in?
The problem
Please describe the technical details of the vulnerability
VULNERABILITY DETAILS
Summary
DispatchEvent() stores a reference to a v8::Global from the emitter map and then calls FromV8() on event arguments, which can reenter JS. During reentrancy, the extension context can be torn down, triggering emitters.clear() and freeing that map. When control returns, DispatchEvent() uses the stale v8::Global again via Get(), causing a use-after-free.
Details
Through FromV8(), Array conversion performs observable indexed property access and can synchronously execute JS. An getter controlled by extension removes its own iframe during this conversion. Context teardown clears the emitter map and frees the referenced map.
auto iter = data->emitters.find(event_name);
if (iter == data->emitters.end()) {
return;
}
v8::Global<v8::Object>& v8_emitter = iter->second;
v8::LocalVector<v8::Value> args(isolate);
CHECK(gin::Converter<v8::LocalVector<v8::Value>>::FromV8(isolate, info[0],
&args));
EventEmitter* emitter = nullptr;
gin::Converter<EventEmitter*>::FromV8(isolate, v8_emitter.Get(isolate),
&emitter);
To call DispatchEvent(), printerProvider extension API is used.
The sequence is:
printerProvider event dispatch
-> save reference to the emitter map node
-> convert argument array
-> execute attacker-controlled getter
-> remove the extension iframe
-> synchronous ScriptContext invalidation
-> APIEventHandler::InvalidateContext()
-> emitters.clear() frees the map node
-> return to DispatchEvent()
-> stale v8_emitter.Get() dereference
REPRODUCTION CASE
Run Chrome:
ASAN_OPTIONS="symbolize=1:print_stacktrace=1:halt_on_error=1:abort_on_error=0:detect_leaks=0:external_symbolizer_path=/path/to/llvm-symbolizer"
/path/to/chrome \
--user-data-dir=/tmp/poc0 \
--load-extension=/path/to/extension \
about:blank
Open chrome://newtab to load top.html in the extension context
Open Print Preview (Ctrl + P) and click See more… on the destination section
ASAN symbols were not fully resolved, so I used:
python3 /path/to/chromium/src/tools/valgrind/asan/asan_symbolize.py < /path/to/asan.log
Attached as poc.mov which shows the full repro steps.
Impact analysis
This vulnerability enables a renderer-side native use-after-free triggered via extension-controlled event dispatch
The cause
What version of Chrome have you found the security issue in?
Chromium: Tested on asan-linux-release-1664338, 152.0.7958.0
Is the security issue related to a crash?
Yes, it is related to a crash.
Choose the type of vulnerability
Memory Corruption (in a sandboxed process)
How would you like to be publicly acknowledged for your report?
@bean5oup
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 holds a reference into a map across a call that can re-enter JavaScript and trigger context teardown, which clears the map and frees the referenced node.
Impact
This vulnerability enables a renderer-side native use-after-free triggered via extension-controlled event dispatch, which crashes the sandboxed renderer and may allow memory corruption.
What the attacker needed
A malicious extension installed; user opens Print Preview; user expands destination section
How it was found
- Launch Chrome with the proof-of-concept extension loaded and open a blank page.
- Open the extension's new-tab page so the extension context is active.
- Open Print Preview and expand the destination section to trigger the printerProvider event dispatch.
- The event argument conversion runs the extension's getter, which removes its own iframe and frees the emitter map.
- Control returns to the dispatch code, which dereferences the stale reference and crashes under ASAN.
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 browser extension fires an event, the browser looks up a stored reference to the event handler and then converts the event's arguments. Converting those arguments can run JavaScript written by the extension, and that JavaScript can remove the extension's own page. Removing the page frees the stored reference, but the browser still tries to use it afterwards, touching memory that no longer belongs to it. This kind of mistake is called a use-after-free and can crash the browser or, in principle, be exploited for memory corruption.
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.