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

Type Confusion in V8 (CVE-2025-8010)

A type confusion bug in V8's handling of scope information during lazy compilation causes a debug check failure and crash. An attacker could potentially exploit this to cause a denial of service or possibly achieve code execution, though the report only demonstrates a crash.

Shaheen Fazim Follow

Originally disclosed on Chrome VRP

Bounty$8,000 High View original
  • Fix shipped in 14 days


#
# Fatal error in ../../src/objects/fixed-array-inl.h, line 116
# Debug check failed: IsInBounds(index).
#
#
#
#FailureMessage Object: 0x7ffdb6786b58
==== C stack trace ===============================

    /home/user/v8/v8/out/x64.debug/libv8_libbase.so(v8::base::debug::StackTrace::StackTrace()+0x1e) [0x7f64fec3792e]
    /home/user/v8/v8/out/x64.debug/libv8_libplatform.so(+0x4b60d) [0x7f64feba460d]
    /home/user/v8/v8/out/x64.debug/libv8_libbase.so(V8_Fatal(char const*, int, char const*, ...)+0x205) [0x7f64fec10ce5]
    /home/user/v8/v8/out/x64.debug/libv8_libbase.so(+0x4d69c) [0x7f64fec1069c]
    /home/user/v8/v8/out/x64.debug/libv8_libbase.so(V8_Dcheck(char const*, int, char const*)+0x4d) [0x7f64fec10dbd]
    /home/user/v8/v8/out/x64.debug/libv8.so(v8::internal::TaggedArrayBase<v8::internal::WeakFixedArray, v8::internal::WeakFixedArrayShape, v8::internal::HeapObjectLayout>::get(int) const+0x47) [0x7f650670c1b7]
    /home/user/v8/v8/out/x64.debug/libv8.so(void v8::internal::DeclarationScope::AllocateScopeInfos<v8::internal::Isolate>(v8::internal::ParseInfo*, v8::internal::DirectHandle<v8::internal::Script>, v8::internal::Isolate*)+0x2ec) [0x7f650670ab0c]
    /home/user/v8/v8/out/x64.debug/libv8.so(+0x7c0ac9b) [0x7f6506853c9b]
    /home/user/v8/v8/out/x64.debug/libv8.so(v8::internal::Compiler::Compile(v8::internal::Isolate*, v8::internal::Handle<v8::internal::SharedFunctionInfo>, v8::internal::Compiler::ClearExceptionFlag, v8::internal::IsCompiledScope*, v8::internal::CreateSourcePositions)+0x9f0) [0x7f65068537a0]
    /home/user/v8/v8/out/x64.debug/libv8.so(v8::internal::Compiler::Compile(v8::internal::Isolate*, v8::internal::DirectHandle<v8::internal::JSFunction>, v8::internal::Compiler::ClearExceptionFlag, v8::internal::IsCompiledScope*)+0x4f0) [0x7f6506854730]
    /home/user/v8/v8/out/x64.debug/libv8.so(+0x8e5a176) [0x7f6507aa3176]
    /home/user/v8/v8/out/x64.debug/libv8.so(v8::internal::Runtime_CompileLazy(int, unsigned long*, v8::internal::Isolate*)+0x151) [0x7f6507aa2bb1]
    /home/user/v8/v8/out/x64.debug/libv8.so(+0x6fca53d) [0x7f6505c1353d]
Trace/breakpoint trap (core dumped)

VERSION

V8 version 13.9.0 (candidate)

REPRODUCTION CASE

Build: python3 tools/dev/gm.py x64.debug

Run: ./d8 poc.js


Reporter credit: Shaheen Fazim

The original report as published on the Chromium issue tracker, by Shaheen Fazim. Images and videos are our own copies; raw HTML is shown as text. View it on Chromium issue tracker.

The original is short, so this covers everything it reports, then explains this kind of bug in general: how it works, how to test for it and how it is fixed. The general sections are about the bug class, not this target. Written with AI and checked against the original; the original is the record. 4 min read.

What the report shows

