/

CVE-2026-85397

Severity:

HIGH RISK

(7.3)

SQL Injection (CWE-89) in Hospital Information System

CVE-2026-85397

Deferred

Vulnerability type

Category:

SQL Injection

CWE:

CWE-74, CWE-89

Impact:

Database confidentiality, integrity, and availability

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 Hospital Information System allows attacker-controlled search input to influence database queries through the findBySearch function in addReq.php.

Because the affected functionality may be reachable remotely, an attacker could potentially retrieve, modify, or interfere with application data when input is not safely handled.

Affected context

The vulnerability occurs in Hospital Information System 1.0 where the findBySearch function processes the Search argument in addReq.php. Risk exists when this argument reaches database query construction without reliable parameterization or equivalent query separation, particularly when the endpoint is exposed to remote users.

Exploit preconditions

  • Attack surface: The remotely reachable search functionality associated with addReq.php
  • Required access: Access to submit requests containing a search value; authentication requirements depend on the deployment
  • Trigger point: Processing of the Search argument by the findBySearch function
  • Why exploitation is possible: Input may be incorporated into a database statement as query syntax rather than being treated strictly as data

Why this happens

The underlying bug is an injection flaw in which externally controlled search input is allowed to affect the structure or behavior of a SQL query. This pattern 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 design occurs when application data and database commands are combined without a trusted query interface that keeps them separate.

Potential impact

  • An attacker may read data beyond the intended search results.
  • An attacker could modify or delete database records if the database account permits those operations.
  • Application functionality may be disrupted through database resource exhaustion or destructive queries.
  • Sensitive patient, administrative, or operational information could be exposed.
  • The application could become a stepping stone for further compromise if database permissions are excessive.

General mitigation guidance

Mitigation generally focuses on ensuring that user-supplied search values cannot alter SQL statement structure.

Common defensive patterns include:

  • Use parameterized queries or prepared statements for all database operations.
  • Apply a narrowly defined data-access layer that separates query code from values.
  • Validate search inputs against the expected type, length, and character constraints without treating validation as a replacement for parameterization.
  • Use database accounts with only the permissions required by the application.
  • Avoid dynamically constructed SQL where a fixed query or safe query-builder abstraction is sufficient.
  • Return generic database errors to users while recording useful security telemetry internally.

How teams detect issues like this

Organizations can identify similar issues through:

  • Static analysis rules that flag string concatenation, interpolation, or formatting used to build SQL statements.
  • Code review checks for request parameters flowing into database APIs without parameter binding.
  • Dynamic testing of search endpoints using benign special-character and boundary inputs to identify unexpected query behavior.
  • Web-application firewall or database monitoring policies that detect anomalous query patterns, while treating these controls as supplementary.
  • Automated security review tools that trace user-controlled data into SQL execution sinks.

Sources

SourceLink
code-projects.orgcode-projects.org/
github.comgithub.com/lccc-t/CVE/issues/2
vuldb.comvuldb.com/cve/CVE-2026-85397
vuldb.comvuldb.com/submit/894858
vuldb.comvuldb.com/vuln/398540
vuldb.comvuldb.com/vuln/398540/cti

Frequently asked

questions

Yes, the affected search functionality is described as remotely reachable. The practical scope depends on network exposure, authentication, and authorization controls.

Not necessarily. The description establishes remote reachability but does not specify whether the endpoint requires authentication, so deployment-specific access controls must be assessed.

Use parameterized queries or prepared statements so the Search value is always handled as data rather than executable SQL syntax.

Combine parameterized database access with least-privilege database accounts, focused input validation, code review, static analysis, and testing of all request parameters that reach query execution.

Find out what's already
exploitable in your codebase.