Descrizione
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.
Come correggere
Priorità: Media — correggere nel prossimo ciclo di patch. Motivazione: CVSS 7.2, EPSS 0.7% (percentile 46).
Versioni da aggiornare
- tigroumeow AI Engine – MCP Server & AI Chatbot for WordPress, with Claude, ChatGPT & Gemini: vulnerabili le versioni fino alla
3.9.4inclusa → aggiornare a una release successiva alla3.9.4.
Mitigazioni temporanee
Da applicare solo se non è possibile aggiornare subito:
- Disabilitare il caricamento di file se non necessario e impedire l'esecuzione di script nelle directory di upload.
Verifica
- Individuare tutti gli asset con il prodotto interessato (inventario, scanner di vulnerabilità, CMDB).
- Confrontare la versione installata con quelle indicate sopra.
- Applicare l'aggiornamento in un ambiente di test, poi in produzione; riavviare i servizi se richiesto.
- Ripetere la scansione per confermare la correzione.
Configurazioni interessate
| Vendor | Prodotto | Versioni vulnerabili | Corretta in |
|---|---|---|---|
| tigroumeow | AI Engine – MCP Server & AI Chatbot for WordPress, with Claude, ChatGPT & Gemini | ≤ 3.9.4 | — |
Riferimenti
- Riferimentohttps://plugins.trac.wordpress.org/browser/ai-engine/tags/3.9.4/classes/rest.php#L1210
- Riferimentohttps://plugins.trac.wordpress.org/browser/ai-engine/tags/3.9.4/classes/rest.php#L326
- Riferimentohttps://plugins.trac.wordpress.org/browser/ai-engine/tags/3.9.4/classes/services/image.php#L140
- Riferimentohttps://plugins.trac.wordpress.org/browser/ai-engine/tags/3.9.4/classes/services/image.php#L203
- Riferimentohttps://plugins.trac.wordpress.org/browser/ai-engine/tags/3.9.4/classes/services/image.php#L233
- Riferimentohttps://plugins.trac.wordpress.org/changeset?old_path=/ai-engine/tags/3.9.4/classes/services/image.php&new_path=/ai-engine/tags/3.9.5/classes/services/image.php
- Riferimentohttps://www.wordfence.com/threat-intel/vulnerabilities/id/02f6619b-eb5e-42ba-b804-9ac2b2dee482?source=cve