# AI Engine <= 3.8.4 - Unauthenticated Insecure Direct Object Reference to File Deletion via File Upload Metadata

- **ID:** WPSEC-2026-1043
- **Plugin:** AI Engine – The Chatbot, AI Framework & MCP for WordPress (`ai-engine`), https://wordpress.org/plugins/ai-engine/
- **Affected versions:** all versions before 3.8.5
- **Fixed in:** 3.8.5 (Update to 3.8.5 or later.)
- **Severity:** Medium 4.8 (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:L)
- **Weakness:** CWE-639
- **Usage among sites WPSec scans:** plugin Low, affected versions Low (as of 2026-10-15)
- **Attack surface analysis:** https://attacksurface.wpsec.com/plugin/ai-engine
- **Fix released:** 2026-10-14
- **Published:** 2026-10-15
- **URL:** https://wpsec.com/vuln/WPSEC-2026-1043/

## Description

The AI Engine plugin for WordPress is vulnerable to Insecure Direct Object Reference via the 'metadata' parameter of the file upload endpoints (/mwai-ui/v1/files/upload and the Public API simpleFileUpload) in all versions up to, and including, 3.8.4, due to caller-supplied metadata being allowed to overwrite the plugin's reserved file keys (such as file_id, file_expires and provider) and the expired-files cleanup task resolving the files to delete through that stored reference. This makes it possible for unauthenticated attackers to delete files uploaded by other users, either media library attachments created by AI Engine or files stored with the AI provider, when the site stores uploads in the Media Library or the attacker knows the target file's reference. Authenticated attackers with Subscriber-level access can choose the Media Library target themselves when the Public API is enabled.

## References

- https://wpsec.com/vuln/WPSEC-2026-1043/
- https://plugins.svn.wordpress.org/ai-engine/tags/3.8.5/
- https://wordpress.org/plugins/ai-engine/

Source: WPSec, https://wpsec.com/vuln/WPSEC-2026-1043/

License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Free to use, share and adapt, also commercially, if you credit WPSec and link to this advisory.
