(Pwn2Own) Apple Safari In Operator JIT Type Confusion Remote Code Execution Vulnerability
A type confusion flaw in Safari's JavaScript JIT compiler, specifically in the HasIndexedProperty DFG node, allows remote code execution. An attacker can trigger this by getting a victim to visit a malicious webpage, leading to code execution in the context of the current process.
Originally disclosed on Zero Day Initiative
This vulnerability allows remote attackers to execute arbitrary code on affected installations of Apple Safari. User interaction is required to exploit this vulnerability in that the target must visit a malicious page or open a malicious file.
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 type confusion in the DFG JIT compiler's handling of the HasIndexedProperty node, where the engine incorrectly assumes the type of an object, leading to memory corruption.
Impact
An attacker could execute arbitrary code in the context of the current process, but user interaction (visiting a malicious page) is required.
What the attacker needed
Victim visits a malicious page
The fix
The vulnerability was fixed by Apple, as indicated by the vendor advisory link.
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.
This is a bug in how Safari's JavaScript engine optimises code. When JavaScript runs, the engine sometimes makes assumptions about data types to speed things up. Here, it confused one type with another, which let an attacker run their own code on the victim's computer just by visiting a malicious website.
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.