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

Vulnerability

A SQL injection vulnerability has been identified in the Code-Projects Hostel Management System version 1.0. The issue resides in the login.php file within the admin directory. This vulnerability allows remote attackers to inject malicious SQL queries through the email parameter, exploiting inadequate input validation. The lack of proper sanitization enables unauthorized database access, data manipulation, and potential leakage of sensitive information.

Impact

Exploitation of this vulnerability allows for SQL injection, where attackers can interfere with database queries. This could lead to unauthorized data access, data modification or deletion, and in some cases, executing administrative operations on the database. Such actions can severely compromise the application's data integrity and security.

Reproduction

The vulnerability can be reproduced by sending a POST request to the login.php file in the admin directory, including a crafted payload in the email parameter that exploits the SQL injection flaw. 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 implement prepared statements and parameter binding to prevent SQL injection. Additionally, input validation and filtering should be applied to ensure user input meets expected formats. Minimizing database user permissions and conducting regular security audits can further enhance the application's security.

Added: Sep 22, 2025, 5:03 PM
Updated: Sep 22, 2025, 5:03 PM

Vulnerability Rating

Custom Algorithm
spread
0.3
impact
7.5
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.