Skip to content
Memory corruption Advisory Advanced CVE-2019-5831

Google V8 Array.prototype Memory Corruption Vulnerability

A crafted JavaScript program that manipulates Array.prototype and triggers garbage collection can cause V8 to dereference an invalid pointer when an array element is later accessed. The text says this could potentially be abused for remote code execution, and that a browser victim would need to visit a malicious page.

Aleksandar Nikolic Follow

Originally disclosed on Cisco Talos

High 7.5 View original

A specific JavaScript code can trigger a memory corruption in V8 7.3.492.17 which could potentially be abused for remote code execution. In order to trigger this vulnerability in the context of a browser, such as Google Chrome, the victim would need to visit a malicious web page.

Aleksandar Nikolic, on Cisco Talos

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

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 a garbage collection interaction with a mutated Array.prototype leaves a stale or invalid pointer that is dereferenced when an array element is read.

Impact

The crash could potentially be abused for remote code execution, though the proof of concept is not fully reliable and only triggered in AddressSanitizer builds.

What the attacker needed

Victim visits a malicious web page; crafted JavaScript runs in the engine

The fix

The vendor fixed the issue and issued a beta release about ten days after disclosure.

How it was found

  1. Run the supplied proof-of-concept script in the V8 shell built with AddressSanitizer.
  2. Observe the crash when an element of the array is accessed after a garbage collection event.
  3. Re-run with debug flags and garbage collection tracing to see the collection that precedes 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 is the program inside Chrome that runs JavaScript. A memory corruption bug means the engine can be tricked into reading or writing memory it should not touch, which in the worst case lets an attacker run their own code. Here a specially crafted script that changes a shared array template and forces memory cleanup makes the engine crash, and the author suspects it could be pushed further.

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 Aleksandar Nikolic

View all

147 more disclosed reports, best first.

More from Cisco Talos

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.