CVE-2025-26957
Executive Summary
CVE-2025-26957 is a critical PHP Local File Inclusion (LFI) vulnerability affecting the WordPress plugin Affiliate Coupons by Deetronix, versions n/a through 1.7.3. The vulnerability stems from improper control of a filename used in an 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 the wp-config.php file containing database credentials, or potentially achieving remote code execution if combined with file upload capabilities. The CVSS score is 7.5 (High), and no patch is currently available. The EPSS score is 0.0%, indicating low exploitation likelihood at this time, but the risk remains significant for unpatched sites.
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 plugin ecosystem. The plugin is distributed via the official WordPress plugin repository and third-party marketplaces. Users should verify the integrity of their plugin files and monitor for updates from the vendor. Since no patch is available, immediate mitigation steps are required.
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: 7.5 (High)
- Attack Vector: Network (AV:N) – Exploitable remotely.
- Attack Complexity: Low (AC:L) – No special conditions required.
- Privileges Required: None (PR:N) – No authentication needed.
- User Interaction: None (UI:N) – No user action required.
- Scope: Unchanged (S:U) – Vulnerability does not affect other components.
- Confidentiality Impact: High (C:H) – Full file read access.
- Integrity Impact: None (I:N) – No file modification.
- Availability Impact: None (A:N) – No denial of service.
Threat Level: High. The vulnerability allows unauthenticated attackers to read sensitive files, including database credentials, which can lead to full site compromise.
Deep Dive & Mechanics
The vulnerability exists in the affiliate-coupons WordPress plugin. The plugin likely uses a PHP include() or require() statement with a user-controllable parameter (e.g., page, file, or template) without proper sanitization or validation. An attacker can manipulate this parameter to include arbitrary files from the server, such as /etc/passwd or wp-config.php.
Root Cause: The plugin fails to validate the filename against an allowlist or to restrict the path to a specific directory. This allows path traversal sequences (e.g., ../../) to escape the intended directory.
Example vulnerable code pattern:
$file = $_GET['file'];
include($file . '.php');
An attacker can request ?file=../../../../etc/passwd%00 to include /etc/passwd (null byte injection may be required in older PHP versions).
Vulnerable vs. Patched Code
Since no patch is available, we can only describe the vulnerable pattern.
Vulnerable Code (Conceptual):
<?php
// Vulnerable: Direct use of user input in include
$page = $_GET['page'];
include( plugin_dir_path( __FILE__ ) . 'templates/' . $page . '.php' );
?>
Patched Code (Conceptual):
<?php
// Patched: Use an allowlist
$allowed_pages = array('dashboard', 'settings', 'reports');
$page = $_GET['page'];
if (in_array($page, $allowed_pages)) {
include( plugin_dir_path( __FILE__ ) . 'templates/' . $page . '.php' );
} else {
// Default or error
include( plugin_dir_path( __FILE__ ) . 'templates/dashboard.php' );
}
?>
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- A WordPress site with Affiliate Coupons plugin version <= 1.7.3.
- Knowledge of the vulnerable parameter (e.g.,
page,file,template).
Exploitation Steps:
- Identify the vulnerable endpoint. Common patterns:
/wp-admin/admin-ajax.php?action=affiliate_coupons_load_template&template=...or a direct page parameter. - Use path traversal to read sensitive files:
GET /wp-content/plugins/affiliate-coupons/some-file.php?page=../../../../etc/passwd HTTP/1.1 Host: target.com - For PHP files, use null byte injection (if PHP < 5.3.4) or double encoding:
GET /wp-content/plugins/affiliate-coupons/some-file.php?page=../../../../wp-config.php%00 HTTP/1.1 - If the plugin allows file uploads, combine LFI with file upload to achieve RCE.
Proof-of-Concept (PoC) using curl:
curl -v "http://target.com/wp-content/plugins/affiliate-coupons/some-file.php?page=../../../../etc/passwd"
Blue Team (Detection & Defense)
Detection:
- Monitor web server logs for path traversal patterns (e.g.,
../,%2e%2e%2f). - Look for requests to plugin files with suspicious parameters.
- Use WAF rules to block directory traversal.
Defense:
- Disable the plugin until a patch is available.
- Implement a Web Application Firewall (WAF) with rules to block LFI attempts.
- Restrict file permissions on the server.
- Use PHP
open_basedirto limit file access.
Indicators of Compromise (IOCs)
- File Paths:
/etc/passwd,/etc/shadow,/wp-config.php,/proc/self/environ - URL Patterns:
?page=../../../../,?file=..%2f..%2f,?template=..\..\ - Log Entries: Requests containing
../or%2e%2e%2fin plugin parameters. - Network Traffic: Outbound connections from the web server to unknown IPs (if RCE achieved).
Detection Engineering
YARA Rule
rule CVE_2025_26957_LFI_Detection {
meta:
description = "Detects LFI attempts targeting Affiliate Coupons plugin"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-26957"
strings:
$path_traversal = /(\.\.\/|\.\.\\|%2e%2e%2f|%2e%2e%5c)/ nocase
$plugin_path = /affiliate-coupons/i
$param = /(page|file|template)=/ nocase
condition:
$plugin_path and $param and $path_traversal
}
Sigma Rule
title: CVE-2025-26957 Affiliate Coupons LFI Attempt
id: 8a9b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d
status: experimental
description: Detects path traversal attempts in Affiliate Coupons plugin
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
service: access
detection:
selection:
cs-uri-query|contains:
- '..\/'
- '..\\'
- '%2e%2e%2f'
- '%2e%2e%5c'
cs-uri-stem|contains: 'affiliate-coupons'
condition: selection
falsepositives:
- Legitimate use of dots in filenames (rare)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2025-26957 Affiliate Coupons LFI Attempt"; flow:to_server,established; content:"affiliate-coupons"; http_uri; nocase; content:"../"; http_uri; nocase; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the plugin until a patch is released.
- Implement a WAF rule to block path traversal patterns in plugin parameters.
- Review server logs for signs of exploitation.
Long-term Fix:
- The vendor must release a patched version that validates filenames against an allowlist.
- Users should update to the latest version once available.
Workaround:
- If disabling the plugin is not possible, modify the plugin code to add input validation (see patched code example above).
Valters IT – DevSecOps & Cyber Threat Intelligence Expert.
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.