Skip to main content
COSMICBYTEZLABS
NewsSecurityHOWTOsToolsStudyTraining
ProjectsChecklistsAI RankingsNewsletterStatusTagsAbout
Subscribe

Press Enter to search or Esc to close

News
Security
HOWTOs
Tools
Study
Training
Projects
Checklists
AI Rankings
Newsletter
Status
Tags
About
RSS Feed
Reading List
Subscribe

Stay in the Loop

Get the latest security alerts, tutorials, and tech insights delivered to your inbox.

Subscribe NowFree forever. No spam.
COSMICBYTEZLABS

Your trusted source for IT intelligence, cybersecurity insights, and hands-on technical guides.

1154+ Articles
126+ Guides

CONTENT

  • Latest News
  • Security Alerts
  • HOWTOs
  • Projects
  • Exam Prep

RESOURCES

  • Search
  • Browse Tags
  • Newsletter Archive
  • Reading List
  • RSS Feed

COMPANY

  • About Us
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CosmicBytez Labs. All rights reserved.

System Status: Operational
  1. Home
  2. Security
  3. CVE-2026-8785: SQL Injection in Hospital Management System via appointment_no
CVE-2026-8785: SQL Injection in Hospital Management System via appointment_no
SECURITYHIGHCVE-2026-8785

CVE-2026-8785: SQL Injection in Hospital Management System via appointment_no

A high-severity SQL injection vulnerability (CVE-2026-8785, CVSS 7.3) has been disclosed in projectworlds Hospital Management System in PHP 1.0, allowing...

Dylan H.

Security Team

May 18, 2026
5 min read

Affected Products

  • projectworlds Hospital Management System in PHP 1.0

CVE-2026-8785: SQL Injection in Hospital Management System Patient Detail Function

A SQL injection vulnerability assigned CVE-2026-8785 has been disclosed in projectworlds Hospital Management System in PHP 1.0, a widely used open-source PHP application for managing patient appointments, records, and hospital operations. The vulnerability exists in the getAllPatientDetail function within update_info.php and can be exploited remotely via a manipulated appointment_no GET parameter.

The flaw carries a CVSS v3.1 score of 7.3 (High) and is classified under CWE-89 — Improper Neutralization of Special Elements used in SQL Commands (SQL Injection).


Vulnerability Overview

AttributeValue
CVE IDCVE-2026-8785
CVSS Score7.3 (High)
CWE ClassificationCWE-89 — SQL Injection
Affected Softwareprojectworlds Hospital Management System in PHP 1.0
Vulnerable Fileupdate_info.php
Vulnerable FunctiongetAllPatientDetail
Vulnerable Parameterappointment_no (GET)
Attack VectorNetwork (Remote)
Authentication RequiredLow
Exploit PublishedYes — public exploit available
Patch AvailableNone confirmed

Technical Details

Affected Component

The vulnerability resides in the GET Parameter Handler of update_info.php. When a request is made to retrieve patient appointment details, the application passes the appointment_no GET parameter directly into a SQL query executed by the getAllPatientDetail function without proper sanitization or use of parameterized queries.

Exploitation Mechanism

An attacker can craft a malicious GET request to inject SQL syntax into the appointment_no parameter:

GET /update_info.php?appointment_no=1%27%20UNION%20SELECT%20NULL%2Ctable_name%2CNULL%20FROM%20information_schema.tables--

Successful exploitation enables:

  • Patient record enumeration — extracting all patient names, IDs, contact details, and appointment histories
  • Database schema mapping — listing all tables, columns, and relationships
  • Credential harvesting — dumping hashed admin and staff passwords from the database
  • Medical record exfiltration — accessing diagnosis notes, treatment records, and prescription data
  • Second-order SQL injection — injecting persistent payloads that trigger on subsequent database reads

Attack Flow

1. Attacker discovers a publicly accessible Hospital Management System instance

2. Attacker crafts a malicious GET request to update_info.php with a SQL payload
   in the appointment_no parameter

3. The getAllPatientDetail() function executes the injected SQL against
   the backend MySQL/MariaDB database without sanitization

