CodePanda Source Canteen Management System SQL Injection Vulnerability in Login API

Vulnerability

A SQL injection vulnerability exists in CodePanda Source Canteen Management System version 1.0, specifically within the '/api/login.php' file. The issue arises because the 'username' parameter can be manipulated to inject malicious SQL queries. This exploitation occurs remotely and without authentication, allowing attackers to access and manipulate the database, potentially leading to unauthorized data access, data modification, and disruption of services.

Impact

Exploitation of this vulnerability allows for unauthorized SQL query manipulation, database access, and could lead to unauthorized data access, data modification, and service disruption.

Reproduction

To reproduce this vulnerability, send a POST request to '/api/login.php' with the 'username' parameter. Inject a payload that exploits the SQL injection vulnerability, such as one that uses a time-based blind SQL injection technique, like adding a SQL injection payload that includes a time delay command, such as 'SLEEP(5)'. This demonstrates the injection's effectiveness by causing a delay in the response, 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 that user input meets expected formats, blocking malicious data. Finally, database user permissions should be minimized, ensuring that the account used for database connections has only the necessary privileges.

Added: Apr 27, 2026, 1:19 AM
Updated: Apr 27, 2026, 1:19 AM

Vulnerability Rating

Custom Algorithm
spread
0.0
impact
3.1
exploitability
6.0
remediation
0.0
relevance
6.8
threat
6.4
urgency
2.9
incentive
0.0

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.