vendor:
Safari
by:
Project Zero
7,5
CVSS
HIGH
UXSS
79
CWE
Product Name: Safari
Affected Version From: Safari 10.0.2
Affected Version To: Safari 10.0.2
Patch Exists: YES
Related CWE: N/A
CPE: a:apple:safari:10.0.2
Metasploit:
N/A
Other Scripts:
N/A
Tags: N/A
CVSS Metrics: N/A
Nuclei References:
N/A
Nuclei Metadata: N/A
Platforms Tested: Mac
2017
Apple WebKit: UXSS via FrameLoader::clear
When the new page is loading, FrameLoader::clear is called to clear the old document and window. The new document's window is attached at (1) before calling |m_frame.setDocument(nullptr)| that calls unload event handlers. So in the unload event handler, we could execute arbitrary javascript code on new document's window with a javascript: URI.
Mitigation:
Ensure that the unload event handlers are not vulnerable to UXSS.