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

Out of bounds read in V8 (CVE-2025-9479)

A bug in V8's deoptimiser causes an out-of-bounds read when materialising heap objects, leading to a crash. An attacker could potentially exploit this to read memory, though the report only demonstrates a crash.

Zhenghang Xiao Follow

Originally disclosed on Chrome VRP

Bounty$7,000 Medium View original
  • Fix shipped in 39 days

VULNERABILITY DETAILS

INTRODUCE

After bisect, it was determined that following commit caused this problem.

commit d1e497387a953db6daa37792e73150e397fbf7e3
Author: Samuel Groß <[email protected]>
Date:   Fri Jan 3 17:27:02 2025 +0000

    [sandbox] Reserve some pages at the start of trusted space
    
    This CL adds a simple mitigation for compressed nullptr dereference bugs
    in trusted space. Since we use zero as empty/missing value for protected
    pointer fields (pointers between objects in trusted space), we can have
    the equivalent of nullptr dereference bugs, but instead of accessing
    address zero, they will access the start of trusted space (because they
    are just offsets from the start of trusted space). With this CL, we now
    simply place a PROT_NONE mapping at the start of trusted space which
    should render most of these bugs unexploitable.
    
    Bug: 387491279
    Change-Id: Ic00e8bfa5f2373bc0d43bb6730a07b183e862c1f
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/6141634
    Reviewed-by: Michael Lippautz <[email protected]>
    Commit-Queue: Samuel Groß <[email protected]>
    Cr-Commit-Position: refs/heads/main@{#97957}

CRASH LOG

  • Debug output
Bash
# CMD: /tmp/d8-linux-debug-v8-component-98188/d8 --allow-natives-syntax poc.js
# OUTPUT ==============================================================
Received signal 11 SEGV_ACCERR 3e8700140000

==== C stack trace ===============================

/tmp/d8-linux-debug-v8-component-98188/libv8_libbase.so(_ZN2v84base5debug10StackTraceC2Ev+0x13)[0x7f71e6a88a13]
/tmp/d8-linux-debug-v8-component-98188/libv8_libbase.so(+0x4b962)[0x7f71e6a88962]
/lib/x86_64-linux-gnu/libc.so.6(+0x42520)[0x7f71e0442520]
/tmp/d8-linux-debug-v8-component-98188/libv8.so(_ZNK2v88internal10HandleBase20IsDereferenceAllowedEv+0x44)[0x7f71e3be5de4]
/tmp/d8-linux-debug-v8-component-98188/libv8.so(_ZNK2v88internal15TranslatedValue11GetRawValueEv+0x41)[0x7f71e3a71ab1]
/tmp/d8-linux-debug-v8-component-98188/libv8.so(_ZN2v88internal15TranslatedValue8GetValueEv+0x17)[0x7f71e3a724e7]
/tmp/d8-linux-debug-v8-component-98188/libv8.so(_ZN2v88internal15TranslatedState23EnsureChildrenAllocatedEiPNS0_15TranslatedFrameEPiPNSt4__Cr5stackIiNS5_5dequeIiNS5_9allocatorIiEEEEEE+0x158)[0x7f71e3a7efc8]
/tmp/d8-linux-debug-v8-component-98188/libv8.so(_ZN2v88internal15TranslatedState31EnsureCapturedObjectAllocatedAtEiPNSt4__Cr5stackIiNS2_5dequeIiNS2_9allocatorIiEEEEEE+0x765)[0x7f71e3a7db45]
/tmp/d8-linux-debug-v8-component-98188/libv8.so(_ZN2v88internal15TranslatedState23EnsureObjectAllocatedAtEPNS0_15TranslatedValueE+0xfe)[0x7f71e3a72cee]
/tmp/d8-linux-debug-v8-component-98188/libv8.so(_ZN2v88internal15TranslatedValue8GetValueEv+0x337)[0x7f71e3a72807]
/tmp/d8-linux-debug-v8-component-98188/libv8.so(_ZN2v88internal11Deoptimizer22MaterializeHeapObjectsEv+0xb0)[0x7f71e3a607a0]
/tmp/d8-linux-debug-v8-component-98188/libv8.so(+0x3cf7084)[0x7f71e48f7084]
/tmp/d8-linux-debug-v8-component-98188/libv8.so(_ZN2v88internal25Runtime_NotifyDeoptimizedEiPmPNS0_7IsolateE+0x89)[0x7f71e48f6989]
[0x7f715f73babd]
[end of stack trace]

Other

Please note to include the flags --allow-natives-syntax for clusterfuzz classification.

VERSION Tested on v8 version: 13.4.0 - 13.4.0

REPRODUCTION CASE

  1. Download debug v8 from: gs://v8-asan/linux-debug/d8-linux-debug-v8-component-98188.zip
  2. Run: d8 --allow-natives-syntax poc.js

FOR CRASHES, PLEASE INCLUDE THE FOLLOWING ADDITIONAL INFORMATION Type of crash: tab

CREDIT INFORMATION Reporter credit: Zhenghang Xiao (@Kipreyyy) and Nan Wang (@eternalsakura13)

The original report as published on the Chromium issue tracker, by Zhenghang Xiao (@Kipreyyy). 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. 5 min read.

What the report shows

This is a Chrome VRP advisory for an out of bounds read in V8, tracked as CVE-2025-9479 and rated medium severity. The reporter is Zhenghang Xiao (@Kipreyyy), with credit also given to Nan Wang (@eternalsakura13). The bounty was 7,000 USD and the report was disclosed on 25 February 2025.

After bisecting, the researcher identified a single V8 commit, version 97957, linked as https://crrev.com/[redacted], as the cause of the problem. The commit message explains the change: it reserves some pages at the start of trusted space as a mitigation for compressed nullptr dereference bugs. Because protected pointer fields use zero as the empty or missing value, a bug that would dereference nullptr instead accesses the start of trusted space. The commit places a PROT_NONE mapping there so that most of these bugs become unexploitable.

The crash was reproduced on a debug build of V8, version 13.4.0, downloaded from a Google Storage bucket, and run with the natives syntax flag enabled. The report notes that --allow-natives-syntax should be included for ClusterFuzz classification. The crash type is listed as tab.

The debug output shows a segmentation fault with SEGV_ACCERR at address 3e8700140000. The stack trace runs through HandleBase::IsDereferenceAllowed, TranslatedValue::GetRawValue, TranslatedState::EnsureChildrenAllocated, TranslatedState::EnsureCapturedObjectAllocatedAt, TranslatedState::EnsureObjectAllocatedAt, Deoptimizer::MaterializeHeapObjects and Runtime_NotifyDeoptimized. In other words, the fault happens while the deoptimizer is materialising heap objects from translated state.

Bash
# CMD: /tmp/d8-linux-debug-v8-component-98188/d8 --allow-natives-syntax poc.js
# OUTPUT ==============================================================
Received signal 11 SEGV_ACCERR 3e8700140000

==== C stack trace ===============================

/tmp/d8-linux-debug-v8-component-98188/libv8_libbase.so([redacted]+0x13)[0x7f71e6a88a13]
/tmp/d8-linux-debug-v8-component-98188/libv8_libbase.so(+0x4b962)[0x7f71e6a88962]
/lib/x86_64-linux-gnu/libc.so.6(+0x42520)[0x7f71e0442520]
/tmp/d8-linux-debug-v8-component-98188/libv8.so([redacted]+0x44)[0x7f71e3be5de4]
/tmp/d8-linux-debug-v8-component-98188/libv8.so([redacted]+0x41)[0x7f71e3a71ab1]
/tmp/d8-linux-debug-v8-component-98188/libv8.so([redacted]+0x17)[0x7f71e3a724e7]
/tmp/d8-linux-debug-v8-component-98188/libv8.so([redacted]+0x158)[0x7f71e3a7efc8]
/tmp/d8-linux-debug-v8-component-98188/libv8.so([redacted]+0x765)[0x7f71e3a7db45]
/tmp/d8-linux-debug-v8-component-98188/libv8.so([redacted]+0xfe)[0x7f71e3a72cee]
/tmp/d8-linux-debug-v8-component-98188/libv8.so([redacted]+0x337)[0x7f71e3a72807]
/tmp/d8-linux-debug-v8-component-98188/libv8.so([redacted]+0xb0)[0x7f71e3a607a0]
/tmp/d8-linux-debug-v8-component-98188/libv8.so(+0x3cf7084)[0x7f71e48f7084]
/tmp/d8-linux-debug-v8-component-98188/libv8.so([redacted]+0x89)[0x7f71e48f6989]
[0x7f715f73babd]
[end of stack trace]

The reproduction steps are short:

  1. Download the debug V8 build from gs://v8-asan/linux-debug/d8-linux-debug-v8-component-98188.zip.
  2. Run d8 --allow-natives-syntax poc.js.

The proof of concept script itself is not included in the report text, so the exact JavaScript that triggers the deoptimisation path is not shown here.

Root cause

The report does not analyse the root cause in prose. What it does show is that the faulting path is the deoptimizer materialising heap objects from translated state.

Impact

The report classifies the crash as a tab crash and the severity as medium. It does not describe a path to memory corruption, code execution or sandbox escape, and the commit message frames the reserved page as making most such bugs unexploitable. The practical impact shown here is a tab crash.

How this kind of bug works

Out of bounds reads in a JavaScript engine usually come from a mismatch between what the optimising compiler believes about a value and what the value actually is at runtime. When the compiler deoptimises, it reconstructs the interpreter frame from metadata called translated state: a description of which registers and stack slots hold which objects, including objects that were captured by closures or inlined frames. If that metadata is wrong, or if a field is read without checking that it is present, the deoptimizer can read a slot that was never written or resolve a pointer that should be treated as empty.

In engines that use pointer compression and a separate trusted space, an empty protected pointer is encoded as zero, which is an offset from the base of trusted space. Resolving it therefore reads near the base of that space rather than address zero. Reserving an inaccessible page at that base converts a silent read of attacker-influenced memory into a fault, which is a defence in depth measure rather than a fix for the underlying metadata bug.

How to test for it

  1. Work against a debug or ASan build of the engine, since these surface bad reads that release builds may tolerate.
  2. Focus on code that forces deoptimisation: functions that are optimised and then receive arguments of a different shape, closures that capture variables used in inlined frames, and code that mixes optimised and interpreted execution.
  3. Run with natives syntax enabled so you can force optimisation and deoptimisation at chosen points, and keep the script minimal so the stack trace points at one path.
  4. A positive result is a crash whose stack trace runs through the deoptimizer or translated state machinery, with a fault address that looks like a small offset from a known mapping base rather than a wild address.
  5. Common false positives are ordinary type errors, stack overflows and out of memory conditions, which produce different signals and stack traces. A crash in the deoptimizer that disappears when you disable optimisation is worth investigating further.

How it is fixed

The mitigation described in the commit is complementary: reserve a PROT_NONE page at the start of trusted space so that any remaining compressed nullptr dereference faults instead of reading valid-looking memory. Similar hardening exists in the form of guard pages and pointer tagging in other engines.

Hunting notes

This class of bug tends to hide in the boundary between the optimising compiler and the interpreter: deoptimisation, inlining, closure capture and object materialisation. Recon signals include recent changes to deoptimizer or translated state code, commits that add hardening around pointer encoding, and crash reports whose stacks end in materialisation routines.

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. 8 min read.

What happened, in plain words

This is a public bug bounty report from the Chrome VRP (Vulnerability Reward Program), the scheme Google runs to pay people who find security bugs in Chrome. It describes an out of bounds read in V8, the JavaScript engine inside Chrome, tracked as CVE-2025-9479 and rated medium severity. The reporter is Zhenghang Xiao (@Kipreyyy), with credit also given to Nan Wang (@eternalsakura13). The bounty was 7,000 USD and the report was disclosed on 25 February 2025.

A few terms first. V8 is the part of Chrome that reads and runs the JavaScript on every web page. An out of bounds read means a program asks for data at a memory location it should not be allowed to look at, like reading a page of a book past the last page. A crash is what happens when the program hits something it cannot handle and stops.

The researcher used a technique called bisecting: running older and newer versions of the software until the exact change responsible for the problem is found. That change was a single V8 commit, version 97957, linked as https://crrev.com/[redacted]. The commit message explains what it did: it reserves some pages at the start of trusted space as a mitigation for compressed nullptr dereference bugs. Because protected pointer fields use zero as the empty or missing value, a bug that would dereference nullptr instead accesses the start of trusted space. The commit places a PROT_NONE mapping there so that most of these bugs become unexploitable.

In everyday terms: trusted space is a special region of memory V8 keeps for certain objects, and a pointer is a number that says where in memory something lives. When a pointer is empty, V8 stores zero, which is read as an offset from the start of that region. The commit put a locked, no-entry page right at the start, so any code that mistakenly follows an empty pointer hits a wall instead of wandering into memory it should not touch.

The crash was reproduced on a debug build of V8, version 13.4.0, downloaded from a Google Storage bucket, and run with the natives syntax flag enabled. The report notes that --allow-natives-syntax should be included for ClusterFuzz classification. ClusterFuzz is Google's automated system for finding and sorting crashes. The crash type is listed as tab, meaning the browser tab crashes rather than the whole browser or the machine.

The debug output shows a segmentation fault with SEGV_ACCERR at address 3e8700140000. A segmentation fault is the operating system stopping a program that touched memory it was not allowed to. The stack trace, the list of function calls that were running when the crash happened, runs through HandleBase::IsDereferenceAllowed, TranslatedValue::GetRawValue, TranslatedState::EnsureChildrenAllocated, TranslatedState::EnsureCapturedObjectAllocatedAt, TranslatedState::EnsureObjectAllocatedAt, Deoptimizer::MaterializeHeapObjects and Runtime_NotifyDeoptimized. In other words, the fault happens while the deoptimizer is materialising heap objects from translated state.

Bash
# CMD: /tmp/d8-linux-debug-v8-component-98188/d8 --allow-natives-syntax poc.js
# OUTPUT ==============================================================
Received signal 11 SEGV_ACCERR 3e8700140000

==== C stack trace ===============================

/tmp/d8-linux-debug-v8-component-98188/libv8_libbase.so([redacted]+0x13)[0x7f71e6a88a13]
/tmp/d8-linux-debug-v8-component-98188/libv8_libbase.so(+0x4b962)[0x7f71e6a88962]
/lib/x86_64-linux-gnu/libc.so.6(+0x42520)[0x7f71e0442520]
/tmp/d8-linux-debug-v8-component-98188/libv8.so([redacted]+0x44)[0x7f71e3be5de4]
/tmp/d8-linux-debug-v8-component-98188/libv8.so([redacted]+0x41)[0x7f71e3a71ab1]
/tmp/d8-linux-debug-v8-component-98188/libv8.so([redacted]+0x17)[0x7f71e3a724e7]
/tmp/d8-linux-debug-v8-component-98188/libv8.so([redacted]+0x158)[0x7f71e3a7efc8]
/tmp/d8-linux-debug-v8-component-98188/libv8.so([redacted]+0x765)[0x7f71e3a7db45]
/tmp/d8-linux-debug-v8-component-98188/libv8.so([redacted]+0xfe)[0x7f71e3a72cee]
/tmp/d8-linux-debug-v8-component-98188/libv8.so([redacted]+0x337)[0x7f71e3a72807]
/tmp/d8-linux-debug-v8-component-98188/libv8.so([redacted]+0xb0)[0x7f71e3a607a0]
/tmp/d8-linux-debug-v8-component-98188/libv8.so(+0x3cf7084)[0x7f71e48f7084]
/tmp/d8-linux-debug-v8-component-98188/libv8.so([redacted]+0x89)[0x7f71e48f6989]
[0x7f715f73babd]
[end of stack trace]

Each line in that trace is one function that was running, from the innermost call at the top to the outermost at the bottom. The names are mangled, a compiler trick that encodes the function signature into the symbol, but the readable parts tell the story: the crash happened inside HandleBase::IsDereferenceAllowed, called from TranslatedValue::GetRawValue, called from the deoptimizer's object materialisation code.

The reproduction steps are short:

  1. Download the debug V8 build from gs://v8-asan/linux-debug/d8-linux-debug-v8-component-98188.zip.
  2. Run d8 --allow-natives-syntax poc.js.

The proof of concept script itself is not included in the report text, so the exact JavaScript that triggers the deoptimisation path is not shown here.

Root cause

The report does not analyse the root cause in prose. What it does show is that the faulting path is the deoptimizer materialising heap objects from translated state.

Impact

The report classifies the crash as a tab crash and the severity as medium. It does not describe a path to memory corruption, code execution or sandbox escape, and the commit message frames the reserved page as making most such bugs unexploitable. The practical impact shown here is a tab crash.

How this kind of bug works

In general, out of bounds reads in a JavaScript engine usually come from a mismatch between what the optimising compiler believes about a value and what the value actually is at runtime. When the compiler deoptimises, it reconstructs the interpreter frame from metadata called translated state: a description of which registers and stack slots hold which objects, including objects that were captured by closures or inlined frames. If that metadata is wrong, or if a field is read without checking that it is present, the deoptimizer can read a slot that was never written or resolve a pointer that should be treated as empty.

In engines that use pointer compression and a separate trusted space, an empty protected pointer is encoded as zero, which is an offset from the base of trusted space. Resolving it therefore reads near the base of that space rather than address zero. Reserving an inaccessible page at that base converts a silent read of attacker-influenced memory into a fault, which is a defence in depth measure rather than a fix for the underlying metadata bug.

How to test for it

In general, to look for this kind of bug:

  1. Work against a debug or ASan build of the engine, since these surface bad reads that release builds may tolerate.
  2. Focus on code that forces deoptimisation: functions that are optimised and then receive arguments of a different shape, closures that capture variables used in inlined frames, and code that mixes optimised and interpreted execution.
  3. Run with natives syntax enabled so you can force optimisation and deoptimisation at chosen points, and keep the script minimal so the stack trace points at one path.
  4. A positive result is a crash whose stack trace runs through the deoptimizer or translated state machinery, with a fault address that looks like a small offset from a known mapping base rather than a wild address.
  5. Common false positives are ordinary type errors, stack overflows and out of memory conditions, which produce different signals and stack traces. A crash in the deoptimizer that disappears when you disable optimisation is worth investigating further.

How it is fixed

The mitigation described in the commit is complementary: reserve a PROT_NONE page at the start of trusted space so that any remaining compressed nullptr dereference faults instead of reading valid-looking memory. Similar hardening exists in the form of guard pages and pointer tagging in other engines.

Hunting notes

In general, this class of bug tends to hide in the boundary between the optimising compiler and the interpreter: deoptimisation, inlining, closure capture and object materialisation. Recon signals include recent changes to deoptimizer or translated state code, commits that add hardening around pointer encoding, and crash reports whose stacks end in materialisation routines.

Glossary

  • V8: the JavaScript engine inside Chrome that reads and runs the JavaScript on web pages.
  • Out of bounds read: a program reading memory outside the area it is allowed to access.
  • CVE: a public identifier for a known security vulnerability.
  • Chrome VRP: Google's Vulnerability Reward Program, which pays researchers for security bugs in Chrome.
  • Bounty: the money paid to a researcher for a valid report.
  • Bisect: testing versions one by one to find the exact change that introduced a problem.
  • Commit: a single recorded change to a codebase.
  • Trusted space: a special region of memory V8 keeps for certain objects.
  • Pointer: a number that says where in memory something lives.
  • Nullptr dereference: following an empty pointer, which normally means reading address zero.
  • Compressed pointer: a pointer stored in a shortened form as an offset from a base address.
  • PROT_NONE mapping: a page of memory marked as inaccessible, so any access to it faults.
  • Mitigation: a change that makes a bug harder to exploit without fixing its root cause.
  • Debug build: a version of the software built with extra checks and diagnostic output.
  • --allow-natives-syntax: a V8 flag that enables special functions for forcing optimisation and deoptimisation.
  • ClusterFuzz: Google's automated system for finding and sorting crashes.
  • Segmentation fault: the operating system stopping a program that touched memory it was not allowed to.
  • SEGV_ACCERR: the signal detail meaning the program accessed a memory page without permission.
  • Stack trace: the list of function calls that were running when a crash happened.
  • Deoptimizer: the V8 component that switches optimised code back to the interpreter.
  • Translated state: metadata describing which registers and stack slots hold which objects, used to rebuild the interpreter frame during deoptimisation.
  • Heap: the area of memory where a program stores its objects.
  • Renderer: the Chrome process that runs a web page.
  • ASan: AddressSanitizer, a tool that detects bad memory accesses during testing.
  • Guard page: an inaccessible page placed next to memory to catch out of bounds accesses.
  • Pointer tagging: storing extra information in unused bits of a pointer.

More by Zhenghang Xiao

View all

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