CVE-2025-58705
Executive Summary
CVE-2025-58705 is a critical PHP Local File Inclusion (LFI) vulnerability affecting the Crafti WordPress theme by Axiomthemes, up to version 1.12. The vulnerability stems from improper control of a filename used in a PHP include or require statement, allowing an unauthenticated attacker to include arbitrary local files from the server. This can lead to sensitive information disclosure, including configuration files, source code, and potentially credentials. The CVSS score of 8.1 (High) reflects the ease of exploitation and the high impact on confidentiality. No public proof-of-concept (PoC) or patch is currently available, making this a high-priority unpatched threat for WordPress sites using the Crafti theme.
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 specific to the WordPress ecosystem and the Crafti theme distributed by Axiomthemes. As a commercial theme, it is not available via the official WordPress.org repository, but rather through third-party marketplaces or direct purchase. Users should verify the integrity of their theme files and monitor for updates from Axiomthemes. The lack of a patch increases the risk of supply chain attacks if the theme is bundled with other plugins or themes.
CVSS Breakdown & Threat Level
- 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 and the affected resource are the same.
- Confidentiality (C): High (H) – Full file read capability.
- Integrity (I): None (N) – No file modification.
- Availability (A): None (N) – No denial of service.
Threat Level: High. The vulnerability is remotely exploitable without authentication, and while it only allows file reading, the potential to read sensitive files like wp-config.php (containing database credentials) makes it critical.
Deep Dive & Mechanics
The vulnerability is a PHP Local File Inclusion (LFI) caused by improper sanitization of a filename parameter passed to a PHP include() or require() function. In the Crafti theme, a function likely handles template loading or shortcode rendering by accepting a user-supplied parameter (e.g., via GET or POST) that specifies a file path. Without proper validation, an attacker can use path traversal sequences (e.g., ../../) to include files outside the intended directory.
Example vulnerable code pattern:
$file = $_GET['template'];
include("themes/crafti/templates/" . $file . ".php");
An attacker could exploit this by sending:
GET /?template=../../../../wp-config
This would include /var/www/html/wp-config.php, exposing database credentials.
The vulnerability is classified under CWE-98: Improper Control of Filename for Include/Require Statement in PHP Program ('PHP Remote File Inclusion'), but in this case, it is limited to local files (LFI). The EPSS score of 0.0% suggests low exploitation activity, but this may change once PoC code is released.
Vulnerable vs. Patched Code
Vulnerable Code (Crafti <= 1.12):
// In a theme function, e.g., crafti_load_template()
function crafti_load_template() {
$template = $_GET['template'];
include(get_template_directory() . '/templates/' . $template . '.php');
}
Patched Code (Hypothetical):
function crafti_load_template() {
$allowed_templates = array('default', 'full-width', 'sidebar');
$template = $_GET['template'];
if (in_array($template, $allowed_templates)) {
include(get_template_directory() . '/templates/' . $template . '.php');
} else {
// Fallback to default
include(get_template_directory() . '/templates/default.php');
}
}
The patched version uses a whitelist of allowed template names, preventing arbitrary file inclusion. Without an official patch, users must implement similar validation manually.
Exploitation & Lab Setup
Red Team (Offensive)
Lab Setup:
- Install WordPress with the Crafti theme (version 1.12) on a local server (e.g., XAMPP, Docker).
- Ensure the theme is active.
Exploitation Steps:
- Identify the vulnerable parameter (e.g.,
template,file,page). Common endpoints include:/?template=/?page=/?load=
- Test for LFI with path traversal:
GET /?template=../../../../etc/passwd - If successful, read sensitive files:
wp-config.php(database credentials)/etc/passwd(user enumeration)/proc/self/environ(environment variables)
Example curl command:
curl -v "http://target-site/?template=../../../../wp-config"
Note: No public exploit code is available; this is a theoretical exploitation based on the CWE.
Blue Team (Defensive)
Detection:
- Monitor web server logs for path traversal patterns (e.g.,
../,%2e%2e%2f). - Look for requests to theme files with unexpected parameters.
- Use WAF rules to block
../sequences in GET/POST parameters.
Hunting:
- Search for
includeorrequirecalls in the Crafti theme files that use user input without validation. - Check for recent file access to sensitive files like
wp-config.phpfrom web server logs.
Mitigation:
- Disable the vulnerable functionality until a patch is released.
- Implement a web application firewall (WAF) rule to block path traversal.
- Restrict file permissions on sensitive files (e.g.,
wp-config.phpshould be readable only by the web server user).
Indicators of Compromise (IOCs)
- File Paths:
/wp-content/themes/crafti/(theme directory) - URL Patterns:
?template=,?page=,?load=with../sequences - Log Entries: HTTP requests containing
%2e%2e%2for../in query strings - Accessed Files:
/etc/passwd,wp-config.php,.env,config.php - Network: Outbound connections from the web server to external IPs (if RFI is possible, though this is LFI)
Detection Engineering
YARA Rule
rule CVE_2025_58705_LFI_Crafti {
meta:
description = "Detects attempts to exploit LFI in Crafti WordPress theme"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-58705"
strings:
$path_traversal = /(\.\.\/|\.\.\\){2,}/
$sensitive_file = /(wp-config|etc\/passwd|\.env|config\.php)/
$theme_param = /(template|page|load)=/
condition:
$theme_param and ($path_traversal or $sensitive_file)
}
Sigma Rule
title: CVE-2025-58705 Crafti Theme LFI Attempt
id: 8a3f7c2e-5d1b-4a9f-8c6e-2b1a3d4f5e6c
status: experimental
description: Detects path traversal attempts targeting the Crafti WordPress theme
author: Valters IT
logsource:
category: webserver
product: apache
service: access_combined
detection:
selection:
cs-uri-query|contains:
- 'template='
- 'page='
- 'load='
cs-uri-query|re: '\.\.\/|\.\.\\'
condition: selection
falsepositives:
- Legitimate use of relative paths in other contexts
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2025-58705 Crafti Theme LFI Attempt"; flow:to_server,established; content:"GET"; http_method; content:"template="; http_uri; pcre:"/(\.\.\/|\.\.\\){2,}/"; classtype:attempted-recon; sid:1000001; rev:1;)
Remediation & Mitigation
- Immediate Action: Disable the Crafti theme and switch to a default WordPress theme (e.g., Twenty Twenty-Four) until a patch is available.
- Code Fix: If you have access to the theme source code, implement a whitelist of allowed template names as shown in the patched code example.
- WAF Rule: Deploy a web application firewall rule to block requests containing
../or%2e%2e%2fin query parameters. - File Permissions: Ensure
wp-config.phpand other sensitive files are not readable by the web server user (e.g.,chmod 600 wp-config.php). - Monitoring: Enable detailed logging and alert on path traversal patterns.
- Update: Monitor Axiomthemes for an official patch and apply it immediately when released.
Valters IT – Securing digital frontiers, one CVE at a time.
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.