Step 1: Craft the Malicious URL: The attacker constructs a URL containing a malicious JavaScript payload within the criteria parameter. For example: index.php?user=competency_criteria&criteria=<script>alert('XSS')</script>.
Step 2: Victim Interaction: The attacker lures a legitimate user (e.g., an employee) to click on the crafted URL, potentially through phishing, social engineering, or other means.
Step 3: Server Processing: The server receives the request and, due to the vulnerability, processes the criteria parameter without proper sanitization.
Step 4: Payload Execution: The server renders the response, including the unsanitized criteria parameter. The victim's browser interprets the injected JavaScript payload and executes it within the context of the Biometric Shift Employee Management System's domain.
Step 5: Exploitation: The injected JavaScript executes, allowing the attacker to perform actions such as stealing session cookies, redirecting the user to a malicious site, or modifying the content of the page.