SQL Injection Vulnerability in Appointment Check-In Endpoint —
The appointment check-in endpoint concatenates the appointmentID GET parameter directly into a SQL query without sanitisation, allowing Boolean-based and error-based SQL injection against a MySQL backend. An attacker could enumerate databases, extract patient records, and modify or delete appointment data.
Published on medium.com
During security testing of the Patient Queue Management System (PQMS), a SQL Injection vulnerability was identified in the appointment check-in endpoint. The issue exists in the appointmentID parameter of the apipatientcheckin.php API and allows malicious input to interfere with backend database queries.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
User input is directly concatenated into a SQL statement without prepared statements or parameter binding.
Impact
An attacker could enumerate databases, extract sensitive patient records, bypass business logic, and modify or delete appointment data; if the endpoint is internet-facing the risk is considered high.
What the attacker needed
Network access to the endpoint; no authentication required (if endpoint is public)
The fix
The application should use prepared statements with parameter binding and validate the appointment ID format.
How it was found
- Send a request to the check-in endpoint with a normal appointmentID value.
- Append a Boolean condition that is always true and observe the response.
- Append a Boolean condition that is always false and observe a different response.
- Use an automated tool with the captured request to confirm injection and fingerprint the database.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
The web page takes a value from the URL and drops it straight into a database command. Because it is not separated from the command, a user can add extra database instructions. This lets someone read or change data they should not see.
What is SQL injection?
Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.