This is a Chrome VRP advisory for a type confusion bug in V8, tracked as CVE-2025-8010, reported by Shaheen Fazim and rated high severity. The platform records a bounty of 8,000 USD and a disclosure date of 22 July 2025. The affected component is the V8 JavaScript engine.

The report itself is short: a crash trace, a version, and a reproduction recipe. The researcher built a debug V8 and ran a proof-of-concept script against the d8 shell. The engine aborted on a debug check rather than continuing.

The crash output is reproduced here exactly as given:

Text
#
# Fatal error in ../../src/objects/fixed-array-inl.h, line 116
# Debug check failed: IsInBounds(index).
#
#
#
#FailureMessage Object: 0x7ffdb6786b58
==== C stack trace ===============================

    /home/user/v8/v8/out/x64.debug/libv8_libbase.so(v8::base::debug::StackTrace::StackTrace()+0x1e) [0x7f64fec3792e]
    /home/user/v8/v8/out/x64.debug/libv8_libplatform.so(+0x4b60d) [0x7f64feba460d]
    /home/user/v8/v8/out/x64.debug/libv8_libbase.so(V8_Fatal(char const*, int, char const*, ...)+0x205) [0x7f64fec10ce5]
    /home/user/v8/v8/out/x64.debug/libv8_libbase.so(+0x4d69c) [0x7f64fec1069c]
    /home/user/v8/v8/out/x64.debug/libv8_libbase.so(V8_Dcheck(char const*, int, char const*)+0x4d) [0x7f64fec10dbd]
    /home/user/v8/v8/out/x64.debug/libv8.so(v8::internal::TaggedArrayBase<v8::internal::WeakFixedArray, v8::internal::WeakFixedArrayShape, v8::internal::HeapObjectLayout>::get(int) const+0x47) [0x7f650670c1b7]
    /home/user/v8/v8/out/x64.debug/libv8.so(void v8::internal::DeclarationScope::AllocateScopeInfos<v8::internal::Isolate>(v8::internal::ParseInfo*, v8::internal::DirectHandle<v8::internal::Script>, v8::internal::Isolate*)+0x2ec) [0x7f650670ab0c]
    /home/user/v8/v8/out/x64.debug/libv8.so(+0x7c0ac9b) [0x7f6506853c9b]
    /home/user/v8/v8/out/x64.debug/libv8.so(v8::internal::Compiler::Compile(v8::internal::Isolate*, v8::internal::Handle<v8::internal::SharedFunctionInfo>, v8::internal::Compiler::ClearExceptionFlag, v8::internal::IsCompiledScope*, v8::internal::CreateSourcePositions)+0x9f0) [0x7f65068537a0]
    /home/user/v8/v8/out/x64.debug/libv8.so(v8::internal::Compiler::Compile(v8::internal::Isolate*, v8::internal::DirectHandle<v8::internal::JSFunction>, v8::internal::Compiler::ClearExceptionFlag, v8::internal::IsCompiledScope*)+0x4f0) [0x7f6506854730]
    /home/user/v8/v8/out/x64.debug/libv8.so(+0x8e5a176) [0x7f6507aa3176]
    /home/user/v8/v8/out/x64.debug/libv8.so(v8::internal::Runtime_CompileLazy(int, unsigned long*, v8::internal::Isolate*)+0x151) [0x7f6507aa2bb1]
    /home/user/v8/v8/out/x64.debug/libv8.so(+0x6fca53d) [0x7f6505c1353d]
Trace/breakpoint trap (core dumped)

The version is stated as:

Text
V8 version 13.9.0 (candidate)

The reproduction steps are:

Bash
python3 tools/dev/gm.py x64.debug
Bash
./d8 poc.js

The report does not include the contents of poc.js, so the exact JavaScript that triggers the bug is not shown here.

Root cause

The failing check is IsInBounds(index) in fixed-array-inl.h, raised from TaggedArrayBase<WeakFixedArray, ...>::get(int). The call path runs through DeclarationScope::AllocateScopeInfos, which is part of compilation: it walks scope information while compiling a function lazily via Runtime_CompileLazy. In other words, an out-of-bounds index is used to read a weak fixed array during scope-info allocation.

