CVE-2020-29168: Online Doctor Appointment Booking System PHP and Mysql 1.0 – ‘q’ SQL Injection

Updated March 23, 2024

An SQL injection vulnerability was discovered in PHP Doctor Appointment System by me on 11/16/2020.

In ‘getuser.php’ file, GET parameter ‘q’ is vulnerable.

The vulnerability could allow for the improper neutralization of special elements in SQL commands and may lead to the product being vulnerable to SQL injection.

Vulnerable code: 

include_once 'assets/conn/dbconnect.php';
$q = $_GET['q']; // Vulnerable param
// echo $q;
$res = mysqli_query($con,"SELECT * FROM doctorschedule WHERE scheduleDate='$q'"); // Injection point

Used Payload:


Output: Extracted database: qbqvqdb_healthcareqvbxq

Published November 29, 2020
Category: Blog, CVEs, Exploits