LifePress <= 2.2.1 - Missing Authorization
Description
The LifePress plugin for WordPress is vulnerable to unauthorized access due to a missing capability check on a function in versions up to, and including, 2.2.1. 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
<=2.2.1Source Code
WordPress.org SVNThis research plan outlines the steps to investigate and exploit a missing authorization vulnerability in the **LifePress** plugin (versions <= 2.2.1). Since source code was not provided, this plan focuses on identifying the specific vulnerable AJAX action and exploiting it to perform an unauthorize…
Show full research plan
This research plan outlines the steps to investigate and exploit a missing authorization vulnerability in the LifePress plugin (versions <= 2.2.1). Since source code was not provided, this plan focuses on identifying the specific vulnerable AJAX action and exploiting it to perform an unauthorized configuration change.
1. Vulnerability Summary
The LifePress plugin fails to implement proper capability checks (e.g., current_user_can( 'manage_options' )) in one or more of its AJAX handlers. While these handlers likely implement nonce verification to prevent CSRF, the lack of a capability check allows any authenticated user (including low-privileged Subscribers) to execute the function. This typically results in the ability to modify plugin settings or delete plugin-managed data.
2. Attack Vector Analysis
- Endpoint:
wp-admin/admin-ajax.php - Vulnerable Action: Likely
lifepress_save_settings,lifepress_update_options, orlifepress_delete_post(inferred). - Payload Parameter:
action,security(ornonce), and the specific data to be modified. - Authentication: Authenticated (Subscriber-level).
- Preconditions: A valid nonce for the specific action must be obtained.
3. Code Flow (Inferred)
- Registration: The plugin registers an AJAX action for authenticated users via
add_action( 'wp_ajax_...' )in a file likeincludes/class-lifepress-admin.phpor the main plugin file. - Entry Point: When a request hits
admin-ajax.phpwith the specified action, WordPress routes it to the plugin's callback function. - Vulnerable Check: The callback function likely calls
check_ajax_referer( 'some-nonce-action', 'security' )but does not follow it withif ( ! current_user_can( 'manage_options' ) ) wp_die();. - Sink: The function then proceeds to update database options using
update_option()or deletes content usingwp_delete_post().
4. Nonce Acquisition Strategy
To exploit the wp_ajax_ hook, a valid nonce is required. The execution agent must first identify the localization key used by the plugin.
- Identify Action and Nonce Key:
Grep the plugin directory for the registration and localization:grep -r "wp_ajax_" . grep -r "wp_localize_script" . - Locate the Hook:
Identify which admin page or shortcode enqueues the script containing the nonce. - Setup Page for Nonce Extraction:
If the nonce is only loaded on admin pages, the Subscriber user might still be able to see it in thewp-admindashboard or via a specific plugin page. If it's loaded via a shortcode:wp post create --post_type=page --post_status=publish --post_title="LifePress Test" --post_content="[lifepress_shortcode]" - Extract via Browser:
Navigate as the Subscriber user and extract the nonce:- Localization Object (Inferred):
lp_settings_paramsorlifepress_vars - JS Key:
nonceorsecurity - Command:
browser_eval("window.lp_settings_params?.nonce")
- Localization Object (Inferred):
5. Exploitation Strategy
Once the action name and nonce are identified, the agent will perform an unauthorized setting update.
Target Action (Example): lifepress_save_settings
Required Parameters:
action:lifepress_save_settings(inferred)security: [EXTRACTED_NONCE]lp_option_name:lp_some_critical_settinglp_option_value:attacker_value
HTTP Request (via http_request tool):
POST /wp-admin/admin-ajax.php HTTP/1.1
Host: localhost:8080
Content-Type: application/x-www-form-urlencoded
Cookie: [SUBSCRIBER_COOKIES]
action=lifepress_save_settings&security=[NONCE]&setting_key=some_option&setting_value=malicious_val
6. Test Data Setup
- Install Plugin: Ensure LifePress version 2.2.1 is installed.
- Create User: Create a subscriber-level user.
wp user create attacker attacker@example.com --role=subscriber --user_pass=password - Initial State: Identify an existing plugin option to modify.
wp option get lp_settings
7. Expected Results
- The
admin-ajax.phprequest should return a200 OKor a success JSON (e.g.,{"success":true}). - The server should NOT return a
403 Forbiddenor a-1(which indicates nonce failure). - The targeted WordPress option in the
wp_optionstable should be updated to the attacker-supplied value.
8. Verification Steps
After the HTTP request, verify the impact using WP-CLI:
# Check if the specific option was changed
wp option get lp_settings
# Or, if it's a metadata-based change
wp post get [POST_ID] --field=post_content
9. Alternative Approaches
If lifepress_save_settings is not the vulnerable action, the agent should:
- Grep for
update_option: Search for functions that update options and are called within AJAX handlers.grep -rn "update_option" . --include="*.php" - Audit AJAX Handlers: Systematically check every function registered to
wp_ajax_and look for the absence ofcurrent_user_can. - Check REST API: If the plugin uses the REST API instead of AJAX, look for
register_rest_routewithout apermission_callbackor one that returnstrue.
If a REST route is found withgrep -rn "register_rest_route" . -A 5'permission_callback' => '__return_true', this is a high-priority target.
Summary
The LifePress plugin for WordPress is vulnerable to unauthorized setting modification in versions up to and including 2.2.1. This is due to missing capability checks in AJAX handlers, allowing authenticated users with Subscriber-level access to perform administrative actions that should be restricted to administrators.
Exploit Outline
1. Authenticate as a Subscriber-level user. 2. Identify the target AJAX action (e.g., 'lifepress_save_settings') by auditing the plugin's wp_ajax hooks. 3. Extract a valid security nonce from the WordPress admin or site front-end by looking for localized scripts (typically containing an object like 'lp_settings_params' or 'lifepress_vars'). 4. Submit a POST request to /wp-admin/admin-ajax.php including the 'action' parameter, the extracted nonce in the security/nonce field, and the malicious configuration data. 5. Verify the unauthorized change by checking the plugin's settings via the WordPress dashboard or WP-CLI.
Check if your site is affected.
Run a free security audit to detect vulnerable plugins, outdated versions, and misconfigurations.