SourceCodester Advanced School Management System SQL Injection Vulnerability
Vulnerability
A SQL injection vulnerability has been identified in SourceCodester Advanced School Management System version 1.0. The issue arises in the 'commonController.php' file, specifically within the 'checkEmail' endpoint. The vulnerability allows remote exploitation by injecting malicious SQL queries through the 'val' parameter, which are then executed without proper validation or sanitization. This flaw could lead to unauthorized database access, data manipulation, and exposure of sensitive information.
Impact
Exploitation of this vulnerability allows attackers to execute arbitrary SQL commands, potentially leading to unauthorized access to the database, manipulation or deletion of data, and exposure of sensitive information. Additionally, according to the GitHub issue, this vulnerability could be exploited to gain full control over the system and disrupt services.
Reproduction
The vulnerability can be reproduced by sending a request to the 'checkEmail' endpoint with a crafted 'val' parameter that includes SQL injection payloads. This can be done using tools like sqlmap, which automates the process of finding and exploiting SQL injection vulnerabilities. The injection can be error-based or time-based blind, depending on the payload used.
Remediation
To address this vulnerability, it is recommended to use prepared statements and parameter binding to prevent SQL injection. Input validation and filtering should be implemented to ensure user input conforms to expected formats. Additionally, database user permissions should be minimized, and regular security audits conducted to identify and fix potential 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.
