CVE-2024-2922
Executive Summary
CVE-2024-2922 is a Stored Cross-Site Scripting (XSS) vulnerability in the Themesflat Addons For Elementor WordPress plugin. The flaw exists in all versions up to and including 2.1.2, allowing authenticated attackers with contributor-level access or higher to inject arbitrary web scripts via widget tags. The vulnerability stems from insufficient input sanitization and output escaping on user-supplied attributes. When a user accesses a page containing the malicious payload, the injected script executes in their browser. This is a WordPress ecosystem issue, not related to Apache or Nginx. The vendor has not released a patch, and no public exploit code or proof-of-concept is available at this time.
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
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: Network
- Attack Complexity: Low
- Privileges Required: Low (contributor-level)
- User Interaction: None
- Scope: Changed
- Confidentiality Impact: Low
- Integrity Impact: Low
- Availability Impact: None
The threat level is medium due to the requirement for authenticated access, but the potential for widespread impact on WordPress sites using the plugin is significant.
Deep Dive & Mechanics
The vulnerability resides in the widget tag handling of the Themesflat Addons For Elementor plugin. The plugin fails to properly sanitize user input and escape output when rendering widget attributes. An attacker with contributor-level access can craft a widget tag containing malicious JavaScript. When the page is saved and viewed by another user (including administrators), the script executes in the context of the victim's browser. This can lead to session hijacking, defacement, or redirection to malicious sites.
The root cause is the lack of proper escaping on dynamic attributes passed to widget rendering functions. The plugin likely uses echo or print without esc_attr() or esc_html() on user-controlled data.
Vulnerable vs. Patched Code
Since no patch is available, the vulnerable code pattern is described below. A patched version would need to implement proper escaping.
Vulnerable Code (Conceptual):
// In widget render method
$tag = $settings['widget_tag'];
echo '<div class="' . $tag . '">Content</div>';
Patched Code (Conceptual):
// In widget render method
$tag = esc_attr($settings['widget_tag']);
echo '<div class="' . $tag . '">Content</div>';
The patched version would use esc_attr() or esc_html() to neutralize any HTML/JavaScript injection.
Exploitation & Lab Setup
Red Team
Prerequisites:
- WordPress instance with Themesflat Addons For Elementor <= 2.1.2
- Contributor-level account or higher
Exploitation Steps:
- Log in as a contributor.
- Create or edit a page/post using Elementor.
- Add a Themesflat widget that accepts a tag attribute.
- In the tag field, inject a payload such as:
or" onmouseover="alert('XSS')""><script>alert('XSS')</script> - Save the page.
- When an administrator or other user views the page, the script executes.
Note: No public exploit code is available. The above is a conceptual demonstration.
Blue Team
Detection Steps:
- Monitor for unusual widget tag values in page/post content.
- Review Elementor templates for unexpected JavaScript or event handlers.
- Check for contributor accounts creating pages with suspicious attributes.
- Use the detection rules below to identify potential exploitation.
Indicators of Compromise (IOCs)
- File Indicators:
- Modified page/post content containing
<script>tags or event handlers (e.g.,onmouseover,onclick) in widget attributes. - Presence of the plugin directory:
/wp-content/plugins/themesflat-addons-for-elementor/
- Modified page/post content containing
- Network Indicators:
- Outbound connections to attacker-controlled domains from WordPress admin pages.
- Log Indicators:
- WordPress audit logs showing contributor-level users editing pages with unusual attribute values.
- Web server logs with requests containing encoded JavaScript in query strings or POST data.
Detection Engineering
YARA Rule
rule CVE_2024_2922_Stored_XSS {
meta:
description = "Detects stored XSS payloads in Themesflat Addons For Elementor widget tags"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2024-2922"
strings:
$payload1 = /<script[^>]*>.*?<\/script>/is
$payload2 = /on\w+\s*=\s*["'][^"']*["']/i
$payload3 = /javascript\s*:/i
condition:
any of them
}
Sigma Rule
title: CVE-2024-2922 Stored XSS via Themesflat Addons For Elementor
id: 8a9b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d
status: experimental
description: Detects stored XSS attempts via widget tags in Themesflat Addons For Elementor
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
service: access_combined
detection:
selection:
cs-method: 'POST'
cs-uri-query|contains: 'elementor'
cs-uri-query|contains: 'themesflat'
cs-uri-query|contains|re: '(<script|on\w+=|javascript:)'
condition: selection
falsepositives:
- Legitimate use of JavaScript in Elementor (rare)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2024-2922 Stored XSS via Themesflat Addons For Elementor"; flow:to_server,established; content:"POST"; http_method; content:"/wp-admin/admin-ajax.php"; http_uri; content:"action=elementor"; http_client_body; pcre:"/(<script|on\w+=|javascript:)/i"; sid:1000001; rev:1;)
Remediation & Mitigation
- Immediate Action: Disable the Themesflat Addons For Elementor plugin until a patch is released.
- Workaround: Restrict contributor-level access to trusted users only. Use a Web Application Firewall (WAF) to block XSS payloads in POST requests.
- Long-term: Monitor the vendor's website for a patched version. Apply the update as soon as it becomes available.
- Validation: After applying any fix, test by attempting to inject XSS payloads into widget tags.
Valters IT
Securing Digital Frontiers
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.