SourceCodester Hotel and Lodge Management System SQL Injection Vulnerability in Booking Edit Feature

Vulnerability

A SQL injection vulnerability has been identified in SourceCodester Hotel and Lodge Management System version 1.0. The issue resides in the '/edit_booking.php' file, where insufficient input validation of the 'name' parameter allows attackers to inject malicious SQL queries. This vulnerability can be exploited remotely, potentially leading to unauthorized database access, data manipulation, and leakage of sensitive information.

Impact

Exploitation of this vulnerability allows for SQL injection, which could be used to access, modify, or delete database information. This type of vulnerability could also be leveraged to execute administrative operations on the database or, in some cases, to gain a shell on the server, depending on the application's architecture and database permissions.

Reproduction

To reproduce this vulnerability, send a POST request to '/hotel2/edit_booking.php' with an injected payload in the 'name' parameter. The injection can be crafted to manipulate the SQL query processing, taking advantage of the application's lack of proper input sanitization.

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 can also help mitigate such vulnerabilities.

Added: Oct 8, 2025, 1:27 PM
Updated: Oct 8, 2025, 8:19 PM

Vulnerability Rating

Custom Algorithm
spread
0.3
impact
5.0
exploitability
9.1
remediation
0.0
relevance
0.6
threat
6.4
urgency
2.9
incentive
10.0

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.