Skip to content

ANKIT48274/HMS-Security-Report

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

23 Commits
Β 
Β 
Β 
Β 

Repository files navigation

Hospital Management System (HMS) – Critical Security Vulnerabilities Identified

Researcher: Ankit Patidar Role: Ethical Security Researcher


🚨 Overview

During a security assessment of the open-source Hospital Management System (HMS) project by PHPGurukul, multiple critical-level vulnerabilities were discovered. These vulnerabilities allow:

  • Full database extraction
  • Complete admin login bypass
  • Reflected XSS execution
  • Exposure of sensitive data

All findings have been responsibly disclosed to the vendor.


πŸ”₯ 1. SQL Injection (Critical – Full Database Extraction)

Vulnerable File:

/hospital/hms/admin/index.php

Vulnerable Parameter:

POST β†’ username

Using SQLMap, full database extraction was possible.

βœ” Extracted Database Info:

Database: hms
Table: admin
username: admin
password_hash: e10adc3949ba59abbe56e057f20f883e
cracked password: 123456

βœ” SQLMap Proof:

  • Boolean-based blind
  • Error-based
  • Time-based blind
  • UNION query tests All confirmed injectable.

πŸ”“ 2. Authentication Bypass (Admin Login Bypass)

The login system does NOT properly sanitize input.

Working Payload:

admin' OR '1'='1' -- 

This payload bypasses authentication and gives full admin dashboard access.


🧨 3. Reflected XSS Vulnerability

Multiple input fields directly reflect user input without sanitization.

Trigger Payload:

"><script>alert(1)</script>

This opens a JavaScript alert box and can be used for:

  • Session Hijacking
  • Cookie Theft
  • Admin Takeover

πŸ“Έ Screenshots & Evidence

All PoCs include:

  • SQLMap terminal logs
  • Dashboard access after bypass
  • XSS popup execution
  • Raw vulnerable queries shown by server

(Screenshots attached separately in repo β€” you can upload your images folder here)


πŸ›‘ Recommended Fixes

βœ” SQL Injection Fix

  • Use prepared statements / parameterized queries
  • Avoid directly concatenating user input

βœ” XSS Fix

  • Escape output using htmlspecialchars()
  • Add server-side validation
  • Implement Content Security Policy (CSP)

βœ” Authentication Fix

  • Strict input validation
  • Remove inline SQL
  • Implement secure login validations

🀝 Responsible Disclosure

These findings were reported in good faith to PHPGurukul via email:

πŸ“§ info@phpgurukul.com

Awaiting their acknowledgment and patch updates.


πŸ™‹β€β™‚οΈ Author

Ankit Patidar

Ethical Security Researcher

Bug Bounty & Penetration Testing Enthusiast

About

Responsible Disclosure Report for vulnerabilities found in PHPGurukul HMS Project

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published