CVE-2026-71237

Miantang IoT-PHP - Unauthenticated SQL Injection in /userlogin

Published Aug 5, 2026 CVSS 3.1 · 9.8 Critical EPSS < 1% KEV · Not listed
Description
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.

Analysis

AI-generated

Technical impact

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'). This represents a CWE-89 SQL Injection vulnerability. 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 Systems

Miantang:IoT-PHP – all versions containing the index.php login handler. No specific version numbers are listed in the CNA data, so all deployments with this functionality are considered vulnerable.

Risk and Exploitability

The score of 9.8 on the CVSS scale indicates critical severity, and the EPSS score of <1% indicates a low, but nonzero probability of exploitation. The lack of any KEV listing does not mitigate the high risk. An attacker can exploit the flaw from any network location that can reach the /userlogin endpoint, requiring only a basic HTTP POST. Successful exploitation grants the attacker full read access to the user database and, with UNION-based injection, arbitrary data extraction.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Replace the raw SQL query with a parameterized statement or prepared statement that properly escapes user input.
  • Hash and salt passwords stored in the database instead of storing them in plaintext.
  • Implement access controls or authentication mechanisms for the API route to limit unauthenticated access.

Generated by OpenCVE AI on August 10, 2026 at 22:21 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
References
History
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

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

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

{'score': 9.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H'}

Weaknesses
  • CWE-89

    Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')

Sources

Status
PUBLISHED
Assigner
TuranSec
Published
Updated
Aug 10, 2026, 11:45 AM
Reserved
Aug 5, 2026, 10:53 AM
Status
Deferred
Published
Aug 5, 2026, 11:16 AM
Modified
Aug 26, 2026, 5:13 PM