Race condition in Bindings (CVE-2026-113150)
A logic flaw at the V8-Blink boundary allows an isolated world (such as an extension content script) to keep a live wrapper to an ArrayBuffer after the main world calls ArrayBuffer.prototype.transfer(). If the transferred buffer is then sent to a worker, the worker and the isolated world share the same backing memory without the required cross-origin isolation headers, enabling race conditions and side-channel attacks.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 7 months
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 without the security team.
Overview: A logic flaw exists where V8's ArrayBuffer.prototype.transfer() detaches a JavaScript wrapper without notifying Blink. This allows isolated worlds (e.g., extensions) to retain access to a buffer after it is transferred to a worker, enabling cross-thread memory aliasing and TOCTOU attacks.
Affected files:
third_party/blink/renderer/core/typed_arrays/dom_array_buffer.ccv8/src/builtins/builtins-arraybuffer.ccv8/src/objects/js-array-buffer.ccthird_party/blink/renderer/bindings/core/v8/native_value_traits_buffer_sources.ccthird_party/blink/renderer/core/typed_arrays/dom_array_buffer_base.h
Estimated timestamp from git blame: 2025-12-10
Summary
A potential logic bug exists at the V8-Blink boundary where ArrayBuffer.prototype.transfer() detaches a JSArrayBuffer without notifying the Blink embedder. In Blink's multi-world architecture, a DOMArrayBuffer can have multiple v8::ArrayBuffer wrappers (e.g., one for the main world and one for an isolated world like an extension), all sharing the same v8::BackingStore via a std::shared_ptr.
While Blink's own transfer path (e.g. postMessage invoking DOMArrayBuffer::TransferDetachable) correctly detaches wrappers across all worlds, V8's ArrayBuffer.prototype.transfer() builtin is a pure-V8 operation. When called on a non-resizable buffer, V8 reuses the backing store and detaches only the specific receiver wrapper. Wrappers in other worlds (like extension content scripts) remain attached to the original BackingStore. If the transferred buffer is subsequently sent to a worker thread, memory becomes shared across threads without the mandatory COOP/COEP headers required for SharedArrayBuffer.
Technical Details
- Incomplete Detachment: V8's
builtins-arraybuffer.ccperforms a transfer by callingJSArrayBuffer::DetachInternalon the receiver. This only mutates the fields of that specificJSArrayBufferinstance. It does not invoke any embedder hooks to notify Blink that the underlyingDOMArrayBufferhas been logically detached. - State Divergence: Blink's
DOMArrayBuffer(and itsArrayBufferContents) retains ownership of theBackingStoreafter a V8-initiated transfer. Any existing isolated world wrappers remain fully attached and functional. - Parallel Track Creation: The result of a V8
transfer()is a freshJSArrayBuffer. When this new buffer is passed toworker.postMessage(),ToDOMArrayBufferinnative_value_traits_buffer_sources.cccreates a new C++DOMArrayBufferinstance to represent it, as it has no existing Blink association. - Transfer Blindspot: When Blink finalizes the
postMessagetransfer, it callsDOMArrayBuffer::TransferDetachableon this newly createdDOMArrayBuffer. This function usesForArrayBuffersInAllWorldsto detach all associated V8 wrappers. However, it only knows about the freshly created V8 wrapper. It is completely unaware of the originalDOMArrayBufferand the isolated world wrapper, which are left silently attached to the sameBackingStorenow possessed by the worker.
Impact
- TOCTOU Vulnerabilities: An attacker page can use a worker to asynchronously modify a buffer while a benign extension in an isolated world is concurrently validating or processing that same buffer.
- Spectre/Side-Channel Attacks: Enables the construction of shared-memory timers across threads, bypassing the restrictions intended by Cross-Origin Opener Policy (COOP) and Cross-Origin Embedder Policy (COEP).
- Renderer Invariant Violation: The condition of having multiple non-detached wrappers for the same
BackingStoreviolates intended memory management state.
Note: These are potential impact steps based on code analysis; a working proof-of-concept has not been executed.
Potential Reproduction Steps
- Precondition: An extension content script is active on the page and reads an
ArrayBufferattribute from a dispatched event (e.g.,MediaEncryptedEvent.initData). - The main world creates an
ArrayBufferand aMediaEncryptedEventusing it. - The main world dispatches the event. The content script listener reads
e.initData. Blink creates an isolated-worldv8::ArrayBufferwrapper for the buffer, sharing theBackingStore. - The main world calls
ab.transfer(). V8 detaches the main-world wrapper but leaves the isolated-world wrapper attached to theBackingStore. - The main world transfers the result of
ab.transfer()to a worker viapostMessage. - Result: The worker thread and the main-thread isolated world now have simultaneous, non-atomic access to the same non-shared memory buffer.
Suggested Fix
V8 should notify the embedder when ArrayBuffer.prototype.transfer() detaches an ArrayBuffer so that Blink can properly update its state and detach all aliases across all DOMWrapperWorlds. Alternatively, DOMArrayBuffer needs a mechanism to detect V8-initiated detachments and actively propagate them to its other v8::ArrayBuffer wrappers, rather than relying on lazy polling.
Evaluated with Chrome root at commit: ff3d2b74fa39431785bd60e51463b08fcc71ee33
Results so far have been promising, but there can be wrong deductions. If this proves to be a false positive, please close as WAI; 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.
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, V8's ArrayBuffer.prototype.transfer() detaches only the receiver JSArrayBuffer without notifying the Blink embedder, so other world wrappers sharing the same BackingStore remain attached.
Impact
An attacker page could use a worker to asynchronously modify a buffer while a benign extension in an isolated world is concurrently validating or processing that same buffer, and could construct shared-memory timers across threads, bypassing COOP/COEP restrictions; however, the report notes that a working proof-of-concept has not been executed.
What the attacker needed
An extension content script active on the page; the extension reads an ArrayBuffer from an event; the main world calls transfer() on that buffer; the transferred buffer is sent to a worker
The fix
V8 should notify the embedder when ArrayBuffer.prototype.transfer() detaches an ArrayBuffer so that Blink can properly update its state and detach all aliases across all DOMWrapperWorlds.
How it was found
- An extension content script is active on the page and reads an ArrayBuffer attribute from a dispatched event.
- The main world creates an ArrayBuffer and a MediaEncryptedEvent using it.
- The main world dispatches the event; the content script listener reads the buffer, causing Blink to create an isolated-world wrapper that shares the BackingStore.
- The main world calls ab.transfer(), which detaches the main-world wrapper but leaves the isolated-world wrapper attached.
- The main world transfers the result of ab.transfer() to a worker via postMessage.
- The worker thread and the main-thread isolated world now have simultaneous, non-atomic access to the same non-shared memory buffer.
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.
An ArrayBuffer is a block of memory that JavaScript code can read and write. Normally, when one part of the browser hands that memory to another part (like a background worker), the original copy is marked as unusable so two places cannot change it at the same time. Here, a built-in function called transfer() only marked one copy as unusable, leaving another copy (used by a browser extension) still active, so two threads could end up changing the same memory at once.
What is Race condition?
Parallel requests reach a state the code assumed could not happen: a coupon used twice, a limit overrun, a check skipped.