CVE-2025-8702
Executive Summary
CVE-2025-8702 is a critical SQL injection vulnerability discovered in the Wanzhou WOES Intelligent Optimization Energy Saving System version 1.0. The flaw resides in the /CommonSolution/GetVariableByOneIDNew endpoint of the Historical Data Query Module. By manipulating the ObjectID parameter, an unauthenticated remote attacker can inject arbitrary SQL commands, leading to unauthorized data access, modification, or potential system compromise. The exploit has been publicly disclosed, increasing the risk of active exploitation. No official patch is currently available from the vendor.
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 open-source package manager (NPM, PyPI, Go, Ruby). It affects a proprietary industrial control system (ICS) product from Wanzhou. Supply chain risk is limited to the direct deployment of the WOES system.
CVSS Breakdown & Threat Level
- CVSS Score: 6.3 (Medium)
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L
- Attack Vector: Network (AV:N) – Exploitable remotely.
- Attack Complexity: Low (AC:L) – No special conditions required.
- Privileges Required: None (PR:N) – No authentication needed.
- User Interaction: None (UI:N) – No user action required.
- Scope: Unchanged (S:U) – Impact confined to the vulnerable component.
- Confidentiality Impact: Low (C:L) – Limited data exposure.
- Integrity Impact: Low (I:L) – Limited data modification.
- Availability Impact: Low (A:L) – Potential for service disruption.
Threat Level: Medium. The low EPSS score (0.0%) suggests limited active exploitation currently, but the public availability of exploit details elevates the risk for targeted attacks against exposed systems.
Deep Dive & Mechanics
The vulnerability is a classic SQL injection in the GetVariableByOneIDNew endpoint. The application fails to sanitize or parameterize the ObjectID input before incorporating it into a SQL query. An attacker can inject SQL metacharacters (e.g., single quote ', double dash --) to break out of the intended query structure and execute arbitrary SQL statements.
Affected Component: Historical Data Query Module
Vulnerable Endpoint: /CommonSolution/GetVariableByOneIDNew
Vulnerable Parameter: ObjectID
Attack Flow:
- The attacker sends an HTTP GET or POST request to the vulnerable endpoint.
- The
ObjectIDparameter is passed directly into a SQL query without sanitization. - The attacker injects a SQL payload, such as
' OR '1'='1or a UNION-based query to extract data. - The database executes the malicious query, returning unauthorized data or allowing further manipulation.
Example Payload:
/CommonSolution/GetVariableByOneIDNew?ObjectID=1' UNION SELECT username,password FROM users--
Vulnerable vs. Patched Code
Vulnerable Code (Conceptual):
// Vulnerable ASP.NET endpoint
public string GetVariableByOneIDNew(string ObjectID)
{
string query = "SELECT * FROM Variables WHERE ID = " + ObjectID;
SqlCommand cmd = new SqlCommand(query, connection);
return cmd.ExecuteScalar().ToString();
}
Patched Code (Conceptual):
// Patched using parameterized query
public string GetVariableByOneIDNew(string ObjectID)
{
string query = "SELECT * FROM Variables WHERE ID = @ObjectID";
SqlCommand cmd = new SqlCommand(query, connection);
cmd.Parameters.AddWithValue("@ObjectID", ObjectID);
return cmd.ExecuteScalar().ToString();
}
Key Difference: The patched version uses a parameterized query (@ObjectID), which prevents SQL injection by treating user input as data, not executable code.
Exploitation & Lab Setup
Red Team (Offensive)
Prerequisites:
- Target system running Wanzhou WOES 1.0 with the vulnerable endpoint exposed.
- Network access to the target (e.g.,
http://target-ip/CommonSolution/GetVariableByOneIDNew).
Exploitation Steps:
- Reconnaissance: Identify the vulnerable endpoint using a web scanner or manual inspection.
- Manual Injection: Test with a simple payload to confirm vulnerability:
If an error message is returned (e.g., SQL syntax error), the endpoint is vulnerable.GET /CommonSolution/GetVariableByOneIDNew?ObjectID=1' HTTP/1.1 Host: target-ip - Data Extraction: Use UNION-based SQL injection to extract database contents:
GET /CommonSolution/GetVariableByOneIDNew?ObjectID=1 UNION SELECT 1,@@version,3,4,5-- HTTP/1.1 Host: target-ip - Automated Exploitation: Use
sqlmapfor automated exploitation:sqlmap -u "http://target-ip/CommonSolution/GetVariableByOneIDNew?ObjectID=1" --batch --dbs
No Exploit-DB code was provided for this CVE.
Blue Team (Defensive)
Detection & Response:
- Monitor Web Logs: Look for abnormal patterns in the
ObjectIDparameter, such as SQL keywords (UNION,SELECT,OR) or special characters (',--). - Deploy WAF Rules: Block requests containing SQL injection patterns in the
ObjectIDparameter. - Network Segmentation: Isolate the WOES system from the internet and restrict access to trusted IPs only.
- Input Validation: Implement server-side input validation to reject non-numeric or suspicious input for
ObjectID.
Indicators of Compromise (IOCs)
Network IOCs:
- HTTP requests to
/CommonSolution/GetVariableByOneIDNewwith unusualObjectIDvalues. - SQL error messages in HTTP responses (e.g., "Incorrect syntax near", "Unclosed quotation mark").
- Outbound database connections from the WOES server to unexpected IPs (data exfiltration).
File IOCs:
- Modified or new files in the web application directory (e.g., web shells).
- Unusual entries in database logs (e.g.,
xp_cmdshellusage).
System IOCs:
- Unexpected processes running on the WOES server (e.g.,
cmd.exe,powershell.exe). - New user accounts or privilege escalations.
Detection Engineering
YARA Rule
rule CVE_2025_8702_SQLi_ObjectID {
meta:
description = "Detects SQL injection attempts targeting CVE-2025-8702 in Wanzhou WOES"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-8702"
strings:
$s1 = "/CommonSolution/GetVariableByOneIDNew" ascii nocase
$s2 = "ObjectID=" ascii nocase
$sqli1 = /ObjectID=.*['\"]/ ascii nocase
$sqli2 = /ObjectID=.*UNION/i ascii nocase
$sqli3 = /ObjectID=.*SELECT/i ascii nocase
$sqli4 = /ObjectID=.*OR/i ascii nocase
condition:
$s1 and $s2 and ($sqli1 or $sqli2 or $sqli3 or $sqli4)
}
Sigma Rule
title: CVE-2025-8702 SQL Injection Attempt
id: 8a9b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d
status: experimental
description: Detects SQL injection attempts against the Wanzhou WOES GetVariableByOneIDNew endpoint
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
service: access
detection:
selection:
cs-uri-query|contains: "/CommonSolution/GetVariableByOneIDNew"
cs-uri-query|contains: "ObjectID="
sqli_patterns:
- cs-uri-query|contains: "'"
- cs-uri-query|contains: "\""
- cs-uri-query|contains: "UNION"
- cs-uri-query|contains: "SELECT"
- cs-uri-query|contains: "OR"
condition: selection and 1 of sqli_patterns
falsepositives:
- Legitimate use of special characters in ObjectID (unlikely)
level: high
Suricata Rule
alert http $EXTERNAL_NET any -> $HOME_NET any (
msg:"CVE-2025-8702 SQL Injection Attempt - Wanzhou WOES";
flow:to_server,established;
content:"/CommonSolution/GetVariableByOneIDNew"; http_uri;
content:"ObjectID="; http_uri;
pcre:"/ObjectID=.*['\"]|ObjectID=.*UNION|ObjectID=.*SELECT|ObjectID=.*OR/i";
classtype:web-application-attack;
sid:1000001;
rev:1;
reference:cve,2025-8702;
)
Remediation & Mitigation
Immediate Actions:
- Isolate the System: Disconnect the WOES system from the internet and untrusted networks.
- Apply Virtual Patching: Use a WAF to block SQL injection patterns in the
ObjectIDparameter. - Input Validation: Implement strict input validation on the server side (e.g., only allow numeric values for
ObjectID).
Long-Term Fix:
- Parameterized Queries: Rewrite the vulnerable code to use parameterized SQL queries or stored procedures.
- Vendor Contact: Reach out to Wanzhou for an official patch. If unavailable, consider migrating to a different solution.
- Regular Audits: Conduct security audits and penetration testing on all ICS components.
Workaround:
- Disable the Historical Data Query Module if not essential.
- Restrict access to the endpoint via firewall rules (e.g., allow only specific admin IPs).
Valters IT
Securing Digital Frontiers