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.
Published: 2026-08-05
Score: 9.8 Critical
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

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.

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

Remediation

No vendor fix or workaround currently provided.

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 yet.

References
History

Mon, 10 Aug 2026 12:00:00 +0000

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.

Mon, 10 Aug 2026 11:30:00 +0000

Type Values Removed Values Added
Title Miantang IoT-PHP: Unauthenticated SQL Injection in /userlogin Miantang IoT-PHP - Unauthenticated SQL Injection in /userlogin

Fri, 07 Aug 2026 11:45:00 +0000

Type Values Removed Values Added
First Time appeared Miantang
Miantang iot-php
Vendors & Products Miantang
Miantang iot-php

Wed, 05 Aug 2026 13:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

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


Wed, 05 Aug 2026 11:15:00 +0000

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'}


Subscriptions

Miantang Iot-php
cve-icon MITRE

Status: PUBLISHED

Assigner: TuranSec

Published:

Updated: 2026-08-10T11:45:40.322Z

Reserved: 2026-08-05T10:53:53.175Z

Link: CVE-2026-71237

cve-icon Vulnrichment

Updated: 2026-08-05T12:47:40.506Z

cve-icon NVD

Status : Received

Published: 2026-08-05T11:16:26.503

Modified: 2026-08-10T12:17:26.197

Link: CVE-2026-71237

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-10T22:30:06Z

Weaknesses
  • CWE-89

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