CVE-2026-71237: CWE-89 SQL Injection in Miantang IoT-PHP
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.
AI Analysis
Technical Summary
The vulnerability exists in the POST /userlogin route of Miantang IoT-PHP's index.php, where the password from $_POST['pwd'] is used unsanitized in a raw SQL query. While the username is passed through htmlspecialchars(), it does not encode single quotes, leaving the password field vulnerable to SQL injection. An attacker can exploit this by submitting crafted payloads such as pwd=' OR '1'='1 to bypass authentication and perform UNION-based SQL injection to retrieve arbitrary data from the database.
Potential Impact
An unauthenticated attacker can bypass authentication controls, gaining unauthorized access. Additionally, the attacker can extract arbitrary data from the backend database, potentially exposing sensitive information. The vulnerability impacts confidentiality, integrity, and availability as indicated by the CVSS score of 9.8.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, avoid exposing the vulnerable endpoint or implement input validation and parameterized queries to prevent SQL injection.
CVE-2026-71237: CWE-89 SQL Injection in Miantang IoT-PHP
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.
CVSS v3.1
Score 9.8critical
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability exists in the POST /userlogin route of Miantang IoT-PHP's index.php, where the password from $_POST['pwd'] is used unsanitized in a raw SQL query. While the username is passed through htmlspecialchars(), it does not encode single quotes, leaving the password field vulnerable to SQL injection. An attacker can exploit this by submitting crafted payloads such as pwd=' OR '1'='1 to bypass authentication and perform UNION-based SQL injection to retrieve arbitrary data from the database.
Potential Impact
An unauthenticated attacker can bypass authentication controls, gaining unauthorized access. Additionally, the attacker can extract arbitrary data from the backend database, potentially exposing sensitive information. The vulnerability impacts confidentiality, integrity, and availability as indicated by the CVSS score of 9.8.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, avoid exposing the vulnerable endpoint or implement input validation and parameterized queries to prevent SQL injection.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- TuranSec
- Date Reserved
- 2026-08-05T10:53:53.175Z
- Cvss Version
- 3.1
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a731a81bf8831d539c95c9c
Added to database: 08/05/2026, 11:12:01 UTC
Last enriched: 08/05/2026, 11:27:00 UTC
Last updated: 08/06/2026, 02:06:52 UTC
Views: 12
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.