SourceCodester Hotel Management System SQL Injection Vulnerability

Vulnerability

A SQL injection vulnerability has been identified in SourceCodester Hotel Management System version 1.0. The issue resides in the file '/index.php/reservation/check', where the 'room_type' parameter is manipulated, allowing attackers to inject malicious SQL queries. This vulnerability can be exploited remotely, without the need for authentication.

Impact

Exploitation of this vulnerability allows attackers to execute arbitrary SQL commands, potentially leading to unauthorized database access, data manipulation, and in some cases, remote code execution.

Reproduction

To reproduce this vulnerability, send a POST request to '/index.php/reservation/check' with the 'room_type' parameter. Inject a crafted SQL payload that exploits the application's SQL query handling. The vulnerability can be verified by observing the application's response for SQL error messages or by using a tool like sqlmap to automate the exploitation process.

Remediation

To address this vulnerability, it is recommended to use prepared statements and parameter binding to prevent SQL injection. Additionally, validate and filter user input to ensure it meets expected formats. Minimizing database user permissions and conducting regular security audits can further enhance the application's security.

Added: Apr 30, 2026, 11:19 PM
Updated: Apr 30, 2026, 11:19 PM

Vulnerability Rating

Custom Algorithm
spread
0.0
impact
3.1
exploitability
6.0
remediation
0.0
relevance
7.1
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.