SourceCodester Pharmacy Sales and Inventory System Cross-Site Scripting Vulnerability

Vulnerability

A cross-site scripting (XSS) vulnerability has been identified in SourceCodester Pharmacy Sales and Inventory System version 1.0. The issue arises in the '/index.php?page=supplier' file, where the 'name' parameter is not properly validated or encoded before being output to users. This flaw allows attackers to inject and execute malicious scripts in the context of the user's browser, potentially leading to the theft of cookies, session tokens, or other sensitive information.

Impact

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

Reproduction

To reproduce this vulnerability, navigate to the '/index.php?page=supplier' file and manipulate the 'name' parameter by injecting a script payload, such as a prompt script. The lack of input validation and output encoding will result in the execution of the injected script.

Remediation

It is recommended to implement proper output encoding for user inputs, validate and filter input data to reject malicious content, and consider using a Content Security Policy to restrict script execution.

Added: Apr 28, 2026, 2:29 PM
Updated: Apr 28, 2026, 2:29 PM

Vulnerability Rating

Custom Algorithm
spread
0.3
impact
1.7
exploitability
7.2
remediation
0.0
relevance
6.9
threat
6.4
urgency
2.9
incentive
0.0

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