AI Workflow Automation <= 1.4.2 - Missing Authorization
Description
The AI Workflow Automation plugin for WordPress is vulnerable to unauthorized access due to a missing capability check on a function in versions up to, and including, 1.4.2. 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.4.2Since source files for **AI Workflow Automation (lite) <= 1.4.2** were not provided in the prompt, this plan is designed to guide the agent through **Discovery** followed by **Exploitation**. The plan uses the description "Missing Authorization" and the plugin's purpose (AI automation) to target lik…
Show full research plan
Since source files for AI Workflow Automation (lite) <= 1.4.2 were not provided in the prompt, this plan is designed to guide the agent through Discovery followed by Exploitation. The plan uses the description "Missing Authorization" and the plugin's purpose (AI automation) to target likely vulnerable endpoints.
1. Vulnerability Summary
The AI Workflow Automation plugin fails to implement proper capability checks (authorization) on one or more AJAX or REST API endpoints. This allows an unauthenticated user to trigger actions that should be restricted to administrators, such as executing AI workflows, modifying automation settings, or interacting with external AI APIs using the site's configured credentials.
2. Attack Vector Analysis
- Endpoint: Likely
wp-admin/admin-ajax.php(viawp_ajax_nopriv_*hooks) or a REST API route registered viaregister_rest_route. - Authentication: Unauthenticated (No privileges required).
- Action: The "unauthorized action" typically involves triggering a workflow, testing an API connection, or saving a configuration.
- Preconditions: The plugin must be active. Some actions may require an API key (e.g., OpenAI) to be already configured in the settings for the exploit to produce a visible side effect.
3. Code Flow (Inferred Discovery Path)
The agent must first identify the specific vulnerable entry point:
- Entry Point Discovery: The agent will search for
wp_ajax_noprivhooks in the plugin directory.grep -rn "wp_ajax_nopriv" wp-content/plugins/ai-workflow-automation-lite/
- Capability Check Audit: For every identified handler, the agent will check if
current_user_can()is called. - Vulnerable Path:
- Request:
POST /wp-admin/admin-ajax.phpwithaction=[vulnerable_action]. - Sink: A function that performs a sensitive operation (e.g.,
update_option,wp_remote_postto an AI service, or database modification) without verifying the user's identity.
- Request:
4. Nonce Acquisition Strategy
If the identified endpoint uses check_ajax_referer or wp_verify_nonce, the agent must find where that nonce is leaked.
- Identify Nonce Action: Look for the string used in
wp_create_nonceorcheck_ajax_refererwithin the plugin code. - Locate Localization: Search for
wp_localize_scriptto see where the nonce is passed to the frontend.- Grep:
grep -rn "wp_localize_script" wp-content/plugins/ai-workflow-automation-lite/
- Grep:
- Create Trigger Page: If the script (and nonce) only loads on specific pages (e.g., where a workflow is displayed), create a post with the plugin's shortcode.
- Shortcode Discovery:
grep -rn "add_shortcode" wp-content/plugins/ai-workflow-automation-lite/ - Action:
wp post create --post_type=page --post_status=publish --post_content='[ai_workflow_shortcode]'(inferred shortcode).
- Shortcode Discovery:
- Extract via Browser:
- Navigate to the new page.
browser_eval("window.ai_workflow_obj?.nonce")(inferred JS variable).
5. Exploitation Strategy
Based on common vulnerabilities in "Workflow" plugins, we will target two likely scenarios: Unauthorized Workflow Triggering or Settings Modification.
Scenario A: Unauthorized Workflow Execution (Inferred)
- Identify Action: Assume the action is
ai_workflow_execute_step(inferred). - Construct Payload:
- URL:
http://localhost:8080/wp-admin/admin-ajax.php - Method:
POST - Body (URL Encoded):
action=ai_workflow_execute_step& workflow_id=1& prompt=Say+this+is+a+test& nonce=[EXTRACTED_NONCE]
- URL:
- Execute: Use
http_request.
Scenario B: Unauthorized Settings Update (Inferred)
- Identify Action: Assume the action is
ai_workflow_save_settings(inferred). - Construct Payload:
- URL:
http://localhost:8080/wp-admin/admin-ajax.php - Body (URL Encoded):
action=ai_workflow_save_settings& openai_api_key=MALICIOUS_KEY& nonce=[EXTRACTED_NONCE]
- URL:
6. Test Data Setup
- Install Plugin: Ensure
ai-workflow-automation-liteversion 1.4.2 is installed. - Configure Admin Setting: (Optional) Use WP-CLI to set a dummy API key so the "Missing Authorization" can be tested against a real functional path.
wp option update ai_workflow_openai_key "sk-valid-format-dummy-key"
- Create a Workflow: If the plugin requires an existing workflow to trigger, create one via the admin UI or database.
7. Expected Results
- Success Criteria: The server returns a
200 OKresponse with a JSON body indicating success (e.g.,{"success": true}) despite the request being unauthenticated. - Side Effects:
- If Scenario A: The AI service is contacted (check logs) or a result is returned.
- If Scenario B: The plugin settings in the
wp_optionstable are updated.
8. Verification Steps
- Check Options: Use WP-CLI to verify if the unauthorized user successfully changed a setting.
wp option get ai_workflow_openai_key
- Check Logs: Examine the plugin's own execution logs if they exist.
wp db query "SELECT * FROM wp_posts WHERE post_type='ai_workflow_log' ORDER BY ID DESC LIMIT 1;"(inferred table/post type).
9. Alternative Approaches
- REST API Check: If no
wp_ajax_noprivhooks are found, auditregister_rest_routecalls. Check if thepermission_callbackis missing, returnstrue, or uses a weak check likeis_user_logged_in()(which would still be a vulnerability if it allows Contributor to do Admin tasks, but the CVE suggests unauthenticated). - Init/Admin_Init Hook: Check if the plugin processes
$_POSTdata directly inside a function hooked toinit.grep -rn "add_action.*init" wp-content/plugins/ai-workflow-automation-lite/followed by a search for$_POSTor$_REQUEST.
Summary
The AI Workflow Automation plugin for WordPress is vulnerable to unauthorized access in versions up to 1.4.2 due to missing capability checks on its backend handlers. This allows unauthenticated attackers to perform administrative actions, such as triggering AI workflows or modifying plugin configurations, by interacting with vulnerable AJAX or REST API endpoints.
Exploit Outline
The exploit targets unauthenticated AJAX actions or REST API routes that lack proper authorization (capability checks). An attacker first identifies the vulnerable action, typically registered via `wp_ajax_nopriv_*` hooks. If the endpoint is protected by a nonce, the attacker extracts it from the site's frontend where the plugin localizes script data. Finally, a POST request is sent to `/wp-admin/admin-ajax.php` with the targeted `action` and malicious parameters, such as updated settings or workflow execution commands, allowing the attacker to perform administrative tasks without authentication.
Check if your site is affected.
Run a free security audit to detect vulnerable plugins, outdated versions, and misconfigurations.