Skip to main content

CVE-2024-2798: Royal Elementor Addons XSS Vulnerability

CVE-2024-2798 is a stored cross-site scripting vulnerability in Royal Elementor Addons plugin for WordPress that lets contributors inject malicious scripts. This article covers technical details, affected versions, and mitigation.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2024-2798 Overview

CVE-2024-2798 is a Stored Cross-Site Scripting (XSS) vulnerability in the Royal Elementor Addons and Templates plugin for WordPress. The flaw affects all versions up to and including 1.3.971 and resides in the plugin's widget containers. Insufficient input sanitization and output escaping on user-supplied attributes allow authenticated attackers with contributor-level access or higher to inject arbitrary web scripts. Any visitor who accesses an affected page triggers execution of the injected payload in their browser. The issue is tracked under CWE-79.

Critical Impact

Contributor-level users can inject persistent JavaScript that executes in the browsers of site visitors and administrators, enabling session theft, redirection, and administrative account takeover.

Affected Products

  • Royal Elementor Addons and Templates plugin for WordPress
  • All versions up to and including 1.3.971
  • Sticky Section extension (wpr-sticky-section.php) widget containers

Discovery Timeline

  • 2024-04-23 - CVE-2024-2798 published to the National Vulnerability Database
  • 2026-06-17 - Last updated in NVD database

Technical Details for CVE-2024-2798

Vulnerability Analysis

The vulnerability is a Stored Cross-Site Scripting flaw in the widget containers exposed by the Royal Elementor Addons and Templates plugin. Authenticated users with the WordPress contributor role or above can supply attribute values that the plugin renders back into page markup without adequate sanitization or escaping. Because the payload is stored in the WordPress database, every subsequent page render replays the attacker's script in the visitor's browser session.

The scope-changed nature of the flaw means the injected script executes in the context of the site itself, giving an attacker access to authenticated administrator sessions when a privileged user views the page. Typical outcomes include session cookie theft, forced navigation, silent creation of administrator accounts through the WordPress REST API, and drive-by delivery of secondary payloads to site visitors.

Root Cause

The root cause is missing input validation and output escaping on user-supplied widget attributes handled by the plugin's Sticky Section extension. The plugin trusts attribute values submitted through the Elementor editor and echoes them into HTML without applying WordPress escaping helpers such as esc_attr() or wp_kses_post(). The fix landed in version 1.3.972 and can be reviewed in the official WordPress plugin change set.

Attack Vector

An authenticated attacker holding a contributor account edits a post using an affected Royal Elementor widget and places malicious JavaScript inside a vulnerable widget attribute. After the post is saved and later rendered, the payload executes in the browser of every visitor, including administrators who preview or moderate the content. Further technical context is available in the Wordfence vulnerability report.

// No verified public exploit code is available for CVE-2024-2798.
// The vulnerability is triggered by supplying script content in a
// widget attribute that is later rendered without escaping.

Detection Methods for CVE-2024-2798

Indicators of Compromise

  • Unexpected <script> tags, on* event handlers, or javascript: URIs stored inside Royal Elementor widget attributes in the wp_posts or wp_postmeta tables.
  • New administrator accounts, modified user roles, or unexplained plugin installations following contributor activity.
  • Outbound requests from visitor browsers to unfamiliar domains after loading pages that use the plugin's Sticky Section widget.

Detection Strategies

  • Audit posts, pages, and Elementor templates authored by contributor-level accounts for embedded HTML or JavaScript inside widget attributes.
  • Search the database for markup patterns such as <script, onerror=, or onload= within postmeta values tied to wpr- widgets.
  • Review web server access logs for anomalous requests to pages containing the affected widgets, particularly high-volume access from a single source.

Monitoring Recommendations

  • Alert on contributor or author accounts that create or edit content using Royal Elementor widgets, especially outside normal working hours.
  • Monitor WordPress role changes and administrator account creation events using audit logging plugins or SIEM ingestion.
  • Track plugin version drift across WordPress estates to confirm every installation is on 1.3.972 or later.

How to Mitigate CVE-2024-2798

Immediate Actions Required

  • Update the Royal Elementor Addons and Templates plugin to version 1.3.972 or later on every WordPress instance.
  • Review all contributor, author, and editor accounts and remove any that are unused, unrecognized, or hold more privilege than required.
  • Inspect existing content created with the plugin for stored script payloads and sanitize or delete affected posts.

Patch Information

The vendor addressed the flaw in Royal Elementor Addons and Templates version 1.3.972. The corrective changes to wpr-sticky-section.php are documented in the WordPress plugin change set. Additional detail is available in the Wordfence vulnerability report.

Workarounds

  • Restrict who can hold contributor-level roles and above until the plugin is patched.
  • Disable or uninstall the Royal Elementor Addons and Templates plugin on sites that cannot be updated immediately.
  • Deploy a Web Application Firewall rule that blocks script tags and event handler attributes in POST bodies targeting the WordPress editor endpoints.
bash
# Update the plugin using WP-CLI on affected WordPress installations
wp plugin update royal-elementor-addons --version=1.3.972
wp plugin list --name=royal-elementor-addons --fields=name,status,version

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.