remoteclinic / RemoteClinic

Open Source Clinic Management System
https://remoteclinic.io
Other
79 stars 53 forks source link

Stored XSS vulnerability in /medicines #14

Open Saud-Ahmad opened 3 years ago

Saud-Ahmad commented 3 years ago

Stored XSS vulnerability in Version 2.0 which allows remote attacker to inject arbitrary script or html. This being stored, will impact all users who have permissions to view the vulnerable page.

Vulnerable Endpoint: http://localhost/RemoteClinic/medicines Step to Reproduce:

1) Login in Application as Doctor. 2) When you scroll down the main dashboard page, there is medicines options, Click "New Medicine".

1

3) Here is a "Medicine Name" Field which is vulnerable to XSS. Inject XSS Payload: Capture1

2

4) You can see there is client side validation on Medicine Name with maxlength is 30 but not validate on server side.

3

5) Change maxlength to 100.

4

6) Now Click on Register.

5

7) XSS Executed on medicines/new.php

6

8) Now go to /medicines, Click on Show All.

8

9) XSS Executed on /medicines.

7

Saud-Ahmad commented 3 years ago

CVE-ID assigned for above vulnerability https://nvd.nist.gov/vuln/detail/CVE-2021-31327 https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-31327

Saud-Ahmad commented 3 years ago

Exploit has been Published by Exploit-DB https://www.exploit-db.com/exploits/49795