SourceCodester Sales and Inventory System Reflected Cross-Site Scripting Vulnerability

Vulnerability

A reflected cross-site scripting vulnerability has been identified in SourceCodester Sales and Inventory System version 1.0. The issue resides in the index.php file, where the application fails to properly sanitize the 'msg' parameter in GET requests. This lack of input validation allows remote attackers to inject arbitrary web scripts or HTML, which are executed in the context of the user's browser when they access a crafted URL.

Impact

Exploitation of this vulnerability allows for reflected cross-site scripting, where injected scripts are executed in the context of the victim's browser. This could lead to session hijacking, phishing attacks, or performing actions on behalf of the user.

Reproduction

To reproduce this vulnerability, deploy SourceCodester Sales and Inventory System version 1.0 locally. Then, access the index.php file and include a crafted URL that injects a script via the 'msg' parameter. For example, an image tag with an 'onerror' attribute could be used to execute a JavaScript alert.

Added: Mar 30, 2026, 4:27 PM
Updated: Mar 30, 2026, 4:27 PM

Vulnerability Rating

Custom Algorithm
spread
0.0
impact
1.7
exploitability
5.6
remediation
0.0
relevance
4.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.