/

CVE-2026-85398

Severity:

HIGH RISK

(7.3)

SQL Injection (CWE-89) in Hospital Information System

CVE-2026-85398

Deferred

Vulnerability type

Category:

SQL Injection

CWE:

CWE-74, CWE-89

Impact:

Database compromise and unauthorized data access

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 viewReq function of code-projects Hospital Information System 1.0 allows attacker-controlled input in the ID argument to influence database queries. Because the affected functionality is remotely reachable, an unauthenticated or otherwise authorized attacker may be able to access, alter, or interfere with database-backed application data, depending on deployment controls.

Affected context

The vulnerability occurs in the Hospital Information System 1.0 request-viewing functionality, specifically the viewReq.php file and its ID parameter. Risk is present when externally supplied identifiers are incorporated into SQL statements without effective parameterization or equivalent query-safety controls.

Exploit preconditions

  • Attack surface: Remotely accessible web functionality associated with viewReq.php
  • Required access: Access sufficient to reach the request-viewing endpoint; authentication requirements depend on the deployment
  • Trigger point: Processing of the ID argument
  • Why exploitation is possible: The argument may influence a database query without being safely separated from SQL syntax

Why this happens

The underlying bug is an injection flaw in which untrusted request data is combined with a database query in a way that permits the data to alter query structure or behavior. This maps primarily to CWE-89: Improper Neutralization of Special Elements used in an SQL Command (SQL Injection). The broader CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component category describes the general failure to preserve the intended boundary between data and an interpreted command language.

Potential impact

  • An attacker may read sensitive records from the application database
  • An attacker could modify or delete database-backed information
  • The application may expose confidential patient or administrative data
  • Database availability could be affected
  • Compromised data may undermine operational integrity and audit reliability

General mitigation guidance

Mitigation generally centers on ensuring that user-controlled values cannot become SQL syntax.

Common defensive patterns include:

  • Use parameterized queries or prepared statements for all database operations
  • Apply allowlist validation for identifiers that must follow a constrained format
  • Avoid constructing SQL through string concatenation or interpolation
  • Use database accounts with only the permissions required by the feature
  • Return generic database errors and avoid exposing query details to clients
  • Treat validation as a supplementary control rather than a replacement for query parameterization

How teams detect issues like this

Detection approaches may include:

  • Static analysis rules identifying SQL construction through concatenation, interpolation, or formatting
  • Code review checks for request parameters passed directly into database APIs
  • Dynamic testing of endpoint parameters using controlled injection test cases
  • Web application firewall or database monitoring policies for anomalous query patterns
  • Logging and alerting for unusual data-access volume, query errors, or unexpected database operations

Automated security review tools can help identify unsafe query-building patterns, but findings should be verified against the application's data-access layer.

Sources

SourceLink
code-projects.orgcode-projects.org/
github.comgithub.com/lccc-t/CVE/issues/3
vuldb.comvuldb.com/cve/CVE-2026-85398
vuldb.comvuldb.com/submit/894859
vuldb.comvuldb.com/vuln/398541
vuldb.comvuldb.com/vuln/398541/cti

Frequently asked

questions

Yes. The affected request-viewing functionality is described as remotely reachable, although practical exploitability depends on network exposure and any authentication or authorization controls.

The attacker must be able to reach the endpoint and provide an ID argument. Whether a valid account is required depends on how the application is deployed and protected.

Use parameterized queries or prepared statements, combined with strict validation appropriate to the expected identifier format. Do not rely on escaping alone.

Centralize safe database-access helpers, enforce least-privilege database accounts, review query construction during code review, and include injection-focused static and dynamic testing in the development lifecycle.

Find out what's already
exploitable in your codebase.