/

CVE-2026-105386

Severity:

HIGH RISK

(7.3)

SQL Injection (CWE-89) in HospitalManagementSystem print.php

CVE-2026-105386

Deferred

Vulnerability type

Category:

SQL Injection

CWE:

CWE-74, CWE-89

Impact:

Unauthorized database access and 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 high-severity SQL injection vulnerability in the HospitalManagementSystem print.php endpoint allows remotely supplied transaction_id input to influence database queries without sufficient protection. An attacker who can reach the endpoint may be able to read, alter, or otherwise interfere with database information, depending on database permissions and application behavior.

A high-severity SQL injection vulnerability in the HospitalManagementSystem print.php endpoint allows remotely supplied transaction_id input to influence database queries without sufficient protection. An attacker who can reach the endpoint may be able to read, alter, or otherwise interfere with database information, depending on database permissions and application behavior.

Affected context

The issue occurs in the get functionality of print.php when the transaction_id request argument is incorporated into a database query without adequate separation between data and SQL instructions. It is relevant to deployments using affected HospitalManagementSystem code and exposing this endpoint over a reachable network interface.

The issue occurs in the get functionality of print.php when the transaction_id request argument is incorporated into a database query without adequate separation between data and SQL instructions. It is relevant to deployments using affected HospitalManagementSystem code and exposing this endpoint over a reachable network interface.

Exploit preconditions

  • Attack surface: The remotely accessible print.php endpoint
  • Required access: Network reachability to the application; authentication requirements depend on deployment configuration
  • Trigger point: Processing of the transaction_id argument by the get function
  • Why exploitation is possible: Input may reach database query construction without reliable parameter binding or equivalent query-structure controls
  • Attack surface: The remotely accessible print.php endpoint
  • Required access: Network reachability to the application; authentication requirements depend on deployment configuration
  • Trigger point: Processing of the transaction_id argument by the get function
  • Why exploitation is possible: Input may reach database query construction without reliable parameter binding or equivalent query-structure controls

Why this happens

The underlying bug is improper handling of externally controlled input in a database query. When application code combines transaction_id data with SQL syntax instead of treating it strictly as a bound value, the input can alter the intended query structure. This maps primarily to CWE-89, SQL Injection; CWE-74 is also relevant as a broader injection category covering the interpretation of attacker-controlled input by an underlying language or interpreter.

The underlying bug is improper handling of externally controlled input in a database query. When application code combines transaction_id data with SQL syntax instead of treating it strictly as a bound value, the input can alter the intended query structure. This maps primarily to CWE-89, SQL Injection; CWE-74 is also relevant as a broader injection category covering the interpretation of attacker-controlled input by an underlying language or interpreter.

Potential impact

  • An attacker may read sensitive records accessible to the application
  • An attacker could modify or delete database information, subject to database privileges
  • The vulnerability may enable unauthorized access to hospital management data
  • Database availability could be affected through resource-intensive or disruptive queries
  • Compromised data could undermine reporting, transaction records, or operational workflows
  • An attacker may read sensitive records accessible to the application
  • An attacker could modify or delete database information, subject to database privileges
  • The vulnerability may enable unauthorized access to hospital management data
  • Database availability could be affected through resource-intensive or disruptive queries
  • Compromised data could undermine reporting, transaction records, or operational workflows

General mitigation guidance

Mitigation generally centers on removing SQL construction from untrusted input

paths and reducing the trust placed in request parameters.

Common defensive patterns include:

  • Use parameterized queries or prepared statements for every database operation
  • Apply allowlisted input validation and type enforcement appropriate to transaction identifiers
  • Avoid dynamically concatenating request values into SQL fragments
  • Use database accounts with only the permissions required by the endpoint
  • Centralize data-access functions so safe query patterns are consistent
  • Return generic database errors and avoid exposing query details to clients
  • Restrict unnecessary network exposure of administrative or reporting endpoints

Mitigation generally centers on removing SQL construction from untrusted input

paths and reducing the trust placed in request parameters.

Common defensive patterns include:

  • Use parameterized queries or prepared statements for every database operation
  • Apply allowlisted input validation and type enforcement appropriate to transaction identifiers
  • Avoid dynamically concatenating request values into SQL fragments
  • Use database accounts with only the permissions required by the endpoint
  • Centralize data-access functions so safe query patterns are consistent
  • Return generic database errors and avoid exposing query details to clients
  • Restrict unnecessary network exposure of administrative or reporting endpoints

How teams detect issues like this

Detection can include:

  • Static analysis rules that flag string concatenation or interpolation in SQL construction
  • Code review checks for request parameters passed directly to database APIs
  • Runtime monitoring for anomalous query errors, unexpected query structure, or unusual transaction_id values
  • Web application firewall or gateway policies for common injection indicators, used as defense in depth rather than as the sole control
  • Database activity monitoring for unexpected reads, writes, privilege use, or query volume
  • Automated security testing that verifies parameter binding and input validation across endpoint handlers

Detection can include:

  • Static analysis rules that flag string concatenation or interpolation in SQL construction
  • Code review checks for request parameters passed directly to database APIs
  • Runtime monitoring for anomalous query errors, unexpected query structure, or unusual transaction_id values
  • Web application firewall or gateway policies for common injection indicators, used as defense in depth rather than as the sole control
  • Database activity monitoring for unexpected reads, writes, privilege use, or query volume
  • Automated security testing that verifies parameter binding and input validation across endpoint handlers

Sources

SourceLink
github.comgithub.com/onetwothreeneth/HospitalManagementSystem/
github.comgithub.com/onetwothreeneth/HospitalManagementSystem/issues/11
vuldb.comvuldb.com/cve/CVE-2026-105386
vuldb.comvuldb.com/submit/984330
vuldb.comvuldb.com/vuln/413580
vuldb.comvuldb.com/vuln/413580/cti

Frequently asked

questions

The issue is described as remotely triggerable because the vulnerable input is

processed through a network-reachable web endpoint. Practical exploitability

still depends on routing, authentication, and other deployment controls.

An attacker generally needs network access to print.php. Whether authentication

or a particular application role is required depends on how the endpoint is

exposed and protected.

The preferred pattern is parameterized database access combined with strict,

context-appropriate validation of transaction_id. Database permissions should

also be limited to the operations the endpoint genuinely needs.

Use centralized safe data-access abstractions, review all request-to-query data

flows, test endpoints for injection resistance, and monitor database activity

for anomalous behavior.

The issue is described as remotely triggerable because the vulnerable input is

processed through a network-reachable web endpoint. Practical exploitability

still depends on routing, authentication, and other deployment controls.

An attacker generally needs network access to print.php. Whether authentication

or a particular application role is required depends on how the endpoint is

exposed and protected.

The preferred pattern is parameterized database access combined with strict,

context-appropriate validation of transaction_id. Database permissions should

also be limited to the operations the endpoint genuinely needs.

Use centralized safe data-access abstractions, review all request-to-query data

flows, test endpoints for injection resistance, and monitor database activity

for anomalous behavior.

Find out what's already
exploitable in your codebase.