CVE-2026-71237: Miantang IoT-PHP: Unauthenticated SQL Injection in /userlogin
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: mysqlquery("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.
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2026-71237?
CVE-2026-71237 has a critical severity rating of 9.8.
How do I fix CVE-2026-71237?
To fix CVE-2026-71237, ensure proper sanitization of user inputs in the SQL query by using prepared statements or parameterized queries.
What type of vulnerability is CVE-2026-71237?
CVE-2026-71237 is an unauthenticated SQL Injection vulnerability.
What could be the impact of exploiting CVE-2026-71237?
Exploiting CVE-2026-71237 could allow attackers to access sensitive user data stored in the database.
Who is affected by CVE-2026-71237?
Any system using Miantang IoT-PHP that implements the vulnerable /userlogin route is affected by CVE-2026-71237.