iGMS Direct Booking <= 1.3 - Missing Authorization
Description
The iGMS Direct Booking plugin for WordPress is vulnerable to unauthorized access due to a missing capability check on a function in versions up to, and including, 1.3. 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.3This research plan outlines the steps to identify and exploit the Missing Authorization vulnerability (CVE-2026-39652) in the iGMS Direct Booking plugin. ### 1. Vulnerability Summary The iGMS Direct Booking plugin (up to version 1.3) suffers from a **Missing Authorization** vulnerability. This occu…
Show full research plan
This research plan outlines the steps to identify and exploit the Missing Authorization vulnerability (CVE-2026-39652) in the iGMS Direct Booking plugin.
1. Vulnerability Summary
The iGMS Direct Booking plugin (up to version 1.3) suffers from a Missing Authorization vulnerability. This occurs when an administrative or sensitive function is registered via a WordPress hook (typically AJAX or a general initialization hook) but fails to verify if the requesting user has the necessary privileges (e.g., current_user_can('manage_options')). Because it may also be registered via wp_ajax_nopriv_, unauthenticated attackers can trigger these functions to perform unauthorized actions such as modifying plugin settings or manipulating booking data.
2. Attack Vector Analysis
- Endpoint:
/wp-admin/admin-ajax.php - Vulnerable Action: To be identified, but likely an AJAX action registered with
wp_ajax_nopriv_prefix. - Payload Parameter: Likely a
$_POSTarray containing settings or configuration data. - Authentication: None required (Unauthenticated).
- Preconditions: The plugin must be active. If a nonce is required, it must be leaked via the frontend.
3. Code Flow (Inferred Audit Path)
- Entry Point Identification: The plugin registers AJAX handlers in its main file or an inclusion file (e.g.,
includes/class-igms-db-ajax.phpor similar).- Grep Command:
grep -rn "wp_ajax_nopriv_" wp-content/plugins/igms-direct-booking/
- Grep Command:
- Handler Analysis: For every unauthenticated AJAX action found, locate the callback function.
- Search Pattern:
add_action( 'wp_ajax_nopriv_[ACTION_NAME]', [ $this, '[FUNCTION_NAME]' ] );
- Search Pattern:
- Authorization Check Audit: Inspect the identified
[FUNCTION_NAME]for a call tocurrent_user_can(). If the function modifies options or database state and lacks this check, it is vulnerable.- Critical Sinks:
update_option(),wp_insert_post(),$wpdb->insert(),$wpdb->update().
- Critical Sinks:
4. Nonce Acquisition Strategy
If the vulnerable function uses check_ajax_referer() or wp_verify_nonce(), follow this strategy:
- Locate Nonce Creation: Search for
wp_create_noncein the plugin source to find the action string.- Grep:
grep -rn "wp_create_nonce" wp-content/plugins/igms-direct-booking/
- Grep:
- Locate Localization: Find where this nonce is passed to the frontend.
- Search:
wp_localize_script( ... )
- Search:
- Identify Trigger: Determine which shortcode or page enqueues the script containing the nonce. Look for
add_shortcodein the source.- Shortcode Example (Inferred):
[igms_booking_form]
- Shortcode Example (Inferred):
- Extraction:
- Create a page:
wp post create --post_type=page --post_status=publish --post_content='[igms_booking_form]' - Navigate to the page using
browser_navigate. - Extract the nonce using
browser_eval:// Example JS path based on typical localization window.igms_booking_data?.nonce || window.igms_vars?.ajax_nonce
- Create a page:
5. Exploitation Strategy
Once the vulnerable action and required parameters are identified:
- Identify Parameters: Look for the keys in
$_POSTused by the vulnerable function (e.g.,igms_settings,api_key,property_id). - Craft Request: Use the
http_requesttool to send a POST request.- URL:
http://localhost:8080/wp-admin/admin-ajax.php - Method:
POST - Headers:
Content-Type: application/x-www-form-urlencoded - Body:
action=[VULNERABLE_ACTION]&_ajax_nonce=[NONCE]&[PARAM]=[VALUE]
- URL:
- Example Target (Hypothetical):
If the action isigms_save_configand it updates theigms_api_keyoption:action=igms_save_config&api_key=EVIL_KEY_123&nonce=[EXTRACTED_NONCE]
6. Test Data Setup
- Install Plugin: Ensure iGMS Direct Booking v1.3 is installed and active.
- Identify Shortcodes: List shortcodes to find a candidate for nonce leakage:
grep -rn "add_shortcode" wp-content/plugins/igms-direct-booking/
- Create Test Page:
wp post create --post_type=page --post_title="Booking" --post_status=publish --post_content='[SHORTCODE_FOUND]'
7. Expected Results
- Success Indicator: The server returns a
200 OKresponse, often with a JSON body indicating success (e.g.,{"success": true}). - Data Impact: Plugin settings are modified, or a new booking record is created without valid user credentials.
8. Verification Steps
After sending the exploit request, verify the change using WP-CLI:
- Check Options: If the exploit modified settings:
wp option get igms_settings(Verify if values match the payload).
- Check Database: If the exploit created data:
wp db query "SELECT * FROM wp_options WHERE option_name LIKE 'igms_%'"wp post list --post_type=igms_booking(if bookings are CPTs).
9. Alternative Approaches
- Initialization Hooks: If no unauthenticated AJAX is found, check for
admin_initorinithooks that process$_POSTwithout capability checks.- Search:
grep -rn "add_action( 'admin_init'" wp-content/plugins/igms-direct-booking/
- Search:
- Direct Option Update: If the plugin uses
register_settingincorrectly without a propersanitize_callbackorpermission_callback, it might be possible to update options viaoptions.php(though this usually requires authentication, check fornoprivwrappers). - REST API: Check for registered REST routes that lack the
permission_callbackargument.- Search:
register_rest_routein the plugin directory.
- Search:
Summary
The iGMS Direct Booking plugin for WordPress is vulnerable to unauthorized access in versions up to 1.3 due to a missing capability check on AJAX handlers. This allow unauthenticated attackers to perform sensitive administrative actions, such as updating plugin settings or manipulating booking data, by sending requests to the admin-ajax.php endpoint.
Vulnerable Code
// wp-content/plugins/igms-direct-booking/igms-direct-booking.php (approximate) // Action registered for both authenticated and unauthenticated users add_action( 'wp_ajax_nopriv_igms_save_settings', 'igms_save_settings_callback' ); add_action( 'wp_ajax_igms_save_settings', 'igms_save_settings_callback' ); function igms_save_settings_callback() { // Function lacks a check like current_user_can('manage_options') if ( isset( $_POST['igms_api_key'] ) ) { update_option( 'igms_api_key', sanitize_text_field( $_POST['igms_api_key'] ) ); } wp_send_json_success(); }
Security Fix
@@ -1,10 +1,12 @@ -add_action( 'wp_ajax_nopriv_igms_save_settings', 'igms_save_settings_callback' ); add_action( 'wp_ajax_igms_save_settings', 'igms_save_settings_callback' ); function igms_save_settings_callback() { + if ( ! current_user_can( 'manage_options' ) ) { + wp_die( __( 'You do not have sufficient permissions to access this page.' ) ); + } + + check_ajax_referer( 'igms_settings_nonce', 'nonce' ); + if ( isset( $_POST['igms_api_key'] ) ) { update_option( 'igms_api_key', sanitize_text_field( $_POST['igms_api_key'] ) ); }
Exploit Outline
The exploit targets the WordPress AJAX endpoint to perform unauthorized configuration changes. 1. Target Endpoint: /wp-admin/admin-ajax.php 2. Vulnerable Action: Identify an AJAX action registered via wp_ajax_nopriv_ (e.g., igms_save_settings) that handles sensitive plugin options. 3. Nonce Acquisition (if required): Visit a public page containing an iGMS shortcode (like [igms_booking_form]) to extract a localized AJAX nonce from the page source or window object scripts. 4. Payload Delivery: Construct a POST request with the 'action' parameter set to the vulnerable hook, the extracted nonce, and the desired settings values (e.g., a malicious api_key) in the POST body. 5. Authentication: No authentication is required for hooks registered with the 'nopriv' prefix that lack internal capability checks.
Check if your site is affected.
Run a free security audit to detect vulnerable plugins, outdated versions, and misconfigurations.