SourceCodester Inventory System Reflected Cross-Site Scripting Vulnerability

Vulnerability

A reflected cross-site scripting vulnerability has been identified in SourceCodester Inventory System version 1.0. The issue resides in the view_purchase.php file, where the application fails to properly sanitize the 'limit' parameter in GET requests. This lack of input validation allows remote attackers to inject arbitrary web scripts or HTML. The vulnerability can be exploited by targeting logged-in administrators, potentially leading to session cookie theft or unauthorized actions performed on behalf of the administrator.

Impact

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

Reproduction

To reproduce this vulnerability, deploy SourceCodester Inventory System 1.0 locally and log in as an administrator. Then, access the view_purchase.php page and include a crafted URL that injects a script into the 'limit' parameter. The injected script will be executed, demonstrating the cross-site scripting vulnerability.

Added: Mar 27, 2026, 6:23 PM
Updated: Mar 27, 2026, 6:23 PM

Vulnerability Rating

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