Miantang IoT-PHP - Unauthenticated SQL Injection in /userlogin
Default status is the baseline for the product, each version can override it (e.g. patched versions marked unaffected).
| Vendor | Product | Default status | Versions | ||||||
|---|---|---|---|---|---|---|---|---|---|
| Miantang | IoT-PHP | unknown |
|
No data.
No data.
| Vendor | Product | Versions | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Miantang | Iot-php |
|
No CVSS v4.0
No CVSS v3.0
No CVSS v2
This CVE is not in the KEV list.
Exploit prediction score: < 1% (0.781% probability within 30 days)
| Link | Providers |
|---|---|
| https://github.com/Miantang/IoT-PHP |
|
| Type | Values Removed | Values Added |
|---|---|---|
| Description | Miantang/IoT-PHP's index.php implements a POST /userlogin route that reads the password directly from $_POST['pwd'] with no sanitization and concatenates it into a raw SQL string: mysql_query("select * from userlists where username='$username' and password='$password' limit 1"). The username value is passed through htmlspecialchars(), which does not encode single quotes by default and therefore does not prevent SQL injection through the password field. An unauthenticated attacker can submit a payload such as pwd=' OR '1'='1 to bypass authentication and, via UNION-based injection, extract arbitrary data from the database. | Miantang/IoT-PHP's index.php implements a POST /userlogin route that reads the password directly from ['pwd'] with no sanitization and concatenates it into a raw SQL string: mysql_query("select * from userlists where username='' and password='' limit 1"). An unauthenticated attacker can submit a payload such as pwd=' OR '1'='1 to bypass authentication and, via UNION-based injection, extract arbitrary data from the database. |
| Type | Values Removed | Values Added |
|---|---|---|
| Title | Miantang IoT-PHP: Unauthenticated SQL Injection in /userlogin | Miantang IoT-PHP - Unauthenticated SQL Injection in /userlogin |
| Type | Values Removed | Values Added |
|---|---|---|
| First Time appeared |
Miantang
Miantang iot-php |
|
| Vendors & Products |
Miantang
Miantang iot-php |
| Type | Values Removed | Values Added |
|---|---|---|
| Metrics |
ssvc
|
| Type | Values Removed | Values Added |
|---|---|---|
| Description | Miantang/IoT-PHP's index.php implements a POST /userlogin route that reads the password directly from $_POST['pwd'] with no sanitization and concatenates it into a raw SQL string: mysql_query("select * from userlists where username='$username' and password='$password' limit 1"). The username value is passed through htmlspecialchars(), which does not encode single quotes by default and therefore does not prevent SQL injection through the password field. An unauthenticated attacker can submit a payload such as pwd=' OR '1'='1 to bypass authentication and, via UNION-based injection, extract arbitrary data from the database. | |
| Title | Miantang IoT-PHP: Unauthenticated SQL Injection in /userlogin | |
| Weaknesses | CWE-89 | |
| References |
| |
| Metrics |
cvssV3_1
|