4. Attacker extracts patient PII, medical records, and administrator credentials

5. With admin credentials obtained, attacker gains full control of the
   hospital management system

6. Attacker may tamper with appointment records, medication data, or use
   access as a pivot into connected hospital systems

Impact Assessment

Impact AreaDescription
Patient PII ExposureNames, addresses, phone numbers, appointment records accessible
Medical Record TheftDiagnosis, treatment, and prescription data at risk
Credential CompromiseAdmin and staff passwords extractable from the database
HIPAA / PIPEDA ExposureHealthcare data breach triggers mandatory notification obligations
System IntegrityInjected payloads can modify or delete appointment records
Exploit AvailabilityPublic exploit code lowers the barrier for mass exploitation

Why Healthcare Systems Are High-Value Targets

Hospital management systems contain some of the most sensitive data categories recognized under privacy law:

  • Protected Health Information (PHI) — diagnoses, medications, treatment plans
  • Personally Identifiable Information (PII) — government IDs, insurance numbers, contact details
  • Financial data — billing records, insurance claim details, payment history
  • Staff credentials — login accounts with access to clinical systems

A successful SQL injection against a hospital management platform does not merely expose a database — it can enable regulatory violations under HIPAA (US), PIPEDA (Canada), and GDPR (EU), each of which mandate breach notification and carry substantial financial penalties.


Remediation

No official patch has been released by projectworlds. Administrators running this software should take immediate action:

Access Restriction

  1. Block public internet access to update_info.php and all patient-facing PHP endpoints
  2. Require VPN or IP allowlisting for any access to the hospital management system
  3. Disable directory listing on the web server to prevent file enumeration

Code-Level Fix

Replace direct parameter concatenation with prepared statements:

// Vulnerable pattern
$query = "SELECT * FROM appointments WHERE appointment_no = '" . $_GET['appointment_no'] . "'";
$result = mysqli_query($conn, $query);
 
// Secure pattern
$stmt = $conn->prepare("SELECT * FROM appointments WHERE appointment_no = ?");
$stmt->bind_param("s", $_GET['appointment_no']);
$stmt->execute();
$result = $stmt->get_result();

Detection

Scan web server access logs for SQL injection patterns targeting update_info.php:

grep "update_info.php" /var/log/apache2/access.log | \
  grep -iE "union|select|insert|drop|--|'|%27|%20"

Key Takeaways

  1. CVE-2026-8785 is a CVSS 7.3 SQL injection in projectworlds Hospital Management System in PHP 1.0, affecting update_info.php
  2. The appointment_no GET parameter is passed unsanitized into the getAllPatientDetail() function, enabling remote data extraction
  3. Healthcare systems are high-value targets due to the regulatory sensitivity of PHI and PII they contain
  4. No official patch is available — restrict admin panel access and apply parameterized queries if maintaining a deployment
  5. Public exploit code is available, significantly lowering the exploitation barrier for opportunistic attackers

Sources

  • CVE-2026-8785 — NIST NVD
  • CWE-89 — SQL Injection — MITRE
  • HIPAA Breach Notification Rule — HHS

Related Reading

  • CVE-2026-3740: SQL Injection in University Management System
  • CVE-2026-3730: SQL Injection in Free Hotel Reservation System
#CVE-2026-8785#SQL Injection#Healthcare#PHP#CWE-89#Vulnerability#Web Security

Related Articles

CVE-2026-7224: SQL Injection in Pizzafy Ecommerce System 1.0

A high-severity SQL injection vulnerability has been discovered in SourceCodester Pizzafy Ecommerce System 1.0, allowing remote attackers to manipulate...

5 min read

CVE-2026-7077: SQL Injection in itsourcecode Courier Management System

A remotely exploitable SQL injection vulnerability has been disclosed in itsourcecode Courier Management System 1.0, affecting the edit_parcel.php file...

5 min read

CVE-2026-6595: SQL Injection in ProjectsAndPrograms School Management System

A medium-severity SQL injection vulnerability has been disclosed in ProjectsAndPrograms School Management System, allowing remote attackers to manipulate...

4 min read
Back to all Security Alerts