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

Use after free in Proxy (CVE-2026-11643)

A use-after-free exists in the proxy resolver's V8 context because pending asynchronous tasks from Atomics.waitAsync are not cancelled when the context is destroyed. An attacker could potentially execute code in the browser process on Android, but the report is based on static analysis and no proof-of-concept was executed.

Google Chrome

Originally disclosed on Chrome VRP

Critical View original
  • Fix shipped in 11 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 Use-After-Free (UAF) vulnerability exists in ProxyResolverV8::Context due to an asynchronous task lifetime mismatch when calling Atomics.waitAsync. When a proxy resolver instance is destroyed, its C++ context is deleted, but pending promise resolution tasks remain queued in V8's foreground runner on a surviving resolver's thread. When these tasks subsequently execute, they resolve the promise and invoke callbacks within the disposed context, dereferencing a dangling C++ pointer.

Affected files:

  • services/proxy_resolver/proxy_resolver_v8.cc

Estimated timestamp from git blame: 2020-09-14

Detailed Description

A potential Use-After-Free (UAF) vulnerability exists in the ProxyResolverV8::Context class within services/proxy_resolver/proxy_resolver_v8.cc. The issue arises because disposing of a V8 context via v8::Isolate::ContextDisposedNotification does not cancel outstanding V8 foreground tasks (such as those scheduled by Atomics.waitAsync) or flush pending promise resolution jobs.

When a PAC script leverages Atomics.waitAsync, V8 registers a FutexWaitListNode and schedules a foreground ResolveAsyncWaiterPromisesTask to run on the isolate's task runner. In Chromium, all ProxyResolverV8 instances share a single process-wide v8::Isolate (managed by SharedIsolateFactory). If multiple proxy resolvers are active, they execute on separate background threads but share the same isolate.

If the first-created proxy resolver (Resolver B) is active, the shared isolate's foreground task runner is bound to Resolver B's thread. If a second resolver (Resolver A) executes a PAC script that initiates an asynchronous wait via Atomics.waitAsync, the resulting ResolveAsyncWaiterPromisesTask is posted to the shared isolate's task runner (Resolver B's thread).

If Resolver A is subsequently destroyed, its destructor ProxyResolverV8::~ProxyResolverV8() synchronously deletes its C++ ProxyResolverV8::Context object, freeing its heap memory. However, the pending task on Resolver B's thread remains active. When Resolver B's thread executes the task, it retrieves the weak global handles to Resolver A's native context and promise, resolves the promise, and places the reaction job (e.g., a .then handler calling alert()) into the shared microtask queue.

Draining the microtask queue invokes the callback within the context of the destroyed Resolver A. The callback (such as AlertCallback) retrieves the C++ context pointer from v8::External and attempts to perform virtual method calls on it, leading to a Use-After-Free:

C++
static void AlertCallback(const v8::FunctionCallbackInfo<v8::Value>& args) {
  Context* context =
      static_cast<Context*>(v8::External::Cast(*args.Data())
                                ->Value(gin::kProxyResolverV8ContextTag));
  ...
  context->js_bindings()->Alert(message);   // Virtual call on a freed object
}

Potential Impact and Process Context

  • Android (BUILDFLAG(IS_ANDROID): On Android, the ProxyResolverFactoryImpl is instantiated as a static base::NoDestructor directly within the browser process (chrome/browser/net/chrome_mojo_proxy_resolver_factory.cc, lines 33–37). Consequently, this UAF occurs inside the highly privileged, unsandboxed browser process, potentially allowing direct Remote Code Execution (RCE).
  • Desktop: On desktop platforms, the proxy resolver runs within a highly restrictive sandboxed utility process.
  • V8 Sandbox (V8 SBX): The V8 Sandbox does not mitigate or protect against this issue. The vulnerability is a standard Use-After-Free of a host C++ object on the PartitionAlloc heap, and the dangling pointer is retrieved and dereferenced through normal control flow without requiring any V8 heap corruption.

Suggested/Potential Steps to Trigger

Note: These steps are based on static analysis of the control flow and code structures; our tooling does not currently have the capability to execute proof-of-concept code.

  1. Establish two active proxy resolver instances (Resolver B created first, Resolver A second) sharing the same isolate.
  2. Execute a PAC script in Resolver A that sets up a SharedArrayBuffer and registers an asynchronous wait via Atomics.waitAsync(int32, 0, 0, 100).then(() => { alert("trigger"); });.
  3. Trigger the destruction of Resolver A, which deletes the C++ ProxyResolverV8::Context object but leaves the task queued on Resolver B's thread.
  4. Allow Resolver B to process its queued tasks. The timeout will trigger, executing ResolveAsyncWaiterPromisesTask on the shared isolate, which resolves the promise and queues the reaction microtask.
  5. Resolver B executes a proxy resolution request, causing V8 to drain the microtask queue. This executes the callback, which invokes AlertCallback and accesses the freed Context memory.

Recommended Fix

To resolve this issue, avoid passing raw, unmanaged C++ pointers to v8::External when creating callbacks. Instead, manage the lifetime of the binding state using a shared state object (such as std::shared_ptr<ContextState>) or utilize a weak pointer pattern (base::WeakPtr) that can be invalidated upon Context destruction. Alternatively, the callbacks can be unregistered or neutralized when ContextDisposedNotification is issued, ensuring that no further callbacks can access the deleted object.

Evaluated with Chrome root at commit: fb72408a8493c46bc75fae1c70d03daec96b3040


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.

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 proxy resolver passes raw C++ pointers into V8 callbacks and does not cancel or invalidate pending asynchronous tasks when the V8 context is destroyed.

Impact

On Android the use-after-free occurs in the unsandboxed browser process and could allow remote code execution, while on desktop it is limited to a sandboxed utility process; the report is based on static analysis and no exploit was demonstrated.

What the attacker needed

Two active proxy resolvers; attacker-controlled PAC script; Android for browser-process impact

The fix

The report recommends managing the binding state with a shared or weak pointer and invalidating callbacks when the context is disposed, but does not state that a fix was applied.

How it was found

  1. Create two proxy resolver instances that share the same V8 isolate, with Resolver B created first.
  2. Run a PAC script in Resolver A that starts an asynchronous wait using Atomics.waitAsync and attaches a callback.
  3. Destroy Resolver A, which frees its C++ context but leaves the queued task on Resolver B's thread.
  4. Let Resolver B process its queued tasks so the timeout fires and the promise is resolved.
  5. Have Resolver B perform a proxy resolution request, which drains the microtask queue and runs the callback on the freed context.

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 is a bug where a program keeps using memory after it has been freed, which can let an attacker control what happens next. Here, a background task from a proxy script outlives the object it belongs to, so when the task runs it touches freed memory. On Android this could let an attacker run code in the browser process, but the report only describes the flaw from reading the code, not from actually exploiting it.

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.