SeaCMS SQL Injection Vulnerability Allowing Arbitrary Code Execution

Vulnerability

A SQL injection vulnerability has been identified in SeaCMS versions through 13.2. This vulnerability allows remote attackers to execute arbitrary code by exploiting the DoTranExecSql parameter in the phome.php component. The issue arises because the application fails to properly sanitize user input, enabling the injection of malicious SQL commands that can be executed on the database.

Impact

Exploitation of this vulnerability could lead to arbitrary code execution on the server where SeaCMS is hosted.

Reproduction

To reproduce this vulnerability, send a POST request to the phome.php component with the DoTranExecSql parameter. The 'mydbname' parameter must be set to an existing database name. The Ebak_ClearAddsData() method should be called first to remove escape characters from the parameters. Once the parameters are set, the Ebak_DoRunQuery() function will execute the injected SQL statement, allowing for code execution on the server.

Remediation

To address this vulnerability, SeaCMS should implement parameterized queries to separate user input from SQL commands, validate and sanitize user input to prevent injection of special characters, and assign minimal database permissions to limit the potential impact of an attack.

Added: Jun 9, 2025, 7:46 PM
Updated: Jun 9, 2025, 7:46 PM

Vulnerability Rating

Custom Algorithm
spread
1.0
impact
10.0
exploitability
9.7
remediation
0.0
relevance
0.0
threat
6.4
urgency
2.9
incentive
10.0

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.