CVE-2024-51938
Executive Summary
CVE-2024-51938 is a DOM-Based Cross-Site Scripting (XSS) vulnerability identified in the Charity Addon for Elementor WordPress plugin, developed by Nicheaddons. This flaw affects all versions up to and including 1.3.2. The vulnerability stems from improper neutralization of user-supplied input during web page generation, allowing an attacker to inject malicious scripts that execute in the context of a victim's browser. As a WordPress plugin vulnerability, it specifically targets sites using the Elementor page builder with this addon enabled. The CVSS v3.1 base score is 6.5 (Medium), with a vector emphasizing network-based, low-complexity attacks requiring user interaction. No public proof-of-concept (PoC) or exploit code has been identified at this time, and the vendor has not released a patch.
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 resides in a WordPress plugin ecosystem, not in a standard package manager (NPM, PyPI, etc.). The supply chain risk is limited to the plugin's update mechanism and the trustworthiness of the Nicheaddons vendor. Users should verify the integrity of plugin updates from the official WordPress plugin repository or vendor site.
CVSS Breakdown & Threat Level
- Attack Vector (AV): Network (N) – The vulnerability can be exploited remotely.
- Attack Complexity (AC): Low (L) – No special conditions are required for exploitation.
- Privileges Required (PR): None (N) – The attacker does not need authentication.
- User Interaction (UI): Required (R) – The victim must click a crafted link or visit a malicious page.
- Scope (S): Changed (C) – The vulnerable component impacts resources beyond its security scope.
- Confidentiality (C): Low (L) – Limited data exposure possible.
- Integrity (I): Low (L) – Limited ability to modify content.
- Availability (A): Low (L) – Limited impact on service availability.
Threat Level: Medium. The requirement for user interaction reduces the immediate risk, but the prevalence of WordPress sites and the lack of a patch elevate the urgency for detection and mitigation.
Deep Dive & Mechanics
The vulnerability is a DOM-Based XSS, meaning the attack payload is executed entirely on the client side within the Document Object Model (DOM) of the browser. The charity-addon-for-elementor plugin likely processes user input (e.g., via URL parameters, form fields, or widget settings) and injects it into the DOM without proper sanitization or encoding. An attacker can craft a malicious URL or input that, when processed by the plugin's JavaScript, executes arbitrary HTML/JavaScript in the victim's browser.
The root cause is the failure to neutralize input during web page generation. Specifically, the plugin's JavaScript code may use functions like innerHTML, document.write, or eval with unsanitized data, allowing script injection.
Vulnerable vs. Patched Code
Since no patch is available, a direct comparison cannot be made. However, the vulnerable code pattern likely resembles:
// Vulnerable code (conceptual)
var userInput = getParameterByName('charity_param');
document.getElementById('charity-widget').innerHTML = userInput;
A patched version would sanitize the input:
// Patched code (conceptual)
var userInput = getParameterByName('charity_param');
var sanitizedInput = DOMPurify.sanitize(userInput);
document.getElementById('charity-widget').innerHTML = sanitizedInput;
Exploitation & Lab Setup
Red Team (Attack Simulation)
- Setup: Deploy a WordPress instance with the vulnerable plugin (version <= 1.3.2) and Elementor.
- Craft Payload: Create a URL containing a malicious script in a parameter processed by the plugin. Example:
http://target-site.com/?charity_param=<img src=x onerror=alert('XSS')> - Deliver: Send the crafted link to a victim via phishing email or social engineering.
- Execute: When the victim clicks the link and the page loads, the script executes in their browser.
Note: No public exploit code is available; this is a conceptual demonstration.
Blue Team (Defense & Detection)
- Monitor: Deploy web application firewalls (WAF) with rules to detect common XSS patterns.
- Audit: Review plugin code for unsafe DOM manipulation functions.
- Isolate: Use Content Security Policy (CSP) headers to restrict script execution.
- Update: Disable the plugin until a patch is released.
Indicators of Compromise (IOCs)
- Network: HTTP requests containing suspicious parameters (e.g.,
<script>,onerror=,javascript:). - Host: Unusual JavaScript execution in browser console.
- File: Modified plugin files (e.g.,
charity-addon-for-elementor/js/main.js) containing injected code. - Log: Web server logs showing requests with encoded XSS payloads.
Detection Engineering
YARA Rule
rule CVE_2024_51938_DOM_XSS {
meta:
description = "Detects potential DOM XSS in Charity Addon for Elementor"
author = "Valters IT"
date = "2025-04-10"
cve = "CVE-2024-51938"
strings:
$unsafe1 = /\.innerHTML\s*=\s*[^;]*getParameterByName/i
$unsafe2 = /document\.write\s*\([^)]*getParameterByName/i
$unsafe3 = /\.outerHTML\s*=\s*[^;]*getParameterByName/i
condition:
any of them
}
Sigma Rule
title: CVE-2024-51938 DOM XSS in Charity Addon for Elementor
id: 12345678-1234-1234-1234-123456789abc
status: experimental
description: Detects HTTP requests with potential XSS payloads targeting the vulnerable plugin
author: Valters IT
logsource:
category: webserver
product: apache
detection:
selection:
c-uri|contains:
- '<script'
- 'onerror='
- 'javascript:'
- 'onload='
condition: selection
falsepositives:
- Legitimate use of similar patterns in other plugins
level: medium
Suricata Rule
alert http any any -> any any (msg:"CVE-2024-51938 DOM XSS Attempt"; flow:to_server,established; content:"charity_param"; http_uri; pcre:"/(<script|onerror=|javascript:|onload=)/i"; sid:1000001; rev:1;)
Remediation & Mitigation
- Immediate: Disable the
charity-addon-for-elementorplugin until a patch is released. - Short-term: Implement a Web Application Firewall (WAF) rule to block common XSS patterns.
- Long-term: Monitor the vendor's website for updates. Apply the patch as soon as it becomes available.
- Alternative: Consider replacing the plugin with a similar, actively maintained alternative.
Valters IT
Securing Digital Frontiers
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.