SourceCodester Online Hotel Reservation System SQL Injection Vulnerability in deletegallery.php
Vulnerability
A critical SQL injection vulnerability has been identified in SourceCodester Online Hotel Reservation System version 1.0. The issue resides in the admin/deletegallery.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 attackers to execute arbitrary SQL commands, potentially leading to unauthorized database access, data manipulation, and in some cases, remote code execution.
Reproduction
The vulnerability can be reproduced by sending a crafted HTTP request to the admin/deletegallery.php file with an injected payload in the 'id' parameter. This payload exploits the SQL injection vulnerability by using a time-based blind injection technique, where the injected SQL query is designed to cause a delay in the response, indicating successful exploitation.
Remediation
It is recommended to use prepared statements and parameter binding to prevent SQL injection vulnerabilities. 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.
Vulnerability Rating
Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.
