Coinbase Commerce – Crypto Gateway for WooCommerce <= 1.6.6 - Missing Authorization
Description
The Coinbase Commerce – Crypto Gateway 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.6.6. 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.6.6This research plan targets **CVE-2026-25396**, a missing authorization vulnerability in the Coinbase Commerce plugin for WooCommerce. Since source code is not provided, this plan focuses on identifying the specific vulnerable AJAX or `init` handler and exploiting it to perform unauthorized configura…
Show full research plan
This research plan targets CVE-2026-25396, a missing authorization vulnerability in the Coinbase Commerce plugin for WooCommerce. Since source code is not provided, this plan focuses on identifying the specific vulnerable AJAX or init handler and exploiting it to perform unauthorized configuration changes.
1. Vulnerability Summary
The Coinbase Commerce – Crypto Gateway for WooCommerce plugin (<= 1.6.6) fails to implement proper capability checks (e.g., current_user_can('manage_options')) on at least one function exposed via WordPress hooks. This allows unauthenticated attackers (AV:N/AC:L/PR:N) to trigger internal plugin logic. Given the CVSS of 5.3 (Medium), the "unauthorized action" likely involves modifying plugin settings, resetting connection states, or manipulating non-critical metadata.
2. Attack Vector Analysis
- Endpoint:
/wp-admin/admin-ajax.php(most likely) or/wp-admin/admin-post.php. - Vulnerable Action: Likely a
wp_ajax_nopriv_*handler or a function hooked toadmin_initthat lacks acurrent_user_cancheck. - Action Names (Inferred):
coinbase_commerce_save_settingscommerce_coinbase_update_api_keycoinbase_commerce_disconnectcoinbase_commerce_verify_api_key
- Payload: A POST request containing a malicious
actionparameter and configuration values (e.g.,api_key,shared_secret).
3. Code Flow (Inferred)
- Registration: The plugin registers an action:
add_action('wp_ajax_nopriv_ACTION_NAME', 'handler_function'); - Execution: When
admin-ajax.phpis called withaction=ACTION_NAME, WordPress executeshandler_function. - Vulnerability:
handler_functionperforms a sensitive operation (likeupdate_option) without:- Verifying the user has
manage_woocommerceormanage_optionscapabilities. - Verifying a valid CSRF nonce.
- Verifying the user has
- Sink: The input reaches
update_option('woocommerce_commerce-coinbase_settings', ...)or similar.
4. Nonce Acquisition Strategy
If the vulnerable handler requires a nonce (even if it misses the capability check), follow this protocol:
- Identify Script Localization: The plugin likely localizes a nonce via
wp_localize_script. - Locate Triggering Page: Coinbase settings usually appear in WooCommerce > Settings > Payments > Coinbase Commerce. However, if the nonce is intended for unauthenticated use (a
noprivaction), it may appear on the checkout page or a specific product page. - Shortcode Discovery: Use
wp-clito find shortcodes:wp eval "grep -r 'add_shortcode' wp-content/plugins/commerce-coinbase-for-woocommerce/" - Create Test Page:
wp post create --post_type=page --post_status=publish --post_title="Coinbase Test" --post_content="[coinbase_shortcode_found]" - Extract via Browser:
browser_navigate("http://localhost:8080/coinbase-test")browser_eval("window.coinbase_commerce_params?.nonce || window.coinbase_ajax?.nonce")(Inferred JS keys).
5. Exploitation Strategy
The goal is to update the plugin's API key to point to an attacker-controlled Coinbase Commerce account, redirecting payments.
Step 1: Discover Vulnerable Action
The agent must first identify the vulnerable action name by inspecting the plugin source:grep -r "wp_ajax_nopriv" wp-content/plugins/commerce-coinbase-for-woocommerce/
Step 2: Construct the Request
Once the action and parameters are identified (e.g., action=coinbase_save_api and parameter api_key):
- Method: POST
- URL:
http://localhost:8080/wp-admin/admin-ajax.php - Headers:
Content-Type: application/x-www-form-urlencoded - Payload:
action=IDENTIFIED_ACTION&api_key=ATTACKER_KEY&nonce=EXTRACTED_NONCE
6. Test Data Setup
- Install WooCommerce: The plugin requires WooCommerce to be active.
- Configure Gateway: Enable "Coinbase Commerce" in WooCommerce payment settings.
- API Key Initial State: Set a dummy API key (e.g.,
ORIGINAL_KEY_12345) via the UI or WP-CLI:wp option update woocommerce_commerce-coinbase_settings '{"api_key":"ORIGINAL_KEY_12345"}' --format=json
7. Expected Results
- HTTP Response: A
200 OKresponse, potentially returning{"success": true}or1. - State Change: The database option containing the API key is overwritten with the attacker's value.
8. Verification Steps
After sending the exploit request, verify via wp-cli:
# Check if the API key in the options table has changed
wp option get woocommerce_commerce-coinbase_settings --format=json
If the api_key value matches ATTACKER_KEY, the exploitation is successful.
9. Alternative Approaches
If no wp_ajax_nopriv actions are found, check for:
admin_inithooks:grep -r "add_action.*admin_init" wp-content/plugins/commerce-coinbase-for-woocommerce/
Verify if these handlers checkcurrent_user_can.admin_initruns for any request to/wp-admin/admin-ajax.php, even for unauthenticated users.- Direct Setting Updates:
Check if the plugin usesregister_settingwithout a propersanitize_callbackorpermission_callbackin a REST context. - Webhook Handler:
Check if the webhook handler (/wc-api/coinbase_commerce/) can be used to manipulate order statuses without a valid Coinbase signature.
Summary
The Coinbase Commerce – Crypto Gateway for WooCommerce plugin for WordPress is vulnerable to unauthorized access in versions up to 1.6.6 due to missing capability checks on functions hooked to administrative initialization or AJAX handlers. This allows unauthenticated attackers to modify plugin settings, such as the API key, potentially redirecting customer payments to an attacker-controlled account.
Exploit Outline
The exploit targets administrative handlers (likely hooked to admin_init or wp_ajax_nopriv) that perform sensitive operations without checking user permissions or verifying nonces. An attacker sends an unauthenticated POST request to /wp-admin/admin-ajax.php or a similar admin endpoint containing parameters to update the 'woocommerce_commerce-coinbase_settings' option. By providing a malicious 'api_key', the attacker can intercept future cryptocurrency payments made through the store.
Check if your site is affected.
Run a free security audit to detect vulnerable plugins, outdated versions, and misconfigurations.