Summary
The AI Engine – MCP Server & AI Chatbot for WordPress plugin, in all versions up to and including 3.9.4, contains a limited arbitrary file upload vulnerability (CWE-434) in the /mwai/v1/helpers/create_image REST API endpoint. When a request omits the 'filename' value, the add_image_from_url() function derives the stored file's extension from the URL basename without any MIME or extension validation and writes the downloaded content to wp-content/uploads/YYYY/MM/. Any HTTP response whose Content-Type header begins with 'image/' is accepted, a value controlled by the attacker's server, so the content need not be a real image.
Per the CVSS vector (7.2, high), the attack is network-based, low complexity and requires no user interaction, but the attacker must be authenticated with high privileges (Editor role or above). Impact on confidentiality, integrity and availability is possible.
An attacker can place HTML, SVG or JavaScript files with a chosen extension, enabling stored cross-site scripting (XSS) against any administrator who opens the resulting attachment URL. The vulnerability is not listed in the CISA KEV catalog.
Who is affected
Organizations running WordPress with the AI Engine plugin version 3.9.4 or earlier, especially sites with multiple users holding Editor or higher roles.
What to do
- Update the AI Engine plugin to a version newer than 3.9.4; references point to changes in 3.9.5, but confirm the fixed version in the vendor's or Wordfence's official advisory.
- Review users with Editor or higher roles and remove unnecessary or suspicious accounts.
- Inspect wp-content/uploads/ for unexpected .html, .svg, .js or similar files and remove any that are not legitimate.
- Until the update is applied, consider temporarily disabling the plugin if its functionality is not essential.
Affected products and versions
CVSS vector, explained
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H
- Attack vector
- Network (from the internet)
- Attack complexity
- Low
- Privileges required
- Administrator
- User interaction
- Not required
- Scope
- Vulnerable component only
- Confidentiality
- High impact
- Integrity
- High impact
- Availability
- High impact
Weakness type (CWE)
- CWE-434 Unrestricted Upload of File with Dangerous Type
References
- www.wordfence.com/threat-intel/vulnerabilities/id/02f6619b-eb5e-42ba-b804-9ac2b2dee482?sou
- plugins.trac.wordpress.org/browser/ai-engine/tags/3.9.4/classes/services/image.php#L233
- plugins.trac.wordpress.org/browser/ai-engine/tags/3.9.4/classes/services/image.php#L203
- plugins.trac.wordpress.org/browser/ai-engine/tags/3.9.4/classes/services/image.php#L140
- plugins.trac.wordpress.org/browser/ai-engine/tags/3.9.4/classes/rest.php#L1210
- plugins.trac.wordpress.org/browser/ai-engine/tags/3.9.4/classes/rest.php#L326
- plugins.trac.wordpress.org/changeset?old_path=/ai-engine/tags/3.9.4/classes/services/image
Sources: CVE.org (CNA and CISA ADP), CISA KEV, FIRST EPSS. Always check the vendor's official advisory.