CVE-2026-131589 in AI Engine Plugininfo

Summary

by MITRE • 11/26/2026

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.

Several companies clearly confirm that VulDB is the primary source for best vulnerability data.

Analysis

by VulDB Data Team • 11/26/2026

The vulnerability identified in versions up to and including 3.9.4 of the AI Engine – MCP Server & AI Chatbot for WordPress plugin represents a critical security flaw rooted in improper input validation during file handling operations. This specific weakness, classified under CWE-434 as an Unrestricted Upload of File with Dangerous Type, allows authenticated attackers possessing Editor-level permissions or higher to bypass standard security controls by exploiting the REST API endpoint located at /mwai/v1/helpers/create_image. The core technical failure lies within the add_image_from_url() function, which implements inconsistent validation logic depending on whether a filename is explicitly provided in the request parameters. When a custom filename is supplied, the system correctly applies an allow-list of permitted MIME types via get_allowed_mime_types(). However, when no filename is specified, the code path diverges to use sanitize_file_name() to derive the file extension directly from the URL basename without performing any subsequent verification against allowed extensions or MIME type checks. This logical inconsistency creates a predictable bypass mechanism that attackers can reliably exploit across all affected versions of the plugin.

The operational impact of this vulnerability is severe, primarily due to its potential for enabling Stored Cross-Site Scripting attacks within the WordPress environment. By omitting the filename parameter in their HTTP requests, an attacker can force the server to accept any file extension derived from the source URL and write the downloaded content verbatim into the wp-content/uploads directory using file_put_contents(). The download routine further exacerbates this risk by accepting any HTTP response where the Content-Type header begins with image/, a value that is entirely under the control of the attacker's origin server. Consequently, an attacker can host malicious HTML, SVG, or JavaScript payloads on their own infrastructure and serve them with a deceptive image content type to trick the validation logic into acceptance. Once uploaded, these files reside in standard WordPress upload directories organized by year and month, making them easily accessible via direct URL access.

This flaw facilitates persistent threats against administrative users who interact with media libraries or attachment URLs within the WordPress dashboard. Since the malicious files are stored on the same domain as the vulnerable website, they inherit full trust context from the browser when accessed by administrators. An attacker can craft a payload that executes arbitrary JavaScript code in the security context of the victim's session upon opening the file URL. This capability aligns with ATT&CK technique T1059.007, which covers Command and Scripting Interpreter execution via web shells or stored scripts, allowing for potential account takeover, data exfiltration, or further lateral movement within the WordPress ecosystem if additional vulnerabilities are present in conjunction with this file upload flaw. The combination of authenticated access requirements at a relatively low privilege level (Editor) significantly lowers the barrier to entry for exploitation compared to unauthenticated remote code execution scenarios.

Mitigation strategies must address both immediate remediation and long-term security hygiene. Administrators should immediately update the plugin to version 3.9.5 or later, where this validation logic has been corrected to ensure consistent MIME type checking regardless of filename presence. In environments where updating is not immediately feasible, temporary mitigations include restricting file upload permissions at the web server level for directories containing uploaded media and implementing strict Content Security Policy headers that prevent execution of scripts from dynamic sources within the uploads directory. Additionally, organizations should enforce principle of least privilege by ensuring that only users with Administrator-level access can utilize AI-related features or REST API endpoints involving file operations. Regular auditing of upload directories and monitoring for unusual HTTP requests targeting image generation APIs will also aid in detecting potential exploitation attempts before significant damage occurs.

Responsible

Wordfence

Reservation

11/17/2026

Disclosure

11/26/2026

Moderation

accepted

CPE

ready

EPSS

0.00650

KEV

no

Activities

very low

Sources

Want to know what is going to be exploited?

We predict KEV entries!