The report does not explain why the index was out of bounds. The report does not name the specific confused types or the code change that fixed it.

Impact

On a debug build the result is a controlled abort. The report gives no exploitation detail and does not demonstrate memory corruption, code execution or a sandbox escape. The report shows a debug assertion failure during lazy compilation. The severity rating and bounty reflect the program's assessment, not a demonstrated exploit chain.

How this kind of bug works

A type confusion occurs when code treats an object as one type while it is actually another. In an engine like V8, objects carry a map (hidden class) that describes their layout, and optimised code often relies on that map to skip checks. If a value can be made to change type between the check and the use, the engine reads fields at the wrong offsets. The result ranges from a wrong value to an out-of-bounds access, as here, where an index computed from the confused object exceeds the array length.

These bugs usually arise at boundaries between representations: elements transitioning between packed and dictionary form, objects changing map during a callback, or compiler phases that assume a structure established earlier. Debug builds catch them early with assertions such as bounds checks; release builds may silently continue with corrupted memory.

Defences include map checks before field access, bounds checks on array reads, and keeping objects immutable or revalidating them after any operation that can run user code.

How to test for it

  1. Build a debug or assertion-enabled version of the engine, since many of these bugs only surface as assertion failures.
  2. Focus on operations that change object shape: adding and deleting properties, transitioning array element kinds, and mixing objects with different prototypes.
  3. Exercise paths that run user code in the middle of an engine operation, such as getters, proxies, valueOf, or Symbol.toPrimitive, so state can change between check and use.
  4. Run the same script repeatedly under different optimisation tiers and with lazy compilation forced, to hit compiler paths that only run on first call.
  5. A positive result is a crash with an assertion about bounds, maps or element kinds, or a wrong value where a correct one is expected. Reduce it to a minimal script.

Common false positives are ordinary TypeErrors, stack overflows from deep recursion, and crashes caused by unsupported syntax rather than a logic error. Confirm the crash disappears on a patched build and that the same input does not fail for unrelated reasons.

How it is fixed

Hunting notes

Type confusion in JavaScript engines tends to hide in the compiler and in element-kind transitions, especially where lazy compilation, scope analysis or inline caches meet user-controlled object shapes. Recon signals include recent changes to array or map handling, new optimisation tiers, and any code path where a callback can run mid-operation.

The original is short, so this covers everything it reports, then explains this kind of bug in general: how it works, how to test for it and how it is fixed. The general sections are about the bug class, not this target. Written with AI and checked against the original; the original is the record. 7 min read.

What happened, in plain words

This is a bug bounty advisory from the Chrome Vulnerability Reward Program (VRP), the scheme Google runs to pay people who find and report security flaws in Chrome. The flaw is in V8, the JavaScript engine inside Chrome: the part of the browser that reads and runs the JavaScript code on every web page. The bug is tracked as CVE-2025-8010, was reported by Shaheen Fazim, and is rated high severity. The platform records a bounty of 8,000 USD and a disclosure date of 22 July 2025.

The report is short. It contains a crash trace, a version number and a recipe for reproducing the crash. The researcher built a special debug version of V8 and ran a small proof-of-concept script against d8, the command-line shell that lets you run JavaScript with V8 outside a browser. The engine stopped with a fatal error.

A type confusion is a bug where a program treats a value as one kind of thing when it is really another, a bit like reading a phone book as if it were a dictionary: the layout is wrong, so everything you look up comes back garbled. Debug builds of V8 contain extra checks that catch such mistakes early; release builds may not.

The crash output

The report reproduces the crash exactly as it appeared:

