CVE-2024-3734
Executive Summary
CVE-2024-3734 is a critical unauthenticated arbitrary shortcode execution vulnerability in the FOX – Currency Switcher Professional for WooCommerce WordPress plugin (versions up to and including 1.4.1.8). This vulnerability allows any unauthenticated attacker to execute arbitrary WordPress shortcodes, which can lead to data theft, privilege escalation, or site compromise depending on the shortcodes provided by other installed plugins. The vulnerability is classified as a CWE-94: Improper Control of Generation of Code ('Code Injection') and has a CVSS score of 6.5 (Medium). No official patch has been released as of this analysis.
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 commercial WordPress plugin distributed via the FOX plugin marketplace. Since it is not an open-source package (NPM, PyPI, Go, Ruby), supply chain risks are limited to the plugin's update mechanism. Users should verify the integrity of plugin updates by checking checksums provided by the vendor.
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.
- User Interaction (UI): None (N) – No user action required.
- Scope (S): Unchanged (U) – The vulnerable component remains the same.
- Confidentiality (C): Low (L) – Limited data exposure possible.
- Integrity (I): Low (L) – Limited modification possible.
- Availability (A): Low (L) – Limited service disruption possible.
Threat Level: Medium. While the CVSS score is 6.5, the actual impact depends heavily on the WordPress environment. If plugins like wp-config.php backup or user management shortcodes exist, the severity can escalate to critical.
Deep Dive & Mechanics
The vulnerability resides in the woocommerce-currency-switcher plugin's handling of shortcodes. The plugin registers a shortcode (e.g., [woocs]) but fails to sanitize or restrict which shortcodes can be executed via user-supplied input. An unauthenticated attacker can craft a request that passes arbitrary shortcode names to the plugin's processing function, which then executes them without validation.
Root Cause: The plugin uses do_shortcode() on user-controlled input without first checking if the shortcode is allowed. This allows an attacker to execute any registered shortcode, including those from other plugins.
Exploitability: The vulnerability is trivially exploitable via HTTP GET or POST requests. No authentication is required.
Vulnerable vs. Patched Code
Since no patch is available, we compare the vulnerable code to a hypothetical secure implementation.
Vulnerable Code (v1.4.1.8):
// In woocommerce-currency-switcher.php
add_shortcode('woocs', 'woocs_shortcode_handler');
function woocs_shortcode_handler($atts, $content = null) {
// Directly executes user-supplied shortcode without validation
return do_shortcode($content);
}
Patched Code (Hypothetical):
// In woocommerce-currency-switcher.php
add_shortcode('woocs', 'woocs_shortcode_handler');
function woocs_shortcode_handler($atts, $content = null) {
// Whitelist allowed shortcodes
$allowed_shortcodes = array('woocs', 'woocs_converter');
if (in_array($content, $allowed_shortcodes)) {
return do_shortcode($content);
}
return '';
}
Exploitation & Lab Setup
Red Team
Prerequisites:
- A WordPress site with FOX – Currency Switcher Professional <= 1.4.1.8 installed and activated.
- Another plugin that provides a useful shortcode (e.g.,
[user_info]or[wp-config-viewer]).
Exploit Steps:
- Identify the vulnerable endpoint:
http://target.com/?woocs=1&content=[malicious_shortcode] - Craft a payload to execute a shortcode from another plugin, e.g.,
[file_manager]or[admin_ajax]. - Send the request:
curl "http://target.com/?woocs=1&content=[wp-config-viewer]" - If successful, the shortcode output will be displayed in the response.
Example Payload:
curl -X POST "http://target.com/wp-admin/admin-ajax.php" \
-d "action=woocs_ajax&content=[do_shortcode param='wp-config-viewer']"
Blue Team
Detection:
- Monitor for unusual shortcode names in HTTP requests to the plugin's endpoints.
- Look for patterns like
content=[in query strings or POST data.
Hunting:
- Search logs for requests containing
woocsparameter with shortcode syntax. - Use the following Splunk query:
index=web sourcetype=access_combined uri=*woocs* | search "content=["
Lab Setup:
- Install WordPress 6.5 with FOX Currency Switcher 1.4.1.8.
- Install a test plugin that registers a harmless shortcode (e.g.,
[test_shortcode]). - Verify the vulnerability by accessing
http://lab/?woocs=1&content=[test_shortcode].
Indicators of Compromise (IOCs)
Network IOCs:
- HTTP requests containing
woocsparameter with shortcode syntax (e.g.,content=[malicious]). - Unusual shortcode names in POST data to
admin-ajax.phpwithaction=woocs_ajax.
- HTTP requests containing
File IOCs:
- Modified
.htaccessfiles (if shortcode allows file manipulation). - Unexpected files in
wp-content/uploads/(if shortcode allows file upload).
- Modified
Log IOCs:
- Repeated 200 responses to
/?woocs=1&content=...from different IPs. - Error logs showing
do_shortcode()calls with unexpected parameters.
- Repeated 200 responses to
Detection Engineering
YARA Rule
rule CVE_2024_3734_Shortcode_Exploit {
meta:
description = "Detects exploitation attempts of CVE-2024-3734 in FOX Currency Switcher"
author = "Valters IT"
date = "2024-01-01"
reference = "https://nvd.nist.gov/vuln/detail/CVE-2024-3734"
strings:
$shortcode_param = "woocs" nocase
$content_param = "content=" nocase
$shortcode_pattern = /content=\[.*\]/ nocase
condition:
$shortcode_param and $content_param and $shortcode_pattern
}
Sigma Rule
title: CVE-2024-3734 FOX Currency Switcher Shortcode Exploit
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects HTTP requests attempting to exploit CVE-2024-3734 via arbitrary shortcode execution
author: Valters IT
logsource:
category: webserver
product: apache
detection:
selection:
cs-uri-query|contains:
- 'woocs'
- 'content=['
condition: selection
falsepositives:
- Legitimate use of the plugin's shortcode feature (rare)
level: high
Suricata Rule
alert http any any -> any any (
msg:"CVE-2024-3734 FOX Currency Switcher Shortcode Exploit Attempt";
flow:to_server,established;
content:"woocs"; http_uri; nocase;
content:"content=["; http_uri; nocase;
pcre:"/content=\[.*\]/Ui";
classtype:attempted-admin;
sid:1000001;
rev:1;
reference:url,https://nvd.nist.gov/vuln/detail/CVE-2024-3734;
)
Remediation & Mitigation
Immediate Actions:
- Disable the plugin until a patch is released.
- Implement a Web Application Firewall (WAF) rule to block requests containing
woocsandcontent=[patterns. - Restrict shortcode execution by adding a custom filter in
functions.php:add_filter('do_shortcode_tag', function($output, $tag, $attr, $m) { if ($tag === 'woocs') { // Whitelist allowed shortcodes $allowed = array('woocs', 'woocs_converter'); if (!in_array($m[0], $allowed)) { return ''; } } return $output; }, 10, 4);
Long-term Fix:
- Monitor the vendor's website for a patched version (>= 1.4.1.9).
- Consider switching to an alternative currency switcher plugin with better security practices.
Valters IT – Securing digital frontiers, one CVE at a time.
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.