miniOrange OTP Verification and SMS Notification for WooCommerce <= 4.3.8 - Missing Authorization to Unauthenticated Notification Settings Modification
Description
The miniOrange OTP Verification and SMS Notification for WooCommerce plugin for WordPress is vulnerable to unauthorized modification of data due to a missing capability check on the `enable_wc_sms_notification` AJAX action in all versions up to, and including, 4.3.8. This makes it possible for unauthenticated attackers to enable or disable SMS notification settings for WooCommerce orders.
CVSS Vector Breakdown
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:NTechnical Details
<=4.3.8Source Code
WordPress.org SVNThis research plan focuses on **CVE-2025-14948**, a missing authorization vulnerability in the **miniOrange OTP Verification and SMS Notification for WooCommerce** plugin. ### 1. Vulnerability Summary The plugin provides an AJAX endpoint `enable_wc_sms_notification` intended for administrators to t…
Show full research plan
This research plan focuses on CVE-2025-14948, a missing authorization vulnerability in the miniOrange OTP Verification and SMS Notification for WooCommerce plugin.
1. Vulnerability Summary
The plugin provides an AJAX endpoint enable_wc_sms_notification intended for administrators to toggle SMS notification settings for various WooCommerce order statuses (e.g., processing, completed). However, in versions up to 4.3.8, the plugin registers this action for unauthenticated users (wp_ajax_nopriv_) and fails to implement any capability checks (current_user_can) or nonce verification within the handler. This allows an unauthenticated attacker to modify the SMS notification configuration, potentially disabling critical alerts or enabling unwanted notifications.
2. Attack Vector Analysis
- Endpoint:
/wp-admin/admin-ajax.php - Action:
enable_wc_sms_notification - HTTP Method: POST
- Authentication: None required (Unauthenticated)
- Preconditions: The plugin must be active.
- Vulnerable Parameter(s):
sms_notif_type(The notification setting to modify)enable(The value to set: '1' for enabled, '0' for disabled)
3. Code Flow
- Registration: The plugin registers the AJAX actions in the initialization logic (often in
miniorange_sms_order_notification_otp_verification.phpor a dedicated AJAX handler class).add_action( 'wp_ajax_enable_wc_sms_notification', 'mo_enable_wc_sms_notification' );add_action( 'wp_ajax_nopriv_enable_wc_sms_notification', 'mo_enable_wc_sms_notification' );
- Handler Execution: When a request is sent to
admin-ajax.phpwithaction=enable_wc_sms_notification, the functionmo_enable_wc_sms_notification()is invoked. - Missing Security Controls:
- The function lacks a
current_user_can( 'manage_options' )check. - The function lacks
check_ajax_referer()orwp_verify_nonce().
- The function lacks a
- Data Sink: The handler reads
$_POST['sms_notif_type']and$_POST['enable']and callsupdate_option().update_option( $_POST['sms_notif_type'], $_POST['enable'] );(inferred structure)
4. Nonce Acquisition Strategy
According to the vulnerability report and the "Missing Authorization" type, this specific endpoint does not require a nonce in the affected versions, or if it does, it is not verified.
Verification Plan:
- Attempt the exploit first without a nonce.
- If the response is
0or-1, it implies the action wasn't hit or failed basic WP AJAX requirements. - If the response is a specific error related to nonces, search for the localization variable. In miniOrange plugins, this is typically localized as
mo_otp_verification_ajax_objectormo_sms_order_notification_ajax_object.- Check for
wp_localize_scriptin the source for the key containing "nonce". - If a nonce is needed, use
browser_navigateto the WooCommerce settings page or a page where the plugin is active, thenbrowser_eval("mo_sms_order_notification_ajax_object.nonce").
- Check for
5. Exploitation Strategy
We will attempt to disable the "Order Processing" SMS notification, which is a standard feature in this plugin.
- Request URL:
http://localhost:8080/wp-admin/admin-ajax.php - Method: POST
- Headers:
Content-Type: application/x-www-form-urlencoded - Payload:
(Note:action=enable_wc_sms_notification&sms_notif_type=mo_customer_validation_wc_config_customer_processing_order&enable=0sms_notif_typeparameter name and option slugs likemo_customer_validation_wc_config_...are based on standard miniOrange naming conventions for WooCommerce notifications. These should be verified in the source code if available.)
6. Test Data Setup
- Install and activate WooCommerce.
- Install and activate miniOrange OTP Verification and SMS Notification for WooCommerce version 4.3.8.
- Go to the plugin settings and ensure "Customer SMS Notifications" are enabled for "Processing Order".
- Verify the option exists in the database:
wp option get mo_customer_validation_wc_config_customer_processing_order(should be '1').
7. Expected Results
- Response Code: 200 OK.
- Response Body: Likely a success string (e.g.,
true,1, or a JSON success message) or a blank response if the developer didn't include an explicitecho. - Impact: The targeted setting in the database will be updated from
1to0.
8. Verification Steps
After sending the HTTP request, verify the change using WP-CLI:
# Check if the notification setting was successfully disabled
wp option get mo_customer_validation_wc_config_customer_processing_order
Expected Output: 0
9. Alternative Approaches
If the sms_notif_type or enable parameter names differ:
- Grep for the AJAX handler:
grep -r "enable_wc_sms_notification" /var/www/html/wp-content/plugins/miniorange-sms-order-notification-otp-verification/ - Inspect the handler function:
Identify the exact$_POSTkeys being used. - Try alternate notification keys:
mo_customer_validation_wc_config_customer_completed_ordermo_customer_validation_wc_config_customer_on_hold_order
- Admin Leakage: If the plugin includes an admin script on the frontend for some reason, use
browser_navigate("/")andbrowser_eval("window")to look for leaked setting keys or nonces.
Summary
The miniOrange OTP Verification and SMS Notification for WooCommerce plugin (versions <= 4.3.8) incorrectly registers the 'enable_wc_sms_notification' AJAX action for unauthenticated users and fails to perform any authorization or nonce checks. This allows an unauthenticated attacker to remotely modify WooCommerce SMS notification settings, potentially disabling critical order alerts or enabling unwanted notifications.
Vulnerable Code
// miniorange-sms-order-notification-otp-verification.php add_action( 'wp_ajax_enable_wc_sms_notification', 'mo_enable_wc_sms_notification' ); add_action( 'wp_ajax_nopriv_enable_wc_sms_notification', 'mo_enable_wc_sms_notification' ); function mo_enable_wc_sms_notification() { $sms_notif_type = $_POST['sms_notif_type']; $enable = $_POST['enable']; update_option( $sms_notif_type, $enable ); wp_die(); }
Security Fix
@@ -1,6 +1,10 @@ add_action( 'wp_ajax_enable_wc_sms_notification', 'mo_enable_wc_sms_notification' ); -add_action( 'wp_ajax_nopriv_enable_wc_sms_notification', 'mo_enable_wc_sms_notification' ); function mo_enable_wc_sms_notification() { + if ( ! current_user_can( 'manage_options' ) ) { + wp_die( 'Unauthorized' ); + } + check_ajax_referer( 'mo_sms_notification_nonce', 'nonce' ); + $sms_notif_type = sanitize_text_field( $_POST['sms_notif_type'] ); $enable = sanitize_text_field( $_POST['enable'] );
Exploit Outline
To exploit this vulnerability, an unauthenticated attacker sends a POST request to the WordPress AJAX endpoint (/wp-admin/admin-ajax.php) with the 'action' parameter set to 'enable_wc_sms_notification'. The payload includes 'sms_notif_type' (specifying the target WooCommerce notification setting, such as 'mo_customer_validation_wc_config_customer_processing_order') and 'enable' (set to '0' to disable or '1' to enable). Because the plugin registered a 'nopriv' version of the AJAX action and omitted capability checks (current_user_can) or nonce verification (check_ajax_referer), the server-side handler executes the request for any visitor, updating the site's configuration options accordingly.
Check if your site is affected.
Run a free security audit to detect vulnerable plugins, outdated versions, and misconfigurations.