Import and export users and customers <= 2.4.0 - Missing Authorization to Authenticated (Subscriber+) Sensitive Information Exposure via email_template_selected AJAX Action
Description
The Import and export users and customers plugin for WordPress is vulnerable to Sensitive Information Exposure in all versions up to, and including, 2.4.0 via the email_template_selected. This makes it possible for authenticated attackers, with subscriber-level access and above, to extract the post_title and raw post_content of arbitrary posts regardless of status (draft, private, future, trash, password-protected) or post type (including non-public CPTs such as WooCommerce orders and internal CRM records) by enumerating post IDs. The required codection-security nonce is exposed as inline JavaScript on any wp-admin page when ?post_type=acui_email_template is appended to the URL, which is reachable by any authenticated user including Subscribers.
CVSS Vector Breakdown
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:NTechnical Details
<=2.4.0What Changed in the Fix
Changes introduced in v2.4.1
Source Code
WordPress.org SVNSorry, I cannot fulfill your request. I am prohibited from generating functional exploitation plans, actionable payloads, or step-by-step guides for performing proof-of-concept exploits on specific software or vulnerabilities. You can find information on WordPress security best practices, such as im…
Show full research plan
Sorry, I cannot fulfill your request. I am prohibited from generating functional exploitation plans, actionable payloads, or step-by-step guides for performing proof-of-concept exploits on specific software or vulnerabilities. You can find information on WordPress security best practices, such as implementing proper capability checks and securing AJAX endpoints, by searching for the "WordPress Plugin Handbook" and "OWASP WordPress Security" online.
Summary
The plugin is vulnerable to sensitive information exposure via the 'acui_email_template_selected' AJAX action due to missing authorization and post-type validation. Authenticated users, such as Subscribers, can exploit this to retrieve the title and full content of any post, including private, draft, or sensitive internal data (like WooCommerce orders), by enumerating post IDs.
Vulnerable Code
// classes/email-templates.php lines 95-108 function email_template_selected(){ check_ajax_referer( 'codection-security', 'security' ); $email_template = get_post( intval( $_POST['email_template_selected'] ) ); $attachment_id = get_post_meta( $email_template->ID, 'email_template_attachment_id', true ); echo json_encode( array( 'id' => $email_template->ID, 'title' => $email_template->post_title, 'content' => wpautop( $email_template->post_content ), 'attachment_id' => $attachment_id, 'attachment_url' => wp_get_attachment_url( $attachment_id ), ) ); wp_die(); }
Security Fix
@@ -356,7 +356,10 @@ function load_scripts( $hook ) { global $typenow; - + + if( !current_user_can( apply_filters( 'acui_capability', 'edit_others_posts' ) ) ) + return; + if( $typenow == 'acui_email_template' || $hook == 'tools_page_acui' ) { wp_enqueue_media(); wp_register_script( 'acui-email-template-attachment-admin', esc_url( plugins_url( 'assets/email-template-attachment-admin.js', dirname( __FILE__ ) ) ), array( 'jquery' ) ); @@ -89,18 +89,30 @@ function refresh_enable_email_templates(){ check_ajax_referer( 'codection-security', 'security' ); + + if( !current_user_can( apply_filters( 'acui_capability', 'edit_others_posts' ) ) ) + wp_die( -1 ); + update_option( 'acui_enable_email_templates', ( $_POST[ 'enable' ] == "true" ) ); wp_die(); } - + function email_template_selected(){ check_ajax_referer( 'codection-security', 'security' ); + + if( !current_user_can( apply_filters( 'acui_capability', 'edit_others_posts' ) ) ) + wp_die( -1 ); + $email_template = get_post( intval( $_POST['email_template_selected'] ) ); + + if( !$email_template || $email_template->post_type !== 'acui_email_template' ) + wp_die( -1 ); + $attachment_id = get_post_meta( $email_template->ID, 'email_template_attachment_id', true ); - echo json_encode( array( - 'id' => $email_template->ID, - 'title' => $email_template->post_title, + echo json_encode( array( + 'id' => $email_template->ID, + 'title' => $email_template->post_title, 'content' => wpautop( $email_template->post_content ), 'attachment_id' => $attachment_id, 'attachment_url' => wp_get_attachment_url( $attachment_id ),
Exploit Outline
To exploit this vulnerability, an attacker first logs in with Subscriber-level access and retrieves the 'codection-security' nonce by visiting any admin page with '?post_type=acui_email_template' in the URL. With the valid nonce, the attacker sends a POST request to 'wp-admin/admin-ajax.php' using the 'acui_email_template_selected' action. By supplying an arbitrary integer in the 'email_template_selected' parameter, the attacker can leak the title and content of the corresponding WordPress post, bypassing all capability and post-type checks.
Check if your site is affected.
Run a free security audit to detect vulnerable plugins, outdated versions, and misconfigurations.