CVE-2026-57362

WPBot – AI ChatBot for Live Support, Lead Generation, AI Services <= 8.3.2 - Reflected Cross-Site Scripting

mediumImproper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
6.1
CVSS Score
6.1
CVSS Score
medium
Severity
8.3.3
Patched in
7d
Time to patch

Description

The WPBot – AI ChatBot for Live Support, Lead Generation, AI Services plugin for WordPress is vulnerable to Reflected Cross-Site Scripting in versions up to, and including, 8.3.2 due to insufficient input sanitization and output escaping. This makes it possible for unauthenticated attackers to inject arbitrary web scripts in pages that execute if they can successfully trick a user into performing an action such as clicking on a link.

CVSS Vector Breakdown

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Changed
Low
Confidentiality
Low
Integrity
None
Availability

Technical Details

Affected versions<=8.3.2
PublishedJuly 1, 2026
Last updatedJuly 7, 2026
Affected pluginchatbot

What Changed in the Fix

Changes introduced in v8.3.3

Loading patch diff...

Source Code

WordPress.org SVN
Research Plan
Unverified

# Exploitation Research Plan - CVE-2026-57362 (WPBot Reflected XSS) ## 1. Vulnerability Summary The **WPBot** plugin for WordPress (versions <= 8.3.2) is vulnerable to **Reflected Cross-Site Scripting (XSS)**. The vulnerability exists in the ChatBot's frontend message handling logic within `js/qcld…

Show full research plan

Exploitation Research Plan - CVE-2026-57362 (WPBot Reflected XSS)

1. Vulnerability Summary

The WPBot plugin for WordPress (versions <= 8.3.2) is vulnerable to Reflected Cross-Site Scripting (XSS). The vulnerability exists in the ChatBot's frontend message handling logic within js/qcld-wp-chatbot-plugin.js. Specifically, the plugin takes user-supplied input from URL parameters (like wp_chatbot_msg or ask_wp_chatbot) and passes it to the ChatBot to be displayed as a "pre-query" or automated message.

The JavaScript function wpwMsg.single (and related functions like single_nobg) processes these messages using an inadequate security filter oncommand_filter and then injects the result into the DOM using the dangerous .html() sink. Because the filter only attempts to strip a single HTML event handler and does not account for script tags or multiple attributes, unauthenticated attackers can execute arbitrary JavaScript in the context of a user's session by tricking them into clicking a crafted link.

2. Attack Vector Analysis

  • Endpoint: WordPress Frontend (any page where the ChatBot is active, typically the homepage).
  • Vulnerable Parameter: wp_chatbot_msg (or ask_wp_chatbot depending on configuration).
  • Authentication: None (Unauthenticated).
  • Preconditions: The WPBot ChatBot must be enabled and not hidden via settings (e.g., disable_wp_chatbot must not be 1).
  • Payload Type: HTML/JavaScript injection via GET parameter.

3. Code Flow

  1. Entry Point (PHP): The plugin checks for specific query parameters in the URL during initialization. It localizes this data for use in JavaScript using wp_localize_script(), often storing the reflected parameter in a global JS object (usually wp_chatbot_obj).
  2. Localization (PHP): In the main plugin file (e.g., qcld-wpwbot.php), the wp_chatbot_msg parameter is likely assigned to the pre_query key of the wp_chatbot_obj without sufficient sanitization.
  3. Initialization (JS): Upon page load, js/qcld-wp-chatbot-plugin.js reads globalwpw.settings.obj.pre_query.
  4. Message Processing (JS): If a pre-query exists, the JS calls wpwMsg.single(msg).
  5. Weak Filter (JS): Inside wpwMsg.single, the input is passed to oncommand_filter:
    oncommand_filter:function(msg){
        var str = msg;
        if(typeof(str) === 'string'){
            // VULNERABILITY: Only matches the FIRST 'on...=' pattern and replaces it once
            replace = str.match(/on[a-z]+=/);
            str = str.replace( replace, "" );
        }
        return str;
    },
    
  6. SINK (JS): The filtered (but still dangerous) string is passed to jQuery's .html() method:
    $(globalwpw.settings.messageLastChild+' .wp-chatbot-paragraph').html( 
        '<div class="wp-chatbot-textanimation">' + oncommand_filter + '</div>'
    );
    

4. Nonce Acquisition Strategy

This specific Reflected XSS vulnerability typically occurs during the initial page load or via immediate JS execution of "pre-filled" bot queries. As such, it does not require a nonce to trigger the initial reflection into the ChatBot UI.

If the exploitation required an AJAX call (e.g., to the search endpoint), the strategy would be:

  1. Navigate to the homepage where WPBot is active.
  2. Use browser_eval to extract the nonce from the localized script object:
    • browser_eval("window.wp_chatbot_obj?.nonce")
    • OR browser_eval("window.qcld_gemini_admin_data?.ajax_nonce") (from qcld-bot-gemini.php).

5. Exploitation Strategy

The goal is to provide a URL that, when clicked, injects an XSS payload into the ChatBot's message display logic.

Exploit Steps:

  1. Target URL Construction:

    • URL: http://vulnerable-wp.local/
    • Parameter: wp_chatbot_msg
    • Payload: <img src=x onerror=alert(document.domain)> (This bypasses the oncommand_filter because the filter only removes the first on...= it finds, and we can easily obfuscate or use tags the filter ignores entirely, like <script>).
  2. Request Execution:
    Use the http_request tool to simulate a user clicking the link.

    • Method: GET
    • URL: http://vulnerable-wp.local/?wp_chatbot_msg=<script>alert(window.origin)</script>
  3. Payload Analysis:

    • The oncommand_filter regex /on[a-z]+=/ does not match <script>.
    • The string passes through unchanged.
    • The JS executes .html('<div...><script>alert(window.origin)</script></div>').
    • The browser executes the script.

6. Test Data Setup

  1. Plugin Activation: Install and activate chatbot plugin version 8.3.2.
  2. Default Settings: Ensure the ChatBot is active.
    • `wp option update disable

Check if your site is affected.

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