Text
#
# Fatal error in ../../src/objects/fixed-array-inl.h, line 116
# Debug check failed: IsInBounds(index).
#
#
#
#FailureMessage Object: 0x7ffdb6786b58
==== C stack trace ===============================

    /home/user/v8/v8/out/x64.debug/libv8_libbase.so(v8::base::debug::StackTrace::StackTrace()+0x1e) [0x7f64fec3792e]
    /home/user/v8/v8/out/x64.debug/libv8_libplatform.so(+0x4b60d) [0x7f64feba460d]
    /home/user/v8/v8/out/x64.debug/libv8_libbase.so(V8_Fatal(char const*, int, char const*, ...)+0x205) [0x7f64fec10ce5]
    /home/user/v8/v8/out/x64.debug/libv8_libbase.so(+0x4d69c) [0x7f64fec1069c]
    /home/user/v8/v8/out/x64.debug/libv8_libbase.so(V8_Dcheck(char const*, int, char const*)+0x4d) [0x7f64fec10dbd]
    /home/user/v8/v8/out/x64.debug/libv8.so(v8::internal::TaggedArrayBase<v8::internal::WeakFixedArray, v8::internal::WeakFixedArrayShape, v8::internal::HeapObjectLayout>::get(int) const+0x47) [0x7f650670c1b7]
    /home/user/v8/v8/out/x64.debug/libv8.so(void v8::internal::DeclarationScope::AllocateScopeInfos<v8::internal::Isolate>(v8::internal::ParseInfo*, v8::internal::DirectHandle<v8::internal::Script>, v8::internal::Isolate*)+0x2ec) [0x7f650670ab0c]
    /home/user/v8/v8/out/x64.debug/libv8.so(+0x7c0ac9b) [0x7f6506853c9b]
    /home/user/v8/v8/out/x64.debug/libv8.so(v8::internal::Compiler::Compile(v8::internal::Isolate*, v8::internal::Handle<v8::internal::SharedFunctionInfo>, v8::internal::Compiler::ClearExceptionFlag, v8::internal::IsCompiledScope*, v8::internal::CreateSourcePositions)+0x9f0) [0x7f65068537a0]
    /home/user/v8/v8/out/x64.debug/libv8.so(v8::internal::Compiler::Compile(v8::internal::Isolate*, v8::internal::DirectHandle<v8::internal::JSFunction>, v8::internal::Compiler::ClearExceptionFlag, v8::internal::IsCompiledScope*)+0x4f0) [0x7f6506854730]
    /home/user/v8/v8/out/x64.debug/libv8.so(+0x8e5a176) [0x7f6507aa3176]
    /home/user/v8/v8/out/x64.debug/libv8.so(v8::internal::Runtime_CompileLazy(int, unsigned long*, v8::internal::Isolate*)+0x151) [0x7f6507aa2bb1]
    /home/user/v8/v8/out/x64.debug/libv8.so(+0x6fca53d) [0x7f6505c1353d]
Trace/breakpoint trap (core dumped)

Line by line, the important parts are:

  1. Fatal error in ../../src/objects/fixed-array-inl.h, line 116 tells you which source file and line raised the error. fixed-array-inl.h is V8's internal code for fixed-size arrays.
  2. Debug check failed: IsInBounds(index). is the assertion that failed. A debug check is a safety test that only exists in debug builds. IsInBounds asks whether an index is inside the array; here it was not, so the engine stopped.
  3. FailureMessage Object: 0x7ffdb6786b58 is the address of the message object V8 printed.
  4. The stack trace lists the chain of function calls that led to the failure, from the innermost call at the top to the outermost at the bottom. Reading upwards: TaggedArrayBase<...WeakFixedArray...>::get(int) tried to read an element of a weak fixed array; it was called by DeclarationScope::AllocateScopeInfos, part of compiling a function; that was reached through Compiler::Compile and Runtime_CompileLazy, which compiles a function the first time it is called (lazy compilation).
  5. Trace/breakpoint trap (core dumped) is the operating system reporting that the process was deliberately stopped and dumped its memory.

The version is stated as:

Text
V8 version 13.9.0 (candidate)

Reproducing it

The build command creates a debug build of V8 for 64-bit systems:

Bash
python3 tools/dev/gm.py x64.debug

gm.py is V8's build helper; x64.debug selects the 64-bit debug configuration, which includes the assertions that caught the bug. Then the proof-of-concept script is run:

