/

CVE-2026-11501

Severity:

HIGH RISK

(7.3)

SQL Injection (CWE-89) in Hospital Patient Records App

CVE-2026-11501

Deferred

Vulnerability type

Category:

SQL Injection

CWE:

CWE-74, CWE-89

Impact:

Data Exfiltration and Integrity Compromise

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 SourceCodester Hospitals Patient Records Management System 1.0 allows attackers to manipulate database queries via the ID parameter in /classes/Master.php?f=save_patient.

When reachable over the network, this flaw can enable remote attackers to read, modify, or delete patient records and other backend data by injecting crafted SQL into the vulnerable parameter.

Affected context

The vulnerability occurs in the patient management workflow exposed by /classes/Master.php?f=save_patient, where the ID argument is processed as part of database operations.

It is relevant in deployments where the application is accessible over a network and user-controlled ID values are incorporated into SQL statements without robust input handling or query parameterization.

Typical at-risk contexts include internet-facing or intranet hospital systems where authentication or input validation may be insufficient to prevent crafted requests.

Exploit preconditions

  • Attack surface: HTTP endpoint /classes/Master.php?f=save_patient exposed via the web server.
  • Required access: Network access to the application; depending on deployment, this may or may not require authentication.
  • Trigger point: Submission of a request where the ID parameter contains crafted SQL payloads that are concatenated into a query.
  • Why exploitation is possible: The server-side code appears to embed the ID value directly into SQL statements without using prepared statements or rigorous sanitization, allowing injected SQL to be executed by the database engine.

Why this happens

The core issue aligns with CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection').

Application logic likely constructs SQL statements by concatenating the ID parameter into query strings, treating external input as trusted and failing to neutralize SQL meta-characters or use parameterized queries.

Additionally, aspects of CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component are present, because untrusted data is passed into the downstream SQL interpreter without adequate normalization or context-aware escaping.

This insecure pattern allows attacker-controlled input to alter the structure and semantics of database commands.

Potential impact

  • Attackers may extract sensitive patient records and other confidential medical data.
  • Attackers could modify or delete records, impacting data integrity and clinical workflows.
  • Attackers can potentially create or escalate user accounts, altering authorization states.
  • Attackers may leverage SQL injection to execute database-level functions or pivot to other parts of the infrastructure, depending on DB configuration and privileges.

General mitigation guidance

Effective mitigation centers on removing direct string concatenation between user input and SQL and enforcing strict trust boundaries for database operations.

Recommended defensive patterns include:

  • Using parameterized queries or prepared statements for all database interactions involving user-controlled values, especially ID parameters.
  • Applying strict server-side validation of identifiers and numeric fields (e.g., accepting only expected formats and ranges) before they reach the data access layer.
  • Centralizing data access logic in a repository or ORM layer that enforces safe query construction by default.
  • Limiting database permissions for the application account to only the operations and tables required, reducing blast radius if a query is subverted.
  • Implementing contextual output encoding or escaping at the database boundary when parameterization is not possible, while treating this as a fallback rather than a primary control.

How teams detect issues like this

Detection often relies on a combination of code-level analysis and runtime observation:

  • Static analysis: Configure SAST rules to flag dynamic SQL construction patterns (string concatenation, interpolation) involving request parameters like $_GET['ID'], $_POST['ID'], or equivalent framework inputs.
  • Code review signals: During manual review, look for inline SQL in controller or handler code, lack of prepared statements, and direct use of request variables in query strings.
  • Policy enforcement: Enforce secure coding guidelines that require prepared statements and prohibit raw concatenation in database access code, with automated checks in CI.
  • Runtime monitoring: Use web application firewalls (WAF) or RASP solutions configured with SQL injection signatures and anomaly detection on endpoints such as /classes/Master.php, correlating alerts with unusual database query patterns.

Sources

SourceLink
github.comgithub.com/showmesvg/horized/issues/1
vuldb.comvuldb.com/cve/CVE-2026-11501
vuldb.comvuldb.com/submit/835506
vuldb.comvuldb.com/vuln/369121
vuldb.comvuldb.com/vuln/369121/cti
sourcecodester.comsourcecodester.com/

Frequently asked

questions

Yes. The vulnerable endpoint is accessed over HTTP, so any attacker with network access to the application can attempt to exploit the SQL injection, subject to whatever authentication the deployment enforces.

Not necessarily. Exploitability depends on how the hospital system is configured. If the affected endpoint is reachable without authentication or with easily obtainable credentials, attackers can launch attacks remotely. If it is strictly behind authentication and network controls, the risk is more constrained but still present for insider or compromised-account scenarios.

The safest approach is to refactor the affected code to use parameterized queries or prepared statements for all database interactions involving the ID parameter and other user inputs, combined with strict server-side validation of expected types and ranges.

Adopt a secure data access layer that enforces parameterized queries by design, establish coding standards that forbid direct concatenation of user input into SQL, and integrate static analysis plus security-focused code review into the development lifecycle to catch injection patterns early.

Find out what's already
exploitable in your codebase.