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

Use after free in V8 (CVE-2026-11185)

A use-after-free exists in the V8 Inspector when removing instrumentation breakpoints across multiple WebAssembly scripts. An attacker with DevTools Protocol access could trigger the dangling pointer and potentially achieve code execution in the renderer process.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 49 days

Project Fortify has identified a security issue and generated a PoC.

d8 variant: 'Default'

flags: --enable-inspector --expose-gc --gc-interval=1000 --omit-quit --fuzzing

Return code: 134

<details> <summary>stdout</summary>
[*] Compiling victims...
[*] Setting instrumentation breakpoint...
[*] Compiling triggers...
[*] Dropping victims...
[*] Removing breakpoint...

</details> <details> <summary>stderr</summary>


#
# Fatal error in ../../v8/src/api/api-inl.h, line 147
# Debug check failed: allow_empty_handle || !i::ValueHelper::IsEmpty(that).
#
#
#
#FailureMessage Object: 0x7ffe7d57a700
==== C stack trace ===============================

    /compressed/bin/Default/libv8_libbase.so(v8::base::debug::StackTrace::StackTrace()+0x1e) [0x77c69054289e]
    /compressed/bin/Default/libv8_libplatform.so(+0x163cd) [0x77c6904f23cd]
    /compressed/bin/Default/libv8_libbase.so(V8_Fatal(char const*, int, char const*, ...)+0x194) [0x77c690524b14]
    /compressed/bin/Default/libv8_libbase.so(+0x293c5) [0x77c6905243c5]
    /compressed/bin/Default/libv8.so(v8::debug::Script::RemoveWasmBreakpoint(int)+0xd8) [0x77c68c9c46f8]
    /compressed/bin/Default/libv8.so(+0x3f8c7a0) [0x77c68e58c7a0]
    /compressed/bin/Default/libv8.so(+0x3f79bcc) [0x77c68e579bcc]
    /compressed/bin/Default/libv8.so(+0x3f79679) [0x77c68e579679]
    /compressed/bin/Default/libv8.so(+0x3f3451f) [0x77c68e53451f]
    /compressed/bin/Default/libv8.so(+0x3fd5a1f) [0x77c68e5d5a1f]
    /compressed/bin/Default/libv8.so(+0x3faaef4) [0x77c68e5aaef4]
    bin/Default/d8(+0x9e611) [0x61bc38c11611]
    /compressed/bin/Default/libv8.so(+0xf94930) [0x77c68b594930]
Received signal 6
Aborted (core dumped)

</details>

Overview: A Use-After-Free vulnerability exists in the V8 Inspector when removing breakpoints across multiple WebAssembly scripts. Raw pointers to V8DebuggerScript objects are held in a local vector across a potential synchronous garbage collection point. If the scripts are collected, these pointers become dangling, leading to a UAF that can be exploited for renderer remote code execution.

Affected files:

  • v8/src/inspector/v8-debugger-agent-impl.cc
  • v8/src/debug/debug.cc
  • v8/src/inspector/v8-debugger-script.cc

Estimated timestamp from git blame: 2023-02-16

Root Cause

In v8/src/inspector/v8-debugger-agent-impl.cc, V8DebuggerAgentImpl::removeBreakpoint gathers a list of WebAssembly scripts and stores their raw pointers in a local std::vector<V8DebuggerScript*> scripts. This vector is passed to removeBreakpointImpl.

For instrumentation breakpoints (e.g., beforeScriptExecution), multiple WebAssembly scripts can be associated with a single protocol breakpoint ID. Each script appends a v8::debug::BreakpointId (which is -1 for instrumentation) to m_breakpointIdToDebuggerBreakpointIds. Consequently, the outer loop in removeBreakpointImpl executes multiple times.

Inside this loop, the code calls script->removeWasmBreakpoint(id) for each script in the vector, followed by m_debugger->removeBreakpoint(id). The vulnerability arises because m_debugger->removeBreakpoint eventually calls v8::internal::Debug::RemoveBreakpoint, which allocates a new BreakPoint object via isolate_->factory()->NewBreakPoint(...).

This heap allocation can trigger a synchronous Garbage Collection (GC) under heap pressure. If GC occurs and the underlying v8::Script objects are no longer reachable, their weak callbacks are executed. The weak callback invokes V8DebuggerAgentImpl::ScriptCollected, which erases the script from m_scripts, freeing the V8DebuggerScript C++ object. Because the local scripts vector still holds raw pointers to these freed objects, the next iteration of the outer loop will dereference a dangling pointer when calling script->removeWasmBreakpoint(id).

Impact

This Use-After-Free allows an attacker with DevTools Protocol (CDP) access (e.g., via a malicious extension) to execute arbitrary code in the context of the renderer process. The freed memory is subsequently used to instantiate a v8::HandleScope, providing a highly controllable primitive for memory corruption.

Suggested Fix

Avoid holding raw pointers to V8DebuggerScript across operations that can trigger garbage collection. Instead of populating the scripts vector with raw pointers, store their String16 script IDs.

Inside removeBreakpointImpl, dynamically look up each script ID in the agent's m_scripts map before use:

C++
// In removeBreakpointImpl:
for (const String16& scriptId : scriptIds) {
  auto it = m_scripts.find(scriptId);
  if (it != m_scripts.end()) {
    it->second->removeWasmBreakpoint(id);
  }
}

This ensures that if a script is collected and deleted during an earlier iteration's GC phase, it is safely skipped rather than accessed.

Evaluated with Chrome root at commit: c0eb5541aebfa4ea08806eaf6e94bcc69f87ab2f


The description of the vuln is LLM-generated and can contain mistakes. Your feedback is appreciated, and will help us make improvement over time. The PoC was run in a VM and it seemed to be legit - if not, let us know and we can strengthen our checker.

The original report as published on the Chromium issue tracker. 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 code stored raw pointers to script objects in a local vector and then performed an operation that could trigger garbage collection, leaving those pointers dangling.

Impact

An attacker with DevTools Protocol access, such as via a malicious extension, could execute arbitrary code in the renderer process.

What the attacker needed

DevTools Protocol access; multiple WebAssembly scripts; heap pressure to trigger GC

The fix

The code should store script IDs instead of raw pointers and look each script up in the agent's map before use, skipping any that were collected.

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 keeps using it, that is a use-after-free. Here the inspector kept a list of script objects, and a garbage collection could delete them while the list was still being used, so the program read freed memory. Someone who can talk to the browser's debugging interface could try to turn that into running 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.

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.