BOOK THIS SPACE FOR AD
ARTICLE AD
## https://sploitus.com/exploit?id=AFF2402E-57B2-57D9-A94F-8E088095B4BB
# CVE-2022-40471
Remote code execution via unrestricted file upload vulnerability in the Clinic's Patient Management System v 1.0
![image](https://static.wixstatic.com/media/cf57b8_8928645050c94227991adee114f384e0~mv2.png/v1/fill/w_740,h_383,al_c,q_85,usm_0.66_1.00_0.01,enc_auto/cf57b8_8928645050c94227991adee114f384e0~mv2.png)
# Technical description:
Remote Code Execution in Clinic's Patient Management System v 1.0 allows Attacker to Upload arbitrary php webshell via profile picture upload functionality in users.php
Affected components -
Source Code,
Vulnerable Page - users.php
# CVE-2022-40471.py usage -
```sh
# Upload a simple webshell to the target machine -
python3 CVE-2022-40471.py <target_ip> <target_port> <target_uri> <username> <password>
```
## Example -
```sh
python CVE-2022-40471.py 127.0.0.1 80 /pms/ UserName Password
```
# Proof of concept (Poc) -
![Screenshot 2022-10-13 053055](https://user-images.githubusercontent.com/65374016/195474325-7c20861d-c64d-470c-8d03-3fb1078ee3da.png)
# References -
https://drive.google.com/file/d/1m-wTfOL5gY3huaSEM3YPSf98qIrkl-TW/view?usp=sharing
https://www.sourcecodester.com/php-clinics-patient-management-system-source-code
https://www.sourcecodester.com/sites/default/files/download/oretnom23/php-cpms.zip
# Discovered by -
RashidKhan Pathan (iHexCoder), 9 September 2022.
Twitter: @itRashid