CVE-2025-25997
Executive Summary
CVE-2025-25997 is a directory traversal vulnerability in FeMiner wms v1.0, specifically within the databak.php component. This flaw allows a remote, unauthenticated attacker to read arbitrary files from the server filesystem, leading to the disclosure of sensitive information such as configuration files, database credentials, and source code. The vulnerability has a CVSS score of 0.0 (placeholder) but is assessed as high risk due to the lack of authentication requirements and the potential for data exfiltration. No official patch has been released by the vendor, and no public exploit code is available at this time. The EPSS score is 0.0%, indicating low exploitation activity in the wild, but the risk remains significant for exposed instances.
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 any package manager (NPM, PyPI, Go, Ruby). It is a standalone web application vulnerability in a custom PHP application (FeMiner wms). No supply chain implications are identified.
CVSS Breakdown & Threat Level
While the official CVSS score is 0.0, a realistic assessment based on the vulnerability characteristics is provided below:
- Attack Vector (AV): Network (N) – exploitable remotely.
- Attack Complexity (AC): Low (L) – no special conditions required.
- Privileges Required (PR): None (N) – no authentication needed.
- User Interaction (UI): None (N) – no user action required.
- Scope (S): Unchanged (U) – the vulnerable component is the only affected component.
- Confidentiality (C): High (H) – sensitive files can be read.
- Integrity (I): None (N) – no file modification possible.
- Availability (A): None (N) – no denial of service.
CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Base Score: 7.5 (High)
Threat Level: High – due to ease of exploitation and potential for sensitive data exposure.
Deep Dive & Mechanics
The vulnerability resides in the databak.php file of FeMiner wms v1.0. This script is intended to handle database backup operations but fails to properly sanitize user-supplied input used to specify file paths. An attacker can inject path traversal sequences (e.g., ../) to navigate outside the intended directory and read arbitrary files.
Root Cause: The application uses user input directly in file operations (e.g., file_get_contents(), readfile(), or include()) without validating or sanitizing the path. This allows an attacker to traverse directories and access sensitive files such as /etc/passwd, application configuration files, or database credentials.
Attack Vector: The attacker sends a crafted HTTP request to the databak.php endpoint with a file parameter containing path traversal sequences. For example:
GET /databak.php?file=../../../../etc/passwd HTTP/1.1
Host: target.com
Impact: Successful exploitation leads to unauthorized disclosure of sensitive information, which can be used for further attacks, such as privilege escalation or lateral movement.
Vulnerable vs. Patched Code
Vulnerable Code (FeMiner wms v1.0):
<?php
$file = $_GET['file'];
$content = file_get_contents($file);
echo $content;
?>
Patched Code (Hypothetical):
<?php
$file = basename($_GET['file']);
$allowed_path = '/var/www/backups/';
$full_path = $allowed_path . $file;
if (strpos(realpath($full_path), realpath($allowed_path)) !== 0) {
die('Invalid file path.');
}
$content = file_get_contents($full_path);
echo $content;
?>
The patched version uses basename() to strip directory components and validates that the resolved path is within the allowed directory.
Exploitation & Lab Setup
Red Team (Offensive)
Lab Setup:
- Deploy FeMiner wms v1.0 on a local server (e.g., using XAMPP or Docker).
- Ensure the
databak.phpfile is accessible.
Exploitation Steps:
- Identify the vulnerable endpoint:
http://target/databak.php. - Send a crafted request to read sensitive files:
curl "http://target/databak.php?file=../../../../etc/passwd" - For Windows targets, use backslashes or URL-encoded paths:
curl "http://target/databak.php?file=..\..\..\..\windows\win.ini"
No public exploit code is available. The above manual exploitation is sufficient.
Blue Team (Defensive)
Detection:
- Monitor web server logs for requests containing
../or..\in query parameters. - Look for requests to
databak.phpwith unusual file paths. - Use WAF rules to block path traversal patterns.
Mitigation:
- Apply input validation and sanitization on the
fileparameter. - Use a whitelist of allowed files or directories.
- Disable or remove the
databak.phpscript if not needed.
Indicators of Compromise (IOCs)
- Network IOCs:
- HTTP requests to
/databak.phpwithfileparameter containing../or..\. - Outbound connections from the server to unknown IPs (if data exfiltration occurs).
- HTTP requests to
- File IOCs:
- Unauthorized access to
/etc/passwd,/etc/shadow, or application configuration files. - Presence of backup files in unexpected locations.
- Unauthorized access to
- Log IOCs:
- Web server logs showing
GET /databak.php?file=../../../../etc/passwdwith 200 response.
- Web server logs showing
Detection Engineering
YARA Rule
rule CVE_2025_25997_Directory_Traversal {
meta:
description = "Detects directory traversal attempts targeting FeMiner wms databak.php"
author = "Valters IT"
date = "2025-04-01"
reference = "CVE-2025-25997"
strings:
$traversal1 = "../"
$traversal2 = "..\\"
$traversal3 = "%2e%2e%2f"
$traversal4 = "%2e%2e%5c"
$endpoint = "databak.php"
condition:
$endpoint and any of ($traversal*)
}
Sigma Rule
title: CVE-2025-25997 Directory Traversal in FeMiner wms
id: 12345678-1234-1234-1234-123456789abc
status: experimental
description: Detects directory traversal attempts against FeMiner wms databak.php
author: Valters IT
date: 2025-04-01
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'GET'
cs-uri-stem: '/databak.php'
cs-uri-query|contains:
- '../'
- '..\\'
- '%2e%2e%2f'
- '%2e%2e%5c'
condition: selection
falsepositives:
- Legitimate backup operations using absolute paths (rare)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2025-25997 Directory Traversal in FeMiner wms"; flow:to_server,established; content:"GET"; http_method; content:"/databak.php"; http_uri; content:"../"; http_uri; classtype:attempted-recon; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Remove or disable the
databak.phpscript if not required. - Implement a Web Application Firewall (WAF) rule to block path traversal patterns.
- Restrict access to the
databak.phpendpoint via IP whitelisting or authentication.
- Remove or disable the
Long-term Fix:
- Apply input validation and sanitization to all user-supplied file paths.
- Use a whitelist of allowed files or directories.
- Upgrade to a patched version if the vendor releases one.
Monitoring:
- Enable detailed logging for web server requests.
- Set up alerts for directory traversal patterns in logs.
Vendor Contact:
- Attempt to contact FeMiner for a security patch. If unresponsive, consider migrating to an alternative solution.
Valters IT
Securing Digital Frontiers
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.
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.