Code-Projects Restaurant Order System SQL Injection Vulnerability

Vulnerability

A critical SQL injection vulnerability has been identified in version 1.0 of the Code-Projects Restaurant Order System, specifically within the '/table.php' file. This vulnerability arises from inadequate validation of user input in the 'id' parameter, allowing attackers to inject malicious SQL queries. Exploitation of this flaw could lead to unauthorized access to the database, manipulation or deletion of data, and exposure of sensitive information. Notably, this vulnerability requires authentication to exploit, as a valid PHP session ID is needed.

Impact

Exploitation of this vulnerability allows for SQL injection, enabling attackers to manipulate database queries. This could result in unauthorized data access, data modification or deletion, and potentially executing administrative operations on the database.

Reproduction

To reproduce this vulnerability, log into the application using one of the default roles (Waiter, Cook, Busboy, or Host) with the password '123'. Once authenticated, send a GET request to 'table.php' with the 'id' parameter manipulated to include a crafted SQL payload. The injection can be verified by observing the application's response or by using a tool like sqlmap to automate the exploitation.

Remediation

It is recommended to use prepared statements and parameter binding to prevent SQL injection. Additionally, input validation and filtering should be implemented to ensure user input conforms to expected formats. Minimizing database user permissions and conducting regular security audits are also advisable.

Added: Jun 16, 2025, 1:18 PM
Updated: Jun 16, 2025, 1:18 PM

Vulnerability Rating

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