Code-Projects Hostel Management System SQL Injection Vulnerability in allocate_room.php

Vulnerability

A critical SQL injection vulnerability has been identified in version 1.0 of the Code-Projects Hostel Management System. The issue resides in the allocate_room.php file, where the search_box parameter is manipulated to inject malicious SQL queries. This vulnerability allows remote attackers to gain unauthorized access to the database, modify or delete data, and access sensitive information. The vulnerability arises from inadequate input validation, enabling attackers to manipulate SQL queries and execute unauthorized operations.

Impact

Exploitation of this vulnerability allows for unauthorized database access, manipulation of database contents, and potential disruption of service.

Reproduction

The vulnerability can be reproduced by sending a POST request to allocate_room.php with a crafted search_box parameter that includes malicious SQL payloads. Various injection techniques can be used, such as boolean-based blind, error-based, time-based blind, and UNION-based injections. This can be done using tools like sqlmap, which automates the process of finding and exploiting SQL injection vulnerabilities.

Remediation

To address this vulnerability, it is recommended to use prepared statements and parameter binding to prevent SQL injection, validate and filter user input, minimize database user permissions, and conduct regular security audits.

Added: Jun 17, 2025, 4:20 AM
Updated: Jun 17, 2025, 4:20 AM

Vulnerability Rating

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