Code-Projects Simple Stock System Cross-Site Scripting Vulnerability in chatuser.php

Vulnerability

A reflective cross-site scripting vulnerability has been identified in version 1.0 of Code-Projects Simple Stock System. The issue resides in the chatuser.php file, where user input is not properly sanitized before being displayed. This flaw allows attackers to inject malicious scripts, such as JavaScript, which are executed by the victim's browser as if they were legitimate content. The vulnerability can be exploited remotely, without any authentication, but requires user interaction.

Impact

Exploitation of this vulnerability allows for reflective cross-site scripting, where an attacker can inject and execute scripts in the context of the user's browser session.

Reproduction

To reproduce this vulnerability, send a POST request to the chatuser.php file with a crafted chat message that includes a script injection, such as an image tag with an onerror event. The injected script will be executed by the browser, demonstrating the cross-site scripting vulnerability.

Remediation

It is recommended to properly escape output by converting special characters to HTML entities, filter out harmful input before processing, and adjust PHP file headers to prevent browsers from interpreting unexpected content types.

Added: Dec 19, 2025, 7:20 PM
Updated: Dec 19, 2025, 7:20 PM

Vulnerability Rating

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