Description
The Image Optimizer plugin for WordPress is vulnerable to arbitrary file deletion in versions up to and including 1.7.4. This is due to insufficient path validation in the Image_Backup::remove() function where backup file paths stored in post meta are used directly in file deletion operations without verifying they are within the uploads directory. The plugin stores backup file paths in the image_optimizer_metadata post meta field and trusts these paths completely when deleting backups on the delete_attachment hook. An authenticated attacker with Author-level access can edit the image_optimizer_metadata post meta on their own attachments via WordPress's Custom Fields interface, injecting arbitrary absolute file paths into the backups array. When the attacker subsequently deletes the attachment, the plugin calls File_System::delete() on each path without validation. This makes it possible for authenticated attackers, with Author-level access and above, to delete arbitrary files on the server within the web server's filesystem permissions, potentially leading to denial of service, data loss, or security degradation.
Published: 2026-07-02
Score: 8.1 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The Image Optimizer plugin contains a flaw in the remove() routine where backup file paths stored in post meta are deleted without confirming they belong to the uploads folder. This insufficient path validation allows an authenticated user who can edit attachment custom fields to insert any absolute file path into the image_optimizer_metadata array. When the attachment is subsequently removed, the plugin deletes those listed paths verbatim, enabling deletion of arbitrary files on the server. The vulnerability is classified as CWE‑73 and can lead to data loss, service disruption, or compromise of other site content.

Affected Systems

WordPress installations running the Elementor Image Optimizer – Optimize Images and Convert to WebP or AVIF plugin, versions 1.7.4 and earlier, are affected. Sites that grant author or higher roles the ability to edit custom fields for attachments are at risk.

Risk and Exploitability

The CVSS score of 8.1 indicates high severity, while an EPSS score of <1% shows that current exploitation is thought to be uncommon but possible. The vulnerability is not listed in CISA KEV. Based on the description, it is inferred that an attacker must have the capability to edit custom fields on attachments to inject malicious paths. Exploitation requires only author‑level access and occurs via a web‑based action after login, making it a realistic threat for sites where the plugin is active. The likely attack vector is a web‑based operation performed after a user’s session is normally sufficient to carry out the exploit.

Generated by OpenCVE AI on July 22, 2026 at 13:55 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Update Image Optimizer to the latest version that addresses the path‑validation flaw.
  • Restrict the ability of authors and other users to edit attachment custom fields, or remove the edit_post_meta capability for these roles.
  • Disable the backup deletion hook or turn off the backup feature until a secure update is applied.

Generated by OpenCVE AI on July 22, 2026 at 13:55 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Mon, 06 Jul 2026 23:15:00 +0000

Type Values Removed Values Added
First Time appeared Elemntor
Elemntor image Optimizer – Optimize Images And Convert To Webp Or Avif
Wordpress
Wordpress wordpress
Vendors & Products Elemntor
Elemntor image Optimizer – Optimize Images And Convert To Webp Or Avif
Wordpress
Wordpress wordpress

Thu, 02 Jul 2026 13:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Thu, 02 Jul 2026 06:15:00 +0000

Type Values Removed Values Added
Description The Image Optimizer plugin for WordPress is vulnerable to arbitrary file deletion in versions up to and including 1.7.4. This is due to insufficient path validation in the Image_Backup::remove() function where backup file paths stored in post meta are used directly in file deletion operations without verifying they are within the uploads directory. The plugin stores backup file paths in the image_optimizer_metadata post meta field and trusts these paths completely when deleting backups on the delete_attachment hook. An authenticated attacker with Author-level access can edit the image_optimizer_metadata post meta on their own attachments via WordPress's Custom Fields interface, injecting arbitrary absolute file paths into the backups array. When the attacker subsequently deletes the attachment, the plugin calls File_System::delete() on each path without validation. This makes it possible for authenticated attackers, with Author-level access and above, to delete arbitrary files on the server within the web server's filesystem permissions, potentially leading to denial of service, data loss, or security degradation.
Title Image Optimizer <= 1.7.4 - Authenticated (Author+) Arbitrary File Deletion via Post Meta Field Injection
Weaknesses CWE-73
References
Metrics cvssV3_1

{'score': 8.1, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H'}


Subscriptions

Elemntor Image Optimizer – Optimize Images And Convert To Webp Or Avif
Wordpress Wordpress
cve-icon MITRE

Status: PUBLISHED

Assigner: Wordfence

Published:

Updated: 2026-07-02T12:37:03.815Z

Reserved: 2026-04-08T16:28:00.923Z

Link: CVE-2026-5821

cve-icon Vulnrichment

Updated: 2026-07-02T12:37:00.793Z

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-07-22T14:00:04Z

Weaknesses
  • CWE-73

    External Control of File Name or Path