SourceCodester Student Grades Management System Stored Cross-Site Scripting Vulnerability

Vulnerability

A stored cross-site scripting vulnerability has been identified in SourceCodester Student Grades Management System version 1.0. The issue arises in the 'delete_user' function within 'admin.php', where user input is not properly sanitized before being output, allowing for the injection of malicious scripts. This vulnerability can be exploited remotely, but requires authentication and user interaction.

Impact

Exploitation of this vulnerability allows for stored cross-site scripting, where injected scripts are executed in the context of the user.

Reproduction

To reproduce this vulnerability, log in as an admin and navigate to the 'Manage Users' or 'Manage Subjects' section. After accessing the edit user or subject interface, inject a script payload, such as an image tag with an 'onerror' event, into the username or subject name fields. Once the user or subject is updated, the injected script will execute, demonstrating the cross-site scripting vulnerability.

Remediation

It is recommended to sanitize user input, implement strict validation, and escape special characters before rendering input in the browser. Additionally, a Content Security Policy can be applied to restrict the execution of inline scripts.

Added: Oct 28, 2025, 12:24 AM
Updated: Oct 28, 2025, 12:24 AM

Vulnerability Rating

Custom Algorithm
spread
0.0
impact
5.4
exploitability
7.7
remediation
0.0
relevance
0.9
threat
6.4
urgency
2.9
incentive
1.7

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.