← Vulnerability feed

Vulnerability record · CVE-2026-5821 · published 2 July 2026

CVE-2026-5821: The Image Optimizer plugin for WordPress is vulnerable to arbitrary file deletion in versions up to and includ…

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.

8.1 CVSS 3.1 High EPSS 0.66% · top 50.4% CWE-73 · CWE-73 Deferred
8.1CVSS 3.1 base score
0.66%EPSS exploitation probability, 30 days
NoNot in CISA KEV
0Affected product versions listed by NVD
8References
2 Jul 2026Last modified by NVD

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.

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H

References

Track CVE-2026-5821 inside VULONE

Watch it alongside the ransomware crews, C2 infrastructure and forum chatter that reference it, query it through the API and pull it into your SIEM over TAXII.

Start free Open in platform

Related vulnerabilities

Same products first, then exploited flaws of the same weakness class.

8.8CVE-2025-33053Microsoft Windows WebDAV Internet Shortcut File Path Control RCEWindows Internet Shortcut (.url) files allow external control of a file name or path, which an unauthorized attacker can abuse to execute code over a…KEVEPSS 87%analysed5.4CVE-2025-24054Windows NTLM file path control allows spoofingWindows NTLM mishandles externally controlled file names or paths, letting an unauthorized attacker perform spoofing over a network. The flaw affects…KEVEPSS 59%analysed7.1CVE-2025-0111PAN-OS authenticated file read via management web interfacePAN-OS contains an authenticated file read vulnerability that lets a user with network access to the management web interface read files on the PAN-O…KEVEPSS 2.0%analysed6.5CVE-2024-43451Microsoft Windows NTLMv2 hash disclosure via spoofingCVE-2024-43451 is an NTLM hash disclosure spoofing vulnerability in Microsoft Windows. An attacker can induce a victim to disclose their NTLMv2 hash,…KEVEPSS 84%analysed4.3CVE-2018-13374FortiOS and FortiADC access control flaw exposes LDAP credentialsFortiOS (6.0.2, 5.6.7 and earlier) and FortiADC (6.1.0, 6.0.0-6.0.1, 5.4.0-5.4.4) contain an improper access control flaw. An attacker can redirect a…KEVEPSS 38%analysed7.8CVE-2022-22960VMware Workspace ONE Access and related products local privilege escalationVMware Workspace ONE Access, Identity Manager, vRealize Automation and related products ship support scripts with incorrect permission assignments (C…KEVEPSS 36%analysed9.8CVE-2020-1631Juniper Junos OS J-Web HTTP service path traversal and local file inclusionThe HTTP/HTTPS service behind J-Web, Web Authentication, Dynamic-VPN, Firewall Authentication Pass-Through with Web-Redirect, and ZTP in Junos OS doe…KEVEPSS 4.8%analysed7.8CVE-2021-23874McAfee Total Protection local privilege escalation via self-defense bypassMcAfee Total Protection before 16.0.30 has an improper privilege management flaw that lets a local user bypass the product's self-defense mechanism a…KEVEPSS 1.0%analysed

Source: NIST National Vulnerability Database (record CVE-2026-5821), CISA KEV, FIRST EPSS (scores of 2026-09-26). This page is refreshed as NVD updates the record.