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

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

A use-after-free occurs in Chrome's extension event dispatch when a listener throws and accessing exception.stack re-enters JavaScript, tearing down the extension context while dispatch continues with stale state. An attacker could crash the sandboxed extension renderer and potentially reuse freed memory with controlled data.

bean5oup Follow

Originally disclosed on Chrome VRP

  • Fix shipped in 23 days

Report description

Extension UAF due to reentrant exception.stack access during 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?

https://source.chromium.org/chromium/chromium/src/+/586fb22d7314488f688c0d2d6b572e19ef3a880b:extensions/renderer/bindings/event_emitter.cc;l=243-319;bpv=0;bpt=0


The problem

Please describe the technical details of the vulnerability

VULNERABILITY DETAILS

Summary

A renderer use-after-free occurs in EventEmitter::DispatchSync() when an extension event listener throws and triggers reentrant JS execution through exception.stack access. The reentrancy can tear down the extension context, clear per-context runner state, and then DispatchSync() continues execution using stale state, leading to a crash in a sandboxed extension renderer process.

Details

There are two PoC variants. One demonstrates a deterministic UAF, and the other demonstrates controllable memory reuse after reclaim.

  1. event_stack_getter (UAF)

    chrome.storage.onChanged dispatch enters EventEmitter::DispatchSync() and snapshots listener state. When a listener throws, ExceptionHandler::HandleException() reads exception.stack. The stack getter reenters JS during dispatch. The reentrant execution removes the extension iframe, triggering context teardown. During teardown, the context runner (JSRunner) is cleared from per-context storage, but the event-dispatch flow continues and still uses stale dispatch state (EventEmitter, JSRunner), resulting in a use-after-free during dispatch. The UAF is observed at the synchronous dispatch call path that runs callbacks through JSRunner in EventEmitter::DispatchSync().

  2. event_stack_getter_webrequest_reclaim (reclaim)

    Before staring this version, set ASAN_OPTIONS="quarantine_size_mb=0:...". In the reclaim variant, an accessor-bearing extraInfo array is used in chrome.webRequest.onBeforeRequest.addListener(...). Controlled reads of those accessors provide attacker-controlled ArrayBuffer data. V8ValueConverter conversion materializes this into native base::BlobStorage objects, allowing predictable native allocation behavior. After the stale-state UAF condition is triggered, this setup just shows reuse of the freed slot with controlled native data.

VERSION

Chromium: Tested on asan-linux-release-1664338, 152.0.7958.0

REPRODUCTION CASE

The following steps can be fully automated via the extension background service worker.

Run Chrome (for the second variant, add quarantine_size_mb=0:):

C++
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/poc1 \
--load-extension=/path/to/extension/ \
about:blank

Open chrome://newtab to load top.html in the extension context

Open DevTools on the parent frame and run window.TRIGGER()

Without --no-sandbox, ASAN symbols were not fully resolved, so I used:

C
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 demonstrates controlled native memory reuseof a stale object allocation after UAF. By itself, it does not yet establish full AAR/AAW.


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

The original report as published on the Chromium issue tracker, by @bean5oup. 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 event dispatcher does not expect reentrant JavaScript execution during exception handling and continues using state that has been freed by context teardown.

Impact

The vulnerability causes a crash in the sandboxed extension renderer and allows controlled native memory reuse, but does not yet establish full arbitrary read/write.

What the attacker needed

Victim installs a malicious extension; victim opens a page in the extension context

How it was found

  1. Load a malicious extension and open a page in its context.
  2. Trigger the extension's event dispatch via a JavaScript call.
  3. The listener throws, causing exception.stack to be read and re-entering JavaScript.
  4. The reentrant code removes the extension iframe, tearing down the context.
  5. Dispatch continues with stale state, causing a use-after-free crash.

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 an extension event fires, Chrome runs the listener's code. If that code throws an error, Chrome reads the error's stack property, which can run more JavaScript. That extra code can remove the extension's page, freeing memory that the event dispatcher still uses, causing a crash.

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 by bean5oup

View all

6 more disclosed reports, best first.

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.