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

Type Confusion in V8 (CVE-2026-15776)

A V8 fast path for RegExp.prototype[Symbol.matchAll] stored a HeapNumber through a Smi-typed store that skips the write barrier, leaving an old JSRegExp.lastIndex pointing at young-space memory. After a young GC reclaimed that memory, the stale pointer caused a crash, and the reporter chained it with a known sandbox escape to reach the v8CTF target.

Salvatore Gulizia Follow

Originally disclosed on Chrome VRP

  • Fix shipped in 7 days

VULNERABILITY DETAILS

Pure JavaScript can make RegExp.prototype[Symbol.matchAll] store a young HeapNumber into an old JSRegExp.lastIndex field through a fast path typed as Smi.

That Smi store lowers to StoreObjectFieldNoWriteBarrier, so the old-to-new edge is not recorded. A later young GC can reclaim/reuse the young HeapNumber while the old JSRegExp.lastIndex field still points at the stale young-space address.

Minimal trigger shape:

  1. A fake receiver passes flags: "g" and lastIndex: 1073741823 (Smi::kMaxValue on x64 pointer-compression builds).
  2. constructor[Symbol.species] returns a different fast JSRegExp.
  3. matchAll iterator-next handles an empty match and advances the species regexp's lastIndex.
  4. AdvanceStringIndexFast produces 1073741824, which is a HeapNumber.
  5. FastStoreLastIndex(JSRegExp, Smi) stores it through the Smi/no-barrier overload.

Relevant current-source refs:

Text
src/builtins/regexp-match-all.tq:178-188
  FastLoadLastIndex -> AdvanceStringIndexFast -> FastStoreLastIndex

src/builtins/builtins-regexp-gen.h:217-220
  AdvanceStringIndexFast(...) is declared TNode<Smi> but casts
  AdvanceStringIndex(...): Number

src/builtins/builtins-regexp-gen.cc:163-168
  FastStoreLastIndex(TNode<JSRegExp>, TNode<Smi>) stores JSRegExp::kLastIndexOffset

src/codegen/code-stub-assembler.cc:4043-4046
  StoreObjectField(TNode<Smi>) uses StoreObjectFieldNoWriteBarrier

Expected behavior: the fast path should not store a heap object through a Smi no-write-barrier store. A non-Smi result should use a generic tagged-object store with the normal write barrier, or the path should deopt/fallback before writing.

Actual behavior: valid JavaScript reaches the Smi store with a HeapNumber, causing stale/corrupt lastIndex state after GC.

I also paired this RegExp primitive with an already known sandbox escape and used the combined chain to flag the Chrome 150 v8CTF target.

VERSION

Chrome Version:

Text
d8 / V8 15.2.0 (candidate)
V8 source commit: 0c7a9d0d8c05491e8053d7259a1a6b11e75c1907
Release d8 build id: 0c3af5e5a4d734b5
ASAN d8 build id: cd9b6305dec563bd

The combined exploitability check was against Chrome for Testing M150 in the v8CTF environment.

Operating System:

Text
Ubuntu 24.04.4 LTS x86_64
Linux 6.8.0-101-generic

REPRODUCTION CASE

Please attach the files in attachments/ directly.

Invariant break, no flags

File:

Text
attachments/poc_invariant_lastindex_heapnumber.js

Command:

Shell
d8 attachments/poc_invariant_lastindex_heapnumber.js

Observed:

Text
1073741824 number

This shows the fast path stored Smi::kMaxValue + 1 into lastIndex as a HeapNumber.

Release crash, no flags

File:

Text
attachments/poc_missing_barrier_crash.js

Command:

Shell
d8 attachments/poc_missing_barrier_crash.js

Observed 5/5 locally:

Text
Received signal 11 SEGV_ACCERR ...
exit=139

Supporting files:

Text
attachments/release_crash_summary.txt
attachments/release_crash_sample.txt
attachments/release_build_info.txt

ASAN crash

Command:

Shell
ASAN_OPTIONS=symbolize=1:detect_leaks=0 \
  out.gn/x64.asan/d8 --disable-in-process-stack-traces \
  attachments/poc_missing_barrier_crash.js

The --disable-in-process-stack-traces flag is only used so ASAN owns the crash report instead of V8's in-process signal handler.

Supporting files:

Text
attachments/asan_stack.txt
attachments/asan_build_info.txt

FOR CRASHES, PLEASE INCLUDE THE FOLLOWING ADDITIONAL INFORMATION

Type of crash:

Text
d8 process crash. In Chrome this is renderer-reachable V8 code.

Crash State:

Text
AddressSanitizer: SEGV READ
#0 Builtins_TypeOfHandler
#3 v8::internal::Invoke(...) src/execution/execution.cc:475
#5 v8::Script::Run(...) src/api/api.cc:2048
#6 v8::Shell::ExecuteSource(...) src/d8/d8.cc:1150

Full symbolized ASAN output is in:

Text
attachments/asan_stack.txt

Client ID:

Text
N/A

CREDIT INFORMATION

Reporter credit:

Text
Salvatore Gulizia (nickname: Serotav)

The original report as published on the Chromium issue tracker, by Salvatore Gulizia (nickname: Serotav). 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 AdvanceStringIndexFast helper is typed as returning a Smi but can return a HeapNumber, and FastStoreLastIndex then writes it via a Smi no-write-barrier store, so the old-to-new edge is never recorded.

Impact

In Chrome this is renderer-reachable V8 code that crashes the process, and the reporter paired it with an already known sandbox escape to flag the v8CTF target.

What the attacker needed

Ability to run JavaScript in V8; a young GC after the store

The fix

The fast path should not store a heap object through a Smi no-write-barrier store; a non-Smi result should use a generic tagged-object store with the normal write barrier, or the path should deopt or fall back before writing.

How it was found

  1. Pass a fake receiver with global flags and lastIndex set to the maximum Smi value.
  2. Have constructor[Symbol.species] return a different fast JSRegExp.
  3. Let the matchAll iterator-next handle an empty match and advance the species regexp's lastIndex.
  4. AdvanceStringIndexFast produces a value one above the maximum Smi, which is a HeapNumber.
  5. FastStoreLastIndex stores that HeapNumber through the Smi no-barrier overload.
  6. Run a young GC so the stale young-space address is reclaimed, then observe the crash.

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.

V8, Chrome's JavaScript engine, sometimes stores small numbers directly inside an object and larger numbers as separate heap objects. A write barrier is bookkeeping that tells the garbage collector an old object now points at a new one; skipping it lets the collector free memory that is still referenced. Here a large number was written through a path meant only for small numbers, so after garbage collection the stored value pointed at freed memory and the engine crashed.

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 by Salvatore Gulizia

View all

5 more disclosed reports, best first.

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.