# AI Engine <= 3.9.7 - Authenticated (Contributor+) Stored Cross-Site Scripting via Forged Chatbot Container 'startSentence' Parameter

- **ID:** WPSEC-2026-4493
- **Plugin:** AI Engine – MCP Server & AI Chatbot for WordPress, with Claude, ChatGPT & Gemini (`ai-engine`), https://wordpress.org/plugins/ai-engine/
- **Affected versions:** all versions before 3.9.8
- **Fixed in:** 3.9.8 (Update to 3.9.8 or later.)
- **Severity:** Medium 5.4 (CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N)
- **Weakness:** CWE-79
- **Usage among sites WPSec scans:** plugin Low, affected versions Low (as of 2026-12-03)
- **Attack surface analysis:** https://attacksurface.wpsec.com/plugin/ai-engine
- **Fix released:** 2026-12-01
- **Published:** 2026-12-03
- **URL:** https://wpsec.com/vuln/WPSEC-2026-4493/

## Description

The AI Engine plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the 'startSentence' value of a hand-written chatbot container in all versions up to, and including, 3.9.7. The cause is that the front-end chatbot script read the start sentence from the data-params attribute of an element with the mwai-chatbot-container class that the server did not print, and rendered it as markdown with raw HTML, while other HTML parameters from such containers were already reduced to plain text. This makes it possible for authenticated attackers, with contributor-level access and above, to inject arbitrary web scripts in pages that will execute whenever a user accesses an injected page and interacts with the injected chatbot greeting.

## References

- https://wpsec.com/vuln/WPSEC-2026-4493/
- https://plugins.svn.wordpress.org/ai-engine/tags/3.9.8/
- https://wordpress.org/plugins/ai-engine/

Source: WPSec, https://wpsec.com/vuln/WPSEC-2026-4493/

License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Free to use, share and adapt, also commercially, if you credit WPSec and link to this advisory.
