SourceCodester Hotel and Lodge Management System SQL Injection Vulnerability in edit_room.php

Vulnerability

A SQL injection vulnerability has been identified in SourceCodester Hotel and Lodge Management System version 1.0. The issue resides in the edit_room.php file, where the 'id' parameter is manipulated, allowing attackers to inject malicious SQL queries. This vulnerability can be exploited remotely, without any authentication.

Impact

Exploitation of this vulnerability allows unauthorized access to the database, where attackers can modify or delete data and access sensitive information. Such actions pose a significant threat to the overall security of the system and the integrity of its data.

Reproduction

The vulnerability can be reproduced by sending a POST request to the edit_room.php file with a crafted 'id' parameter. The request should include additional form data, such as room details and prices. This input is not properly sanitized, allowing for the injection of malicious SQL code.

Remediation

To address this vulnerability, 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 data conforms to expected formats. Minimizing database user permissions and conducting regular security audits can further enhance the system's security.

Added: Oct 8, 2025, 12:21 PM
Updated: Oct 8, 2025, 8:21 PM

Vulnerability Rating

Custom Algorithm
spread
0.3
impact
5.6
exploitability
9.1
remediation
0.0
relevance
0.7
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.