Summary
Tangshan Pingsheng Reservoir Safety Supervision Platform builds through 2022-11-30 contain an unauthenticated SQL injection flaw in the SIM recharge-records service. If the service is reachable, an attacker may use crafted requests to infer database information, such as the database user, version, and name.
Affected context
The issue is described in the simcardId parameter of /WebServices/SIMMaintainService.asmx/GetAllRechargeRecordsBySIMCardId in affected platform builds. It becomes risky when the endpoint is accessible to an attacker and the parameter is incorporated into a database query without effective separation from SQL syntax.
Exploit preconditions
- Attack surface: The HTTP-accessible SIM maintenance web service
- Required access: No authentication is described as necessary
- Trigger point: A POST request to the recharge-records endpoint containing a crafted
simcardIdvalue - Why exploitation is possible: The parameter is reportedly processed in a way that permits SQL injection, including time-based inference against MSSQL
Why this happens
The underlying bug is SQL injection, mapped to CWE-89: Improper Neutralization of Special Elements used in an SQL Command. The insecure pattern occurs when application data is combined with SQL command text rather than handled as a parameter, allowing input to alter query behavior.
Potential impact
- An attacker may infer database details, including the database user, version, and name.
- Further database information could be exposed depending on query permissions and application behavior.
- Database performance or service availability could be affected by abusive queries.
General mitigation guidance
Defensive approaches focus on keeping input separate from query structure and limiting the consequences of database access:
- Use parameterized queries or prepared statements rather than composing SQL with request values.
- Treat request parameters as untrusted and apply suitable type, length, and format validation.
- Give the application database account only the privileges required for its function.
- Avoid exposing sensitive database errors or details through service responses.
- Limit access to the endpoint through appropriate authentication, authorization, and network controls where feasible.
How teams detect issues like this
Review database-access code for request parameters concatenated into SQL and check whether queries consistently use parameter binding. Monitor service and database logs for unusual request patterns, repeated timing differences, and unexpected query activity associated with the recharge-records endpoint. Static analysis and CI policies can flag unsafe query construction and require parameterized database access.

