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

Type Confusion in Bindings (CVE-2026-11662)

A cached wrapper for a SharedArrayBuffer-backed view can bypass the non-shared requirement when passed to APIs expecting NotShared types, causing a type confusion between DOMSharedArrayBuffer and DOMArrayBuffer. This can lead to out-of-bounds heap reads and writes in the renderer process.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 24 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 vulnerability exists in Blink's binding layer where cached SharedArrayBuffer-backed views can bypass sharedness restrictions when converted to NotShared types. This leads to a sibling-class type confusion between DOMSharedArrayBuffer and DOMArrayBuffer. Due to object size differences, this can result in out-of-bounds heap memory access in the renderer process.

Affected files:

  • third_party/blink/renderer/bindings/core/v8/native_value_traits_buffer_sources.cc
  • third_party/blink/renderer/core/typed_arrays/dom_array_buffer_view.h
  • third_party/blink/renderer/core/typed_arrays/array_buffer_view_helpers.h
  • third_party/blink/renderer/core/typed_arrays/dom_array_buffer.cc
  • third_party/blink/renderer/core/streams/readable_byte_stream_controller.cc

Estimated timestamp from git blame: Unknown (Google3 checkout)

Summary

An issue has been identified in Blink's WebIDL binding implementation for ArrayBufferView types. The conversion logic in third_party/blink/renderer/bindings/core/v8/native_value_traits_buffer_sources.cc potentially returns a cached wrapper for a JavaScript ArrayBufferView without re-verifying whether the underlying buffer is shared. This can allow a view backed by a SharedArrayBuffer (SAB) to bypass the non-shared requirement of NotShared<T> parameters, leading to a type confusion between DOMSharedArrayBuffer and DOMArrayBuffer sibling classes.

Root Cause Analysis

The vulnerability resides in the ToDOMViewType template function (and related ToDOMArrayBufferView) within native_value_traits_buffer_sources.cc. When converting a V8 value, the function first checks if a Blink wrapper is already associated with the V8 object using ToScriptWrappable:

C++
// third_party/blink/renderer/bindings/core/v8/native_value_traits_buffer_sources.cc
template <typename DOMViewType, bool allow_shared>
DOMViewType* ToDOMViewType(v8::Isolate* isolate, v8::Local<v8::Value> value) {
  // ...
  if (auto* blink_view = ToScriptWrappable<DOMViewType>(isolate, v8_view)) {
    return blink_view; // Potential bypass: returns cached wrapper without checking allow_shared
  }
  // ...
}

If the same V8 ArrayBufferView was previously passed to an API that allows shared buffers (e.g., WebGL), a DOMArrayBufferView wrapper is created and cached. If that same view is subsequently passed to an API expecting a NotShared<T> type (where allow_shared is false), the logic incorrectly returns the cached shared wrapper.

While the NotShared<T> wrapper in C++ includes a DCHECK to verify that the buffer is not shared, this check is disabled in production (Release) builds. Consequently, the C++ implementation receives a pointer to a shared view where a non-shared view was expected.

Impact

The bypass leads to a sibling-class type confusion where a DOMSharedArrayBuffer is cast to a DOMArrayBuffer. These classes have different sizes on 64-bit systems:

  • DOMSharedArrayBuffer: ~40 bytes
  • DOMArrayBuffer: ~56 bytes

When Blink code treats the confused object as a DOMArrayBuffer, it may access members like detach_key_ (offset 40) or has_non_main_world_wrappers_ (offset 48), resulting in out-of-bounds (OOB) reads and writes on the Oilpan heap. For example, ReadableByteStreamController::enqueue triggers a transfer operation that ultimately leads to ForArrayBuffersInAllWorlds, which performs an OOB read of the has_non_main_world_wrappers_ flag. Such OOB accesses can be leveraged for information leaks or further memory corruption.

Potential Reproduction Steps (Suggested)

Note: These steps are based on static analysis and represent a potential attack vector; they have not been verified on a running system.

  1. Establish a Cross-Origin Isolated environment to enable SharedArrayBuffer support.
  2. Create a SharedArrayBuffer and a corresponding Uint8Array view v.
  3. Call a Blink API that opts into [AllowShared], such as WebGLRenderingContext.bufferData, passing the view v. This ensures a C++ wrapper is cached.
  4. Call an API that expects a non-shared view, such as ReadableByteStreamController.enqueue(v).
  5. In a Release build, the conversion bypasses the non-sharedness check, leading to type confusion and potential memory corruption when the controller attempts to process or transfer the buffer.

Suggested Fix

Modify ToDOMViewType and ToDOMArrayBufferView in native_value_traits_buffer_sources.cc to validate the sharedness of a cached wrapper against the allow_shared requirement before returning it:

C++
  if (auto* blink_view = ToScriptWrappable<DOMViewType>(isolate, v8_view)) {
    if (!allow_shared && blink_view->IsShared()) {
      return nullptr;
    }
    return blink_view;
  }

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

The binding conversion returns a cached wrapper without checking whether the underlying buffer is shared, and the debug-only check is disabled in release builds.

Impact

The type confusion can cause out-of-bounds reads and writes on the Oilpan heap, which could be leveraged for information leaks or further memory corruption.

What the attacker needed

Cross-Origin Isolated environment; Release build of Chrome

The fix

The conversion functions should validate the sharedness of a cached wrapper against the allow_shared requirement before returning it.

How it was found

  1. Establish a Cross-Origin Isolated environment to enable SharedArrayBuffer support.
  2. Create a SharedArrayBuffer and a corresponding Uint8Array view.
  3. Call a Blink API that opts into [AllowShared], such as WebGLRenderingContext.bufferData, passing the view to cache a C++ wrapper.
  4. Call an API that expects a non-shared view, such as ReadableByteStreamController.enqueue, with the same view.
  5. In a Release build, the conversion bypasses the non-sharedness check, leading to type confusion and potential 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.

A SharedArrayBuffer is a block of memory that can be shared between different parts of a program. Some browser features are only supposed to accept non-shared buffers, but a caching mistake lets a shared buffer slip through. Because the two buffer types have different sizes in memory, the browser can then read or write past the end of the object, which is a serious memory safety bug.

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.