Sourcecodester Doctor's Appointment System SQL Injection Vulnerability in Delete Appointment Admin File

Vulnerability

A critical SQL injection vulnerability has been identified in Sourcecodester Doctor's Appointment System version 1.0. The issue resides in the admin/delete-appointment.php file, specifically within the GET parameter handler. The vulnerability allows remote attackers to manipulate the 'id' parameter, injecting malicious SQL that is executed without proper validation or sanitization. This exploitation could lead to unauthorized database access, data manipulation, and exposure of sensitive information.

Impact

Exploitation of this vulnerability allows for SQL injection, enabling attackers to interfere with database queries. This could result in unauthorized data access, data modification or deletion, and potential execution of administrative operations on the database.

Reproduction

The vulnerability can be reproduced by sending a GET request to the 'admin/delete-appointment.php' file with a crafted 'id' parameter that includes malicious SQL payloads. 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 separate SQL code from user input, ensuring that injected data is not executed as part of a SQL command. Additionally, input validation and filtering should be implemented to enforce expected data formats, and database user permissions should be minimized to limit access rights.

Added: Jun 9, 2025, 7:46 PM
Updated: Jun 9, 2025, 7:46 PM

Vulnerability Rating

Custom Algorithm
spread
0.0
impact
7.5
exploitability
8.7
remediation
0.0
relevance
0.0
threat
6.4
urgency
2.9
incentive
5.8

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