CVE-2026-131589: AI Engine <= 3.9.4 - Authenticated (Editor+) Limited Arbitrary File Upload via 'url' Parameter
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/createimage REST API endpoint. The vulnerability exists because the addimagefromurl() function applies the getallowedmimetypes() 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 sanitizefilename() without any MIME or extension validation, then writes the downloaded response body verbatim to the WordPress uploads directory via fileputcontents(). 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.
Affected Software
Event History
Frequently Asked Questions
Who can exploit this issue in practice?
An attacker must be authenticated to WordPress with an Editor-level account or higher. The vulnerable endpoint is the /mwai/v1/helpers/create_image REST API endpoint.
What conditions are required for exploitation?
The attacker needs to control a URL that returns a response with a Content-Type beginning with image/. They can omit the filename parameter so that the downloaded content is saved using an extension derived from the URL basename without MIME or extension validation.
Are default installations affected?
The issue affects AI Engine versions through 3.9.4 where the vulnerable REST endpoint is available to Editor-level users or higher. The provided information does not identify any additional configuration prerequisite.
What is the impact after a successful upload?
An attacker can write attacker-controlled HTML, SVG, or JavaScript content into the WordPress uploads directory under an attacker-chosen extension. This can lead to stored cross-site scripting when an administrator opens the resulting attachment URL.