CVE-2026-131589: AI Engine stored cross-site scripting (XSS) vulnerability
published 2026-11-26
- Affected versions
- 3.9.4 and older
- Fixed in
- 3.9.5 *
- Latest version
- 3.9.7
- Active installs
- 90,000+
- Type
- Stored cross-site scripting (XSS)
* The source does not name a fixed version; this is the first wordpress.org release after the last affected version.
What to do now
- Update AI Engine to 3.9.5 or newer (the latest is 3.9.7): Dashboard → Updates, or Plugins → “update now”.
- If you cannot update right away, deactivate it until you can.
- Turn on auto-updates for it: Plugins → “Enable auto-updates” on its row.
- Not sure which version you run? Check your version against every known AI Engine issue.
With WP-CLI:
wp plugin get ai-engine --field=version. - If you ran an affected version and something looks off (new admin users, spam pages, redirects), run the free scan below.
Is your site exposed to CVE-2026-131589?
- Are you on an affected version? Compare your AI Engine version with every known issue on record. Check my version
- Has your site already been hit? The free scan looks for signs of a hack from the outside. It cannot see plugin versions or test for this bug.
- Already hacked? Flat $499 for a standard cleanup. Nothing is charged until we have looked at your site and confirmed the job. See how cleanup works
What an attacker needs
- Access: A logged-in account with Editor-level access or higher.
Technical details
Weakness
Stored cross-site scripting (XSS) CWE-79
Text an attacker supplies is saved by the software and later shown to other people without being made safe, so their browser runs it as script.
The script runs as whoever views the page. If that is an administrator, it can act with their access, for example by creating accounts or changing settings.
General description of this issue type. The advisory below covers this bug.
CVSS 3.1 breakdown
- Attack vector
- Network (remote)
- Attack complexity
- Low
- Privileges required
- High
- User interaction
- None
- Scope
- Unchanged
- Confidentiality impact
- High
- Integrity impact
- High
- Availability impact
- High
CVSS vector (scored by Wordfence): CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H
The advisory
The AI Engine – MCP Server & AI Chatbot for WordPress, with Claude, ChatGPT & Gemini plugin for WordPress is vulnerable to Limited Arbitrary File Upload in all versions up to, and including, 3.9.4 via the `url` parameter of the `/mwai/v1/helpers/create_image` REST API endpoint. The vulnerability exists because the `add_image_from_url()` function applies the `get_allowed_mime_types()` extension allow-list only on the custom-filename branch; when the request omits a `filename` value, the empty-filename branch derives the stored file's extension directly from the URL basename via `sanitize_file_name()` without any MIME or extension validation, then writes the downloaded response body verbatim to the WordPress uploads directory via `file_put_contents()`. This makes it possible for authenticated attackers with Editor-level access and above to place attacker-controlled HTML, SVG, or JavaScript files into `wp-content/uploads/YYYY/MM/` under an attacker-chosen extension, enabling stored cross-site scripting against any administrator who opens the resulting attachment URL. The download routine accepts any HTTP response whose `Content-Type` header begins with `image/`, a value freely controlled by the attacker-owned origin server, meaning the written content need not be a valid image.
References
- NVD CVE-2026-131589 nvd.nist.gov
- Wordfence advisory www.wordfence.com
- Code change (fix) plugins.trac.wordpress.org
- Plugin source plugins.trac.wordpress.org
How Laskyr cleans up a site hacked through AI Engine
We confirm the job by email before any payment, remove the infection, harden the site and report how they got in. A standard cleanup is $499 with a 30-day reinfection guarantee. Bigger jobs get a written estimate first, and nothing more is charged unless you approve it. Full details.
Related
Ran an affected version? Run the free scan for signs of a hack.
Where this data comes from
- CVE record, score and references: NIST National Vulnerability Database (NVD), checked 2026-11-29. This product uses data from the NVD API but is not endorsed or certified by the NVD.
- Versions and install counts: wordpress.org/plugins/ai-engine (Plugins API), fetched 2026-11-29.
- Everything outside the quoted description is our plain-English reading of the record and the plugin's release history. The CWE is the standard one for this issue type. Spot an error? Email Daniel.