Webkit HTMLMedia Element beforeLoad Remote Code Execution Vulnerability

2012-12-21T00:00:00
ID ZDI-12-191
Type zdi
Reporter pa_kt / twitter.com/pa_kt
Modified 2012-11-09T00:00:00

Description

This vulnerability allows remote attackers to execute arbitrary code on vulnerable installations of Apple Safari Webkit. User interaction is required to exploit this vulnerability in that the target must visit a malicious page or open a malicious file.

The specific flaw exists within the library's implementation of a HTMLMedia element. After a source element is created, an attacker can catch the beforeLoad event before the element is used, and delete the element. The pointer to the source element will then be referenced causing a use-after-free condition, which can lead to code execution under the context of the application.