Vulnerabilidad · Publicado 05/08/2026
La aplicación Miantang/IoT-PHP contiene una vulnerabilidad de inyección SQL en la ruta POST /userlogin debido a que no sanitiza el parámetro de contraseña antes de concatenarlo en una consulta SQL raw. Un atacante puede eludir la autenticación ingresando caracteres especiales en el campo de contraseña. Esta vulnerabilidad afecta sistemas IoT y aplicaciones embebidas en infraestructuras críticas de LATAM, permitiendo acceso no autorizado a datos sensibles y control del dispositivo.
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.
Score: 9.8/10 — Severidad: CRITICAL — Estado NIST: Received
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CWE-89
Publicado en NIST NVD.