/

CVE-2026-85402

Severity:

HIGH RISK

(7.3)

SQL Injection (CWE-89) in Doctor Appointment booking.php

CVE-2026-85402

Deferred

Vulnerability type

Category:

SQL Injection

CWE:

CWE-74, CWE-89

Impact:

Unauthorized database access and data manipulation

Severity:

HIGH RISK

(7.3)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A SQL injection vulnerability in the Doctor Appointment System's patient booking endpoint may allow an attacker to influence database queries through the doc_id parameter. Because the issue is remotely reachable, an unauthenticated or otherwise authorized user may be able to manipulate backend data when input is incorporated into SQL without adequate safeguards.

Affected context

The vulnerability occurs in the patient booking workflow at /patient/booking.php when the doc_id request parameter is processed. Risk is present where externally supplied values reach database query construction without parameterization, strict validation, or an equivalent trust boundary. The publicly available exploit information may increase attention from opportunistic attackers.

Exploit preconditions

  • Attack surface: Remotely accessible patient booking functionality
  • Required access: The ability to send requests to the affected endpoint; authentication requirements depend on deployment configuration
  • Trigger point: Processing of the doc_id parameter in /patient/booking.php
  • Why exploitation is possible: Attacker-controlled input may influence SQL statement structure when it is not safely separated from query logic

Why this happens

The underlying bug is an injection flaw in which request data is treated as part of a database command rather than as a strictly bounded value. This behavior maps primarily to CWE-89: Improper Neutralization of Special Elements used in an SQL Command (SQL Injection) and is also related to CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component. The insecure pattern generally involves constructing SQL statements through string concatenation or equivalent dynamic composition with untrusted input.

Potential impact

  • An attacker may retrieve sensitive records from the application database.
  • An attacker could alter or delete appointment, patient, or provider data.
  • Database credentials or other stored secrets may be exposed.
  • The application could experience unauthorized administrative or operational changes.
  • Availability may be affected if database resources or records are disrupted.

General mitigation guidance

Mitigation generally centers on ensuring that request values cannot alter SQL syntax or query structure.

Common defensive patterns include:

  • Using parameterized queries or prepared statements for all database operations.
  • Applying allowlist validation and appropriate type constraints to identifiers such as doc_id.
  • Avoiding SQL construction through string concatenation or interpolated user input.
  • Restricting the database account to the minimum permissions required by the booking workflow.
  • Separating application, reporting, and administrative database privileges where practical.
  • Returning generic database errors to clients while recording useful diagnostic details securely.
  • Treating client-side validation as supplementary rather than as a trust boundary.

How teams detect issues like this

Detection approaches may include:

  • Static analysis rules identifying SQL statements assembled with request parameters.
  • Code review checks for direct use of query-string, form, or route values in database APIs.
  • Dynamic application testing for unexpected query behavior at booking endpoints.
  • Web application firewall or API policy rules monitoring suspicious database-oriented input patterns.
  • Database audit logging for unusual query volume, access to unrelated tables, or unexpected modification activity.
  • Automated security review tools that flag unparameterized queries and missing input constraints.

Sources

SourceLink
code-projects.orgcode-projects.org/
github.comgithub.com/lccc-t/CVE/issues/5
vuldb.comvuldb.com/cve/CVE-2026-85402
vuldb.comvuldb.com/submit/894879
vuldb.comvuldb.com/vuln/398545
vuldb.comvuldb.com/vuln/398545/cti

Frequently asked

questions

Yes. The affected booking endpoint is described as remotely reachable, although practical exploitability may depend on network exposure, authentication, and authorization controls.

Not necessarily. The key requirement is the ability to submit a request containing the affected parameter; deployment-specific access controls determine whether authentication is needed.

Use parameterized queries or prepared statements, validate doc_id according to its expected type, and ensure that database errors are not exposed to users.

Establish secure database-access guidelines, enforce parameterization through code review and static analysis, limit database privileges, and continuously test externally reachable input paths.

Find out what's already
exploitable in your codebase.