WPBot – AI ChatBot for Live Support, Lead Generation, AI Services <= 8.3.2 - Reflected Cross-Site Scripting
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:NTechnical Details
What Changed in the Fix
Changes introduced in v8.3.3
Source Code
WordPress.org SVN# 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(orask_wp_chatbotdepending on configuration). - Authentication: None (Unauthenticated).
- Preconditions: The WPBot ChatBot must be enabled and not hidden via settings (e.g.,
disable_wp_chatbotmust not be1). - Payload Type: HTML/JavaScript injection via GET parameter.
3. Code Flow
- 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 (usuallywp_chatbot_obj). - Localization (PHP): In the main plugin file (e.g.,
qcld-wpwbot.php), thewp_chatbot_msgparameter is likely assigned to thepre_querykey of thewp_chatbot_objwithout sufficient sanitization. - Initialization (JS): Upon page load,
js/qcld-wp-chatbot-plugin.jsreadsglobalwpw.settings.obj.pre_query. - Message Processing (JS): If a pre-query exists, the JS calls
wpwMsg.single(msg). - Weak Filter (JS): Inside
wpwMsg.single, the input is passed tooncommand_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; }, - 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:
- Navigate to the homepage where WPBot is active.
- Use
browser_evalto 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")(fromqcld-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:
Target URL Construction:
- URL:
http://vulnerable-wp.local/ - Parameter:
wp_chatbot_msg - Payload:
<img src=x onerror=alert(document.domain)>(This bypasses theoncommand_filterbecause the filter only removes the firston...=it finds, and we can easily obfuscate or use tags the filter ignores entirely, like<script>).
- URL:
Request Execution:
Use thehttp_requesttool to simulate a user clicking the link.- Method:
GET - URL:
http://vulnerable-wp.local/?wp_chatbot_msg=<script>alert(window.origin)</script>
- Method:
Payload Analysis:
- The
oncommand_filterregex/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.
- The
6. Test Data Setup
- Plugin Activation: Install and activate
chatbotplugin version 8.3.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.