WaMate Confirm <= 2.0.1 - Missing Authorization to Authenticated (Subscriber+) Arbitrary Phone Number Blocking/Unblocking
Description
The WaMate Confirm – Order Confirmation plugin for WordPress is vulnerable to unauthorized access in all versions up to, and including, 2.0.1. This is due to the plugin not properly verifying that a user is authorized to perform an action. This makes it possible for authenticated attackers, with subscriber-level access and above, to block and unblock phone numbers, which should be restricted to administrators.
CVSS Vector Breakdown
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:NTechnical Details
<=2.0.1This research plan outlines the steps required to analyze and exploit the Missing Authorization vulnerability in the **WaMate Confirm – Order Confirmation** plugin. ### 1. Vulnerability Summary The **WaMate Confirm – Order Confirmation** plugin (up to version 2.0.1) contains a vulnerability where a…
Show full research plan
This research plan outlines the steps required to analyze and exploit the Missing Authorization vulnerability in the WaMate Confirm – Order Confirmation plugin.
1. Vulnerability Summary
The WaMate Confirm – Order Confirmation plugin (up to version 2.0.1) contains a vulnerability where authenticated users with Subscriber-level permissions or higher can block and unblock arbitrary phone numbers. This is caused by an AJAX handler that fails to verify the user's capabilities (e.g., current_user_can('manage_options')) before modifying the plugin's blocklist.
2. Attack Vector Analysis
- Endpoint:
/wp-admin/admin-ajax.php - Authentication: Authenticated (Subscriber+)
- Vulnerable Action(s): Likely
wamate_confirm_block_phoneandwamate_confirm_unblock_phone(inferred from plugin functionality). - Parameters:
action: The AJAX action name.phone: The phone number to block/unblock._ajax_nonceornonce: A CSRF token.
- Precondition: The attacker must have a valid Subscriber-level account and a valid nonce for the specific action.
3. Code Flow (Inferred)
- Registration: The plugin registers AJAX actions in its initialization phase:
// Inferred registration pattern add_action( 'wp_ajax_wamate_confirm_block_number', array( $this, 'block_number_callback' ) ); add_action( 'wp_ajax_wamate_confirm_unblock_number', array( $this, 'unblock_number_callback' ) ); - Handler Execution: The handler function (e.g.,
block_number_callback) is called. - Missing Check: The handler likely calls
check_ajax_referer()(verifying the nonce) but omitscurrent_user_can(). - Database/Option Update: The handler updates a plugin setting (likely in
wp_options) that contains the array of blocked phone numbers.
4. Nonce Acquisition Strategy
Even though the functionality is intended for administrators, WordPress nonces for admin-side AJAX are often exposed to all users who can access the WordPress dashboard (/wp-admin/), including Subscribers.
- Identify Localization: Look for
wp_localize_scriptin the plugin source to find the variable name holding the nonce.- Grep Command:
grep -rn "wp_localize_script" .
- Grep Command:
- Create Test Page (if needed): If the script is only loaded on specific admin pages, a Subscriber might be able to find it on the main dashboard if it's enqueued globally.
- Extraction via Browser:
- Login as Subscriber.
- Navigate to
/wp-admin/. - Use
browser_evalto extract the nonce. - Hypothetical JS:
window.wamate_confirm_admin?.nonce(Verify exact name during research).
5. Exploitation Strategy
Once the Subscriber credentials and nonce are obtained:
- Identify exact action and parameters:
- Search the codebase for the string "block" in relation to
wp_ajax. - Grep Command:
grep -r "wp_ajax_.*block" .
- Search the codebase for the string "block" in relation to
- Craft the Payload:
- Method: POST
- URL:
https://<target>/wp-admin/admin-ajax.php - Content-Type:
application/x-www-form-urlencoded - Body:
action=<ACTION_NAME>&phone=1234567890&_ajax_nonce=<NONCE>
- Execute Request: Use the
http_requesttool.
6. Test Data Setup
- Install WaMate Confirm – Order Confirmation <= 2.0.1.
- Create a Subscriber user:
wp user create attacker attacker@example.com --role=subscriber --user_pass=password123. - Identify where the blocklist is stored (e.g., a specific option name like
wamate_confirm_blocklist).
7. Expected Results
- The server should return a successful response (e.g.,
{"success":true}or1). - The provided phone number should be added to or removed from the plugin's blocked numbers list.
- Administrative users should now see the number as "Blocked" in the plugin settings UI.
8. Verification Steps
After sending the exploit request, verify the change using WP-CLI:
- Check the relevant WordPress option:
wp option get wamate_confirm_settings(or the specific option name found during research). - Verify the phone number exists within the data structure.
- Check the UI as an admin to confirm the number appears in the "Blocked Numbers" section.
9. Alternative Approaches
If the Subscriber cannot access the nonce via the standard dashboard:
- Check if the plugin enqueues the script on the login page or frontend pages.
- Check if the nonce is generated using a generic action like
-1orwp_rest, which might be accessible via other endpoints. - Check for REST API endpoints (
/wp-json/) that might mirror the AJAX functionality and lackpermission_callback.
Check if your site is affected.
Run a free security audit to detect vulnerable plugins, outdated versions, and misconfigurations.