Bash
./d8 poc.js

d8 is the V8 shell and poc.js is the script that triggers the flaw. The report does not include the contents of poc.js, so the exact JavaScript is not shown.

What it means

The failing check is IsInBounds(index) inside TaggedArrayBase<WeakFixedArray, ...>::get(int), reached through DeclarationScope::AllocateScopeInfos while a function is compiled lazily. In plain terms, an index that should point inside an array pointed outside it, and the debug build refused to continue. The report does not explain why the index was out of bounds. The report does not name the confused types or the fix.

On a debug build the result is a controlled abort. The report gives no exploitation detail and does not demonstrate memory corruption, code execution or a sandbox escape. The report shows a debug assertion failure during lazy compilation. The severity rating and bounty reflect the program's assessment, not a demonstrated exploit chain.

In general, how this kind of bug works

A type confusion occurs when code treats an object as one type while it is actually another. In an engine like V8, objects carry a map (a hidden class) describing their layout, and optimised code often relies on that map to skip checks. If a value can change type between the check and the use, the engine reads fields at the wrong offsets. The result ranges from a wrong value to an out-of-bounds access, as here, where an index computed from the confused object exceeds the array length.

These bugs usually arise at boundaries between representations: array elements transitioning between packed and dictionary form, objects changing map during a callback, or compiler phases that assume a structure established earlier. Debug builds catch them early with assertions such as bounds checks; release builds may silently continue with corrupted memory.

Defences include map checks before field access, bounds checks on array reads, and keeping objects immutable or revalidating them after any operation that can run user code.

In general, how to test for it

  1. Build a debug or assertion-enabled version of the engine, since many of these bugs only surface as assertion failures.
  2. Focus on operations that change object shape: adding and deleting properties, transitioning array element kinds, and mixing objects with different prototypes.
  3. Exercise paths that run user code in the middle of an engine operation, such as getters, proxies, valueOf, or Symbol.toPrimitive, so state can change between check and use.
  4. Run the same script repeatedly under different optimisation tiers and with lazy compilation forced, to hit compiler paths that only run on first call.
  5. A positive result is a crash with an assertion about bounds, maps or element kinds, or a wrong value where a correct one is expected. Reduce it to a minimal script.

Common false positives are ordinary TypeErrors, stack overflows from deep recursion, and crashes caused by unsupported syntax rather than a logic error. Confirm the crash disappears on a patched build and that the same input does not fail for unrelated reasons.

In general, how it is fixed

In general, hunting notes

Type confusion in JavaScript engines tends to hide in the compiler and in element-kind transitions, especially where lazy compilation, scope analysis or inline caches meet user-controlled object shapes. Recon signals include recent changes to array or map handling, new optimisation tiers, and any code path where a callback can run mid-operation.

Glossary

  • V8: the JavaScript engine inside Chrome that reads and runs JavaScript code.
  • CVE: a public identifier for a known security vulnerability.
  • Chrome VRP: Google's Vulnerability Reward Program, which pays for reports of security flaws in Chrome.
  • Bounty: the money paid to a researcher for an accepted report.
  • Type confusion: a bug where a program treats a value as one type when it is actually another.
  • Debug build: a version of software compiled with extra checks and diagnostics enabled.
  • Assertion: a check in code that stops the program if a condition is not met.
  • d8: the command-line shell that runs JavaScript with V8 outside a browser.
  • Proof-of-concept (PoC): a small script or program that demonstrates a bug.
  • Stack trace: a list of the function calls that led to a crash, innermost first.
  • Lazy compilation: compiling a function only when it is first called, rather than up front.
  • Out-of-bounds access: reading or writing an array at an index outside its valid range.
  • Map (hidden class): V8's internal description of an object's layout.
  • Weak fixed array: a V8 internal array whose entries can be cleared automatically.
  • Sandbox escape: breaking out of the browser's security boundary to reach the wider system.
  • Regression test: a test added after a fix to make sure the bug cannot come back.

More by Shaheen Fazim

View all

38 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.