/

CVE-2026-105470

Severity:

HIGH RISK

(7.3)

SQL Injection (CWE-89) in Online Appointment Booking System

CVE-2026-105470

Deferred

Vulnerability type

Category:

SQL Injection

CWE:

CWE-74, CWE-89

Impact:

Unauthorized database access or 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 Online-Appointment-Booking-System affects the doctor search endpoint, where the doctorname argument is incorporated into a database query without sufficient separation from SQL syntax. A remote, unauthenticated attacker may be able to manipulate database queries through this endpoint, depending on deployment exposure and database permissions.

A SQL injection vulnerability in the Online-Appointment-Booking-System affects the doctor search endpoint, where the doctorname argument is incorporated into a database query without sufficient separation from SQL syntax. A remote, unauthenticated attacker may be able to manipulate database queries through this endpoint, depending on deployment exposure and database permissions.

Affected context

The vulnerability occurs in the locateus.php Doctor Search Endpoint of affected Online-Appointment-Booking-System revisions. It becomes risky when the endpoint is reachable over a network and user-controlled doctor-search input is used in a mysqli_query operation without reliable parameterization or equivalent query separation.

The vulnerability occurs in the locateus.php Doctor Search Endpoint of affected Online-Appointment-Booking-System revisions. It becomes risky when the endpoint is reachable over a network and user-controlled doctor-search input is used in a mysqli_query operation without reliable parameterization or equivalent query separation.

Exploit preconditions

  • Attack surface: The remotely accessible Doctor Search Endpoint
  • Required access: Potentially no authentication if the endpoint is publicly exposed
  • Trigger point: Processing the doctorname request argument
  • Why exploitation is possible: User-controlled input can influence SQL query structure when it is concatenated into a database query rather than bound as data
  • Attack surface: The remotely accessible Doctor Search Endpoint
  • Required access: Potentially no authentication if the endpoint is publicly exposed
  • Trigger point: Processing the doctorname request argument
  • Why exploitation is possible: User-controlled input can influence SQL query structure when it is concatenated into a database query rather than bound as data

Why this happens

The underlying bug is an injection flaw caused by treating externally supplied search input as part of a SQL statement. 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 is constructing database queries from untrusted strings without using parameterized statements, safe query builders, or equivalent separation between code and data.

The underlying bug is an injection flaw caused by treating externally supplied search input as part of a SQL statement. 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 is constructing database queries from untrusted strings without using parameterized statements, safe query builders, or equivalent separation between code and data.

Potential impact

  • An attacker may retrieve data outside the intended search results
  • An attacker could alter or delete database records if the database account permits it
  • Sensitive patient, appointment, or provider information may be exposed
  • Application availability could be affected through resource-intensive or destructive queries
  • Compromised database credentials or excessive permissions could increase downstream impact
  • An attacker may retrieve data outside the intended search results
  • An attacker could alter or delete database records if the database account permits it
  • Sensitive patient, appointment, or provider information may be exposed
  • Application availability could be affected through resource-intensive or destructive queries
  • Compromised database credentials or excessive permissions could increase downstream impact

General mitigation guidance

Mitigation generally focuses on ensuring that untrusted input remains data throughout database operations.

Common defensive patterns include:

  • Use parameterized queries or prepared statements for all user-influenced database operations
  • Prefer narrowly scoped query-builder or data-access abstractions that separate values from SQL structure
  • Apply allowlist validation appropriate to the expected doctor-name format as an additional control, not as a replacement for parameterization
  • Run the application with a database account limited to the operations it requires
  • Avoid exposing detailed database errors to clients and centralize safe error handling
  • Restrict endpoint access where business requirements allow and protect sensitive records with authorization checks
  • Review legacy query construction paths consistently across the application

Mitigation generally focuses on ensuring that untrusted input remains data throughout database operations.

Common defensive patterns include:

  • Use parameterized queries or prepared statements for all user-influenced database operations
  • Prefer narrowly scoped query-builder or data-access abstractions that separate values from SQL structure
  • Apply allowlist validation appropriate to the expected doctor-name format as an additional control, not as a replacement for parameterization
  • Run the application with a database account limited to the operations it requires
  • Avoid exposing detailed database errors to clients and centralize safe error handling
  • Restrict endpoint access where business requirements allow and protect sensitive records with authorization checks
  • Review legacy query construction paths consistently across the application

How teams detect issues like this

Detection approaches commonly include:

  • Static analysis rules for string concatenation or interpolation inside mysqli_query and related database APIs
  • Code review checks for request parameters flowing into SQL execution without prepared statements
  • Dynamic application testing using benign input variations and database error monitoring
  • Web-application firewall or API policy rules that flag anomalous query-like input, while recognizing that filtering is not a primary fix
  • Database audit logs monitoring unexpected query shapes, access patterns, or operations from the application account
  • Automated security review tools in CI pipelines to identify injection-prone data flows

Detection approaches commonly include:

  • Static analysis rules for string concatenation or interpolation inside mysqli_query and related database APIs
  • Code review checks for request parameters flowing into SQL execution without prepared statements
  • Dynamic application testing using benign input variations and database error monitoring
  • Web-application firewall or API policy rules that flag anomalous query-like input, while recognizing that filtering is not a primary fix
  • Database audit logs monitoring unexpected query shapes, access patterns, or operations from the application account
  • Automated security review tools in CI pipelines to identify injection-prone data flows

Sources

SourceLink
github.comgithub.com/girishsaraf/Online-Appointment-Booking-System/
github.comgithub.com/girishsaraf/Online-Appointment-Booking-System/issues/8
vuldb.comvuldb.com/cve/CVE-2026-105470
vuldb.comvuldb.com/submit/984336
vuldb.comvuldb.com/vuln/413616
vuldb.comvuldb.com/vuln/413616/cti

Frequently asked

questions

Yes, the affected doctor search endpoint may be reachable remotely. Practical exploitability depends on whether the endpoint is exposed, whether authentication is required, and the privileges of the connected database account.

Not necessarily. If the endpoint is publicly accessible, an attacker may only need network access to it; deployment-specific authentication and authorization controls can change this requirement.

Use parameterized queries or prepared statements so the doctorname value cannot change SQL command structure. Apply input validation and least-privilege database permissions as supporting controls.

Establish secure database-access patterns, prohibit dynamic SQL construction from request data, review data flows during code review, and include static, dynamic, and database-activity checks in the development pipeline.

Yes, the affected doctor search endpoint may be reachable remotely. Practical exploitability depends on whether the endpoint is exposed, whether authentication is required, and the privileges of the connected database account.

Not necessarily. If the endpoint is publicly accessible, an attacker may only need network access to it; deployment-specific authentication and authorization controls can change this requirement.

Use parameterized queries or prepared statements so the doctorname value cannot change SQL command structure. Apply input validation and least-privilege database permissions as supporting controls.

Establish secure database-access patterns, prohibit dynamic SQL construction from request data, review data flows during code review, and include static, dynamic, and database-activity checks in the development pipeline.

Find out what's already
exploitable in your codebase.