CVE-2025-41396
Executive Summary
CVE-2025-41396 is a path traversal vulnerability in the file upload feature of multiple versions of PowerCMS. An authenticated user with file upload privileges can exploit this flaw to overwrite arbitrary files on the server by manipulating the file path during upload. The CVSS score is 5.4 (Medium), with a low EPSS probability of 0.0%, indicating limited active exploitation in the wild. No public proof-of-concept (PoC) code or exploit templates are available at this time. The vendor has not released a patch, leaving systems exposed.
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
PowerCMS is a proprietary content management system. No open-source package registries (NPM, PyPI, Go, Ruby) are involved. The vulnerability is inherent to the product's file upload handling and does not stem from a third-party library.
CVSS Breakdown & Threat Level
- CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/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: Low (PR:L) – requires an authenticated user with upload permissions
- User Interaction: None (UI:N)
- Scope: Unchanged (S:U)
- Confidentiality Impact: Low (C:L) – limited file read via path traversal
- Integrity Impact: Low (I:L) – arbitrary file overwrite
- Availability Impact: None (A:N)
Threat Level: Medium. The vulnerability requires authentication, reducing the attack surface, but successful exploitation can lead to file overwrite, potentially causing data corruption or code execution if critical files (e.g., configuration, templates) are targeted.
Deep Dive & Mechanics
The vulnerability resides in the file upload functionality of PowerCMS. When a user uploads a file, the application fails to properly sanitize the file path or filename. An attacker can inject path traversal sequences (e.g., ../) into the filename or upload path parameter, causing the file to be written to an arbitrary directory outside the intended upload folder.
Root Cause: Insufficient input validation on the file path during the upload process. The application likely constructs the destination path by concatenating a base directory with the user-supplied filename without checking for traversal sequences.
Attack Scenario:
- An authenticated user with file upload privileges logs into PowerCMS.
- The user crafts a malicious filename such as
../../config/database.phpor uses a parameter manipulation to set the upload path to../../etc/. - The file is uploaded and written to the target location, overwriting the existing file.
- This can lead to:
- Overwriting configuration files (e.g., database credentials, application settings).
- Overwriting template files to inject malicious code (e.g., PHP backdoor).
- Overwriting system files if the web server user has sufficient permissions.
Impact: Arbitrary file overwrite can lead to:
- Data Integrity Loss: Corruption of critical application files.
- Remote Code Execution: If a writable script file (e.g., PHP, ASP) is overwritten with malicious code.
- Privilege Escalation: Overwriting authentication or authorization files.
Vulnerable vs. Patched Code
Since no patch is available, the vulnerable code pattern is described generically.
Vulnerable Code (Conceptual PHP):
<?php
$uploadDir = '/var/www/uploads/';
$filename = $_FILES['file']['name'];
$destination = $uploadDir . $filename;
move_uploaded_file($_FILES['file']['tmp_name'], $destination);
?>
The filename is directly concatenated without sanitization, allowing path traversal.
Patched Code (Conceptual):
<?php
$uploadDir = '/var/www/uploads/';
$filename = basename($_FILES['file']['name']); // Strip path components
$destination = $uploadDir . $filename;
if (strpos(realpath($destination), realpath($uploadDir)) !== 0) {
die('Invalid path');
}
move_uploaded_file($_FILES['file']['tmp_name'], $destination);
?>
Uses basename() to remove directory components and validates that the final path is within the intended directory.
Exploitation & Lab Setup
Red Team
Prerequisites:
- Access to a PowerCMS instance with an authenticated user account that has file upload privileges.
- Knowledge of the target file system structure (e.g., web root, configuration paths).
Exploitation Steps:
- Log in to PowerCMS.
- Navigate to the file upload feature.
- Intercept the upload request using a proxy (e.g., Burp Suite).
- Modify the filename parameter to include path traversal sequences. For example:
- Change
filename=image.jpgtofilename=../../config/database.php - Or manipulate the upload path parameter if present.
- Change
- Upload a malicious file (e.g., a PHP web shell) or a benign file to overwrite a target.
- Verify the file was written to the intended location by accessing it via the web server.
Example Request (HTTP POST):
POST /admin/upload HTTP/1.1
Host: target.com
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary
------WebKitFormBoundary
Content-Disposition: form-data; name="file"; filename="../../config/database.php"
Content-Type: application/x-php
<?php system($_GET['cmd']); ?>
------WebKitFormBoundary--
Blue Team
Detection:
- Monitor file upload logs for filenames containing
../or..\. - Alert on uploads to directories outside the expected upload path.
- Use file integrity monitoring (FIM) to detect unexpected changes to critical files (e.g., configuration, templates).
Hunting:
- Search web server logs for POST requests to upload endpoints with suspicious filenames.
- Look for files with unexpected content in directories that should not be writable.
Lab Setup:
- Deploy a vulnerable PowerCMS instance in an isolated environment.
- Use a web application scanner (e.g., OWASP ZAP) to test for path traversal.
- Simulate exploitation with a controlled user account.
Indicators of Compromise (IOCs)
File System:
- Unexpected files in directories such as
/config/,/templates/,/etc/. - Files with names containing path traversal sequences (e.g.,
..%2F..%2F). - Modified timestamps on critical files (e.g.,
database.php,config.php).
- Unexpected files in directories such as
Network:
- HTTP POST requests to upload endpoints with filenames containing
../or URL-encoded variants. - Requests to uploaded malicious files (e.g.,
GET /config/database.php?cmd=id).
- HTTP POST requests to upload endpoints with filenames containing
Logs:
- Web server access logs showing
POST /admin/uploadwithfilename=../../patterns. - Application logs indicating file write operations to unexpected paths.
- Web server access logs showing
Detection Engineering
YARA Rule
rule CVE_2025_41396_PowerCMS_Path_Traversal {
meta:
description = "Detects path traversal attempts in PowerCMS file uploads"
author = "Valters IT"
date = "2025-04-10"
cve = "CVE-2025-41396"
strings:
$traversal1 = "../"
$traversal2 = "..\\"
$traversal3 = "%2e%2e%2f"
$traversal4 = "%2e%2e%5c"
$upload_endpoint = "/admin/upload"
condition:
any of ($traversal*) and $upload_endpoint
}
Sigma Rule
title: PowerCMS File Upload Path Traversal Attempt
id: 8f3a2b1c-4d5e-6f7a-8b9c-0d1e2f3a4b5c
status: experimental
description: Detects HTTP POST requests to PowerCMS upload endpoints containing path traversal sequences
author: Valters IT
date: 2025/04/10
logsource:
category: webserver
product: apache
service: access
detection:
selection:
cs-method: 'POST'
cs-uri-stem: '/admin/upload'
cs-uri-query|contains:
- '../'
- '..\\'
- '%2e%2e%2f'
- '%2e%2e%5c'
condition: selection
falsepositives:
- Legitimate use of dots in filenames (unlikely)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2025-41396 PowerCMS File Upload Path Traversal"; flow:to_server,established; content:"POST"; http_method; content:"/admin/upload"; http_uri; content:"../"; http_client_body; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable file upload functionality if not essential, or restrict upload permissions to trusted users only.
- Implement input validation on the server side to strip path traversal sequences from filenames (e.g., using
basename()). - Use a web application firewall (WAF) to block requests containing path traversal patterns in file upload parameters.
- Apply strict file permissions to prevent the web server user from overwriting critical system files.
Long-Term Fix:
- Await an official patch from PowerCMS. In the meantime, consider migrating to a supported CMS or implementing custom code fixes.
- Conduct a security audit of the file upload module to identify and remediate similar vulnerabilities.
Workaround:
- Modify the application code to validate that the final file path is within the intended upload directory using
realpath()and prefix checks.
Valters IT
What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.