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

Type Confusion in V8 (CVE-2026-13967)

Hardcoded external pointer type tags in V8 Inspector collide with enum-based tags used by Gin, allowing an attacker with an in-sandbox memory primitive to swap pointers of different C++ types that share the same tag. This leads to out-of-sandbox C++ type confusion and potential arbitrary code execution.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 46 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: Hardcoded type tags in the V8 Inspector collide with enum-based tags used by Gin in Chromium. In processes where both components share a V8 Isolate, such as auction-worklet, an attacker with in-sandbox memory access can bypass the V8 Sandbox to achieve C++ type confusion.

Affected files:

  • v8/src/inspector/v8-console.cc
  • v8/src/inspector/v8-console.h
  • v8/src/inspector/v8-serialization-duplicate-tracker.cc
  • gin/public/gin_embedders.h
  • content/services/auction_worklet/report_bindings.cc

Estimated timestamp from git blame: 2025-10-07

Summary

A potential V8 Sandbox bypass exists due to collisions in the v8::ExternalPointerTypeTag values used by v8_inspector and the gin library. This collision allows an attacker who has already achieved an in-sandbox memory primitive to swap pointers of different C++ types that share the same tag. This leads to out-of-sandbox C++ type confusion when these pointers are subsequently used by the engine.

Root Cause Analysis

The V8 Sandbox hardening relies on v8::ExternalPointerTypeTag to ensure that v8::External pointers stored in the ExternalPointerTable (EPT) are only retrieved with the correct expected type. This mechanism is bypassed if two different C++ classes are assigned the same tag value.

In v8_inspector, the following tags are hardcoded as arbitrary integers:

  • kTaskInfoTag = 9 (defined in v8/src/inspector/v8-console.cc at line 528)
  • kV8ConsoleTag = 10 (defined in v8/src/inspector/v8-console.h at line 200)
  • kDictionaryValueTag = 11 (defined in v8/src/inspector/v8-serialization-duplicate-tracker.cc at line 52)

These collide with the gin::ExternalPointerTypeTag enum values defined in gin/public/gin_embedders.h. Since the enum starts at 0, the following values are assigned:

  • kRegisterAdMacroBindingsTag = 9 (line 47)
  • kReportBindingsTag = 10 (line 48)
  • kSetBidBindingsTag = 11 (line 49)

In the auction-worklet utility process, objects from both components coexist within the same v8::Isolate and share an EPT. For instance, when DevTools is attached, a v8_inspector::V8Console object (Tag 10) is created alongside the auction_worklet::ReportBindings object (Tag 10).

Potential Exploit Path

An attacker could potentially follow these steps to trigger the vulnerability:

  1. Use an initial V8 vulnerability (e.g., JIT optimization error) to gain an arbitrary read/write primitive within the V8 Sandbox memory in an auction-worklet process.
  2. Ensure DevTools is active, which instantiates the V8Inspector and its V8Console object.
  3. Locate the JSExternalObject for a V8Console method and the JSExternalObject for the sendReportTo binding (ReportBindings).
  4. Using the in-sandbox R/W primitive, swap the 32-bit ExternalPointerHandle in the ReportBindings object with the handle from the V8Console object.
  5. Invoke sendReportTo(). V8's EPT logic will successfully decode the handle using Tag 10, returning a raw V8Console* pointer to the ReportBindings::SendReportTo C++ function.
  6. ReportBindings::SendReportTo will treat the V8Console pointer as a ReportBindings instance. Accessing members or virtual functions on this confused pointer leads to out-of-sandbox memory corruption and potential arbitrary code execution.

Suggested Fix

To resolve this issue, V8 should provide a centralized or coordinated mechanism for allocating ExternalPointerTypeTag values to ensure that internal components like v8_inspector do not collide with embedder-defined tags. Alternatively, v8_inspector should use a reserved range of tags that are guaranteed not to overlap with those used by Chromium's Gin embedder.

Evaluated with Chrome root at commit: 1a8d40fc44df2088d5945c0bf53584038aa1614a


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 root cause is that v8_inspector hardcodes external pointer type tag values that overlap with the tag values assigned by the gin embedder's enum, so the ExternalPointerTable cannot distinguish between the two C++ types.

Impact

An attacker who already has an in-sandbox memory primitive could potentially achieve out-of-sandbox memory corruption and arbitrary code execution, but this requires DevTools to be active and a prior V8 vulnerability.

What the attacker needed

In-sandbox read/write primitive; DevTools active; auction-worklet process

The fix

V8 should provide a centralized or coordinated mechanism for allocating ExternalPointerTypeTag values, or v8_inspector should use a reserved range of tags that cannot overlap with embedder-defined tags.

How it was found

  1. Gain an arbitrary read/write primitive within the V8 Sandbox memory in an auction-worklet process using an initial V8 vulnerability.
  2. Ensure DevTools is active so that the V8Inspector and its V8Console object are instantiated.
  3. Locate the JSExternalObject for a V8Console method and the JSExternalObject for the sendReportTo binding.
  4. Using the in-sandbox read/write primitive, swap the ExternalPointerHandle in the ReportBindings object with the handle from the V8Console object.
  5. Invoke sendReportTo(), which decodes the handle using the shared tag and returns a V8Console pointer to the ReportBindings C++ function.
  6. The ReportBindings function treats the V8Console pointer as a ReportBindings instance, leading to out-of-sandbox memory corruption.

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.

The V8 Sandbox is a security feature that tries to keep memory bugs contained. It uses small numeric labels (tags) to check that a pointer is used as the right kind of object. Here, two different parts of Chromium accidentally used the same label for different objects, so an attacker who already has a memory bug inside the sandbox could trick the engine into treating one object as another, escaping the sandbox.

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.