Campcodes Grocery Sales and Inventory System Cross-Site Scripting Vulnerability

Vulnerability

A cross-site scripting (XSS) vulnerability has been identified in version 1.0 of the Campcodes Grocery Sales and Inventory System. The issue arises in the file '/index.php' when the 'page' parameter is manipulated. This vulnerability allows remote attackers to inject malicious scripts that are executed in the context of the user's browser. The lack of proper input validation and output encoding for the 'page' parameter enables this exploitation, potentially leading to the theft of cookies, session tokens, and other sensitive information from the user.

Impact

Exploitation of this vulnerability allows for cross-site scripting, where injected scripts are executed in the context of the user's browser. This could lead to the theft of cookies or session tokens, allowing attackers to impersonate users or access sensitive information.

Reproduction

To reproduce this vulnerability, navigate to the 'index.php' file of the Campcodes Grocery Sales and Inventory System version 1.0. Append the 'page' parameter with a script payload, such as an alert script, to trigger the cross-site scripting vulnerability. This can be done by entering the crafted URL into a web browser, which will execute the injected script in the context of the user's session.

Remediation

It is recommended to validate and sanitize user input, ensuring that only expected data is accepted and that potentially harmful content, such as script tags, is removed or encoded. Implementing a Content Security Policy (CSP) to restrict the execution of scripts can also help mitigate this vulnerability.

Added: Sep 3, 2025, 7:18 PM
Updated: Sep 3, 2025, 8:26 PM

Vulnerability Rating

Custom Algorithm
spread
0.0
impact
1.0
exploitability
5.8
remediation
0.0
relevance
0.5
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.