SourceCodester Simple E-Commerce Bookstore SQL Injection Vulnerability
Vulnerability
A SQL injection vulnerability has been identified in SourceCodester Simple E-Commerce Bookstore version 1.0. The issue arises in the 'cart.php' file, where the 'remove' parameter is not properly validated, allowing attackers to inject malicious SQL queries. This vulnerability can be exploited remotely, without any authentication, potentially leading to unauthorized database access, data manipulation, and leakage of sensitive information.
Impact
Exploitation of this vulnerability allows for SQL injection, with the potential to access, modify, or delete database information. Such actions could disrupt services and compromise system security.
Reproduction
To reproduce this vulnerability, send a request to 'cart.php' with the 'remove' parameter. Include a payload that exploits the SQL injection, such as '1' AND (SELECT 1574 FROM (SELECT(SLEEP(5)))PABB) AND 'mOLK'='mOLK'. This injection takes advantage of a time-based blind SQL injection vulnerability, where the database is manipulated to introduce a delay, indicating successful exploitation.
Remediation
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 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.
