Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-96561 Overview
CVE-2026-96561 is a Stored Cross-Site Scripting (XSS) vulnerability affecting the AI Engine – The Chatbot, AI Framework & MCP for WordPress plugin in all versions up to and including 3.8.0. The flaw chains a server-parameter denylist bypass, PHP error log poisoning, and indirect prompt injection to store attacker-controlled HTML in the mwai_advisor_data WordPress option. The injected payload executes when an administrator loads the WordPress dashboard. Unauthenticated attackers can trigger the chain over the network through the /mwai-ui/v1/chats/submit REST endpoint.
Critical Impact
Unauthenticated remote attackers can inject arbitrary JavaScript that executes in the context of an authenticated WordPress administrator session, enabling account takeover and site compromise.
Affected Products
- AI Engine – The Chatbot, AI Framework & MCP for WordPress plugin, versions up to and including 3.8.0
- Fixed in version 3.8.1
- Vulnerable code paths in classes/modules/chatbot.php, classes/modules/advisor.php, classes/rest.php, and common/helpers.php
Discovery Timeline
- 2026-10-01 - CVE-2026-96561 published to NVD
- 2026-10-01 - Last updated in NVD database
Technical Details for CVE-2026-96561
Vulnerability Analysis
The vulnerability is a multi-stage Stored XSS chain classified under [CWE-79]. It originates in the unauthenticated REST endpoint /mwai-ui/v1/chats/submit. The handler enforces a server-parameter denylist that strips exact key names such as model. A later call to convert_keys() canonicalizes variants like model_ back to model, reinstating attacker-controlled data into $query->model.
When final_checks() rejects the query, it throws an Exception whose message embeds the raw attacker string, including CR/LF characters. The non-streaming, non-admin catch branch writes the message to the PHP error log without neutralization. This produces a forged log entry that the plugin's own parser, MeowKit_MWAI_Helpers::php_error_logs, later returns as recent error content.
Root Cause
The root cause is missing input neutralization combined with absent output escaping across the data flow. The denylist operates on exact keys while the canonicalization step reintroduces aliased keys. No schema validation or HTML sanitization is applied before storing the Advisor response in the mwai_advisor_data option. The advisor_metabox() function then concatenates the stored title and description fields directly into the dashboard widget markup without esc_html(), wp_kses(), or equivalent escaping.
Attack Vector
An unauthenticated attacker submits a crafted request to the chat REST endpoint containing an aliased model_ parameter with CR/LF sequences and a JavaScript payload. The forged log line is parsed and appended verbatim to the AI prompt processed by run_advisor(), constituting indirect prompt injection [CWE-1427]. The returned JSON is stored unsanitized. When an administrator loads the dashboard, the Advisor widget renders the payload and executes the script in the admin's browser context.
// No verified exploit code is published. See the Wordfence advisory and
// the plugins.trac references for the vulnerable source lines.
Detection Methods for CVE-2026-96561
Indicators of Compromise
- Unauthenticated POST requests to /wp-json/mwai-ui/v1/chats/submit containing parameters that resemble model aliases such as model_, model__, or similar variants.
- Request bodies containing CR/LF sequences (%0d%0a) combined with HTML or JavaScript tokens in model-related fields.
- Presence of HTML markup, <script> tags, or event handlers in the mwai_advisor_data option within wp_options.
- Entries in the PHP error log referencing AI Engine exceptions that contain embedded HTML or newline-injected content.
Detection Strategies
- Inspect the WordPress database for the mwai_advisor_data option and alert on values whose title or description fields contain <, >, or on*= attributes.
- Deploy web application firewall rules that block requests to the mwai-ui/v1/chats/submit endpoint containing CR/LF in parameter values.
- Hunt administrator browser telemetry for script execution originating from /wp-admin/index.php tied to the Advisor metabox.
Monitoring Recommendations
- Centralize PHP error logs and alert on injected newline sequences that break log formatting.
- Track plugin version inventory across WordPress estates and flag any instance of AI Engine at or below 3.8.0.
- Monitor outbound requests from the WordPress host to AI provider endpoints for unexpected prompt content that originated from log data.
How to Mitigate CVE-2026-96561
Immediate Actions Required
- Update the AI Engine plugin to version 3.8.1 or later on every WordPress instance.
- Audit the mwai_advisor_data option and clear any values containing HTML markup or script content.
- Rotate administrator credentials and session tokens on sites that ran a vulnerable version with the Advisor module enabled.
Patch Information
The vendor released AI Engine 3.8.1, which addresses the input neutralization and output escaping gaps described in this chain. Review the version diff from 3.8.0 to 3.8.1 and the Wordfence Vulnerability Report for remediation details.
Workarounds
- Disable the AI Engine plugin until patching is complete if 3.8.1 cannot be deployed immediately.
- Disable the Advisor module and remove the mwai_advisor_data option to prevent rendering of untrusted stored content.
- Restrict access to the /wp-json/mwai-ui/v1/chats/submit REST route via WAF or server configuration until the plugin is updated.
# Example: block the vulnerable REST route at the web server until patched
# nginx
location ~ ^/wp-json/mwai-ui/v1/chats/submit {
return 403;
}
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

