CVE-2025-49870
Executive Summary
CVE-2025-49870 is a critical SQL Injection vulnerability affecting the WordPress plugin Paid Member Subscriptions by Cozmoslabs, versions up to and including 2.15.1. This flaw allows an unauthenticated attacker to inject arbitrary SQL commands into the database, potentially leading to data exfiltration, modification, or complete compromise of the WordPress site. The vulnerability stems from improper neutralization of special elements used in an SQL command. Given the plugin's widespread use for membership management, this poses a significant risk to site integrity and user data.
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 have installed the plugin directly from the WordPress dashboard or via manual upload are at risk. The supply chain risk is elevated due to the lack of a confirmed patch and the plugin's popularity. Organizations should immediately audit their WordPress installations for this plugin and apply any available updates or implement virtual patching.
CVSS Breakdown & Threat Level
- CVSS Score: 7.5 (High)
- Attack Vector: Network (AV:N)
- Attack Complexity: Low (AC:L)
- Privileges Required: None (PR:N)
- User Interaction: None (UI:N)
- Scope: Unchanged (S:U)
- Confidentiality Impact: High (C:H)
- Integrity Impact: High (I:H)
- Availability Impact: High (A:H)
The high CVSS score reflects the ease of exploitation (no authentication required) and the severe impact on confidentiality, integrity, and availability. An attacker can extract the entire WordPress database, including user credentials and sensitive membership data.
Deep Dive & Mechanics
The vulnerability exists in the paid-member-subscriptions plugin, likely within a function that processes user-supplied input without proper sanitization or parameterized queries. The specific vulnerable endpoint is not publicly documented, but typical SQL injection points in WordPress plugins include shortcodes, AJAX handlers, or custom query variables.
The attack vector involves sending a crafted HTTP request containing SQL metacharacters (e.g., single quotes, UNION statements) to a vulnerable parameter. The plugin's code directly concatenates this input into an SQL query, allowing the attacker to manipulate the query's logic.
For example, a vulnerable function might look like:
$user_id = $_GET['user_id'];
$query = "SELECT * FROM wp_users WHERE ID = $user_id";
$result = $wpdb->get_results($query);
An attacker could inject: 1 UNION SELECT user_login, user_pass FROM wp_users to retrieve all usernames and password hashes.
Vulnerable vs. Patched Code
Vulnerable Code (<= 2.15.1):
function get_member_data($member_id) {
global $wpdb;
$query = "SELECT * FROM {$wpdb->prefix}members WHERE id = $member_id";
return $wpdb->get_row($query);
}
Patched Code (Hypothetical):
function get_member_data($member_id) {
global $wpdb;
$query = $wpdb->prepare("SELECT * FROM {$wpdb->prefix}members WHERE id = %d", $member_id);
return $wpdb->get_row($query);
}
The patched version uses $wpdb->prepare() with a placeholder (%d) to ensure the input is treated as an integer, preventing SQL injection.
Exploitation & Lab Setup
Red Team
Lab Setup:
- Install WordPress with the Paid Member Subscriptions plugin version 2.15.1.
- Identify a vulnerable endpoint (e.g., a shortcode or AJAX handler that accepts user input).
- Use a tool like
sqlmapor manual injection to exploit.
Exploitation Steps:
- Enumerate the vulnerable parameter (e.g.,
member_id). - Inject a UNION-based payload to extract data:
http://target.com/?member_id=1 UNION SELECT user_login,user_pass FROM wp_users-- - Use
sqlmapfor automated exploitation:sqlmap -u "http://target.com/?member_id=1" --batch --dbs
No public exploit code is available for this CVE.
Blue Team
Detection:
- Monitor web server logs for SQL injection patterns (e.g.,
UNION,SELECT,' OR '1'='1). - Deploy a Web Application Firewall (WAF) with rules to block SQL injection attempts.
- Use the detection rules provided below.
Hunting:
- Search for unusual database queries or error messages in logs.
- Look for unexpected HTTP requests to plugin-specific endpoints.
Indicators of Compromise (IOCs)
- Network:
- HTTP requests containing SQL keywords (e.g.,
UNION,SELECT,--) in query parameters. - Requests to
/wp-admin/admin-ajax.phpwith suspiciousactionparameters.
- HTTP requests containing SQL keywords (e.g.,
- File System:
- Modified plugin files (e.g.,
paid-member-subscriptions/directory). - Unexpected PHP files in the uploads directory.
- Modified plugin files (e.g.,
- Database:
- New or modified user accounts with elevated privileges.
- Unusual entries in the
wp_optionstable.
Detection Engineering
YARA Rule
rule CVE_2025_49870_SQLi_WordPress {
meta:
description = "Detects SQL injection attempts targeting Paid Member Subscriptions plugin"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-49870"
strings:
$sqli1 = "UNION SELECT" nocase
$sqli2 = "OR 1=1" nocase
$sqli3 = "admin' --" nocase
$plugin_path = "paid-member-subscriptions"
condition:
any of ($sqli*) and $plugin_path
}
Sigma Rule
title: SQL Injection Attempt Against Paid Member Subscriptions
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects SQL injection patterns in HTTP requests targeting the WordPress plugin
author: Valters IT
logsource:
category: webserver
product: apache
detection:
selection:
c-uri|contains:
- 'paid-member-subscriptions'
cs-uri-query|contains:
- 'UNION'
- 'SELECT'
- 'OR 1=1'
- "' --"
condition: selection
falsepositives:
- Legitimate use of UNION in custom queries (rare)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2025-49870 SQL Injection Attempt"; flow:to_server,established; content:"paid-member-subscriptions"; http_uri; content:"UNION"; http_uri; nocase; content:"SELECT"; http_uri; nocase; sid:1000001; rev:1;)
Remediation & Mitigation
- Immediate Action: Disable the Paid Member Subscriptions plugin until a patch is available.
- Virtual Patching: Deploy WAF rules to block SQL injection patterns targeting the plugin.
- Update: Monitor the plugin's official page for a patched version (>2.15.1) and apply it immediately.
- Database Audit: Review database logs for unauthorized queries and reset all user passwords.
- Long-term: Implement input validation and parameterized queries in all custom WordPress code.
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.
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.