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 s
Casky was already ahead
This CVE exploits attack patterns that Casky's 0matched skills already investigate — long before this vulnerability was disclosed. Claude's reasoning model maps these techniques to MITRE ATT&CK, so practitioners who ran these skills have already seen the threat behaviour in their findings.
The Image Optimizer plugin for WordPress versions up to 1.7.4 contains a critical arbitrary file deletion vulnerability in its Image_Backup::remove() function. The vulnerability stems from insufficient path validation in the CWE-73 (External Control of File Name or Path) category—the plugin retrieves backup file paths directly from post meta fields without verifying these paths are confined to the uploads directory. This allows an attacker who can manipulate post metadata to craft malicious paths that delete arbitrary files on the server, potentially including critical WordPress configuration files, database backups, or other sensitive system files. Any WordPress installation using this plugin with user roles capable of uploading or managing images is at risk.
While this CVE does not currently map to specific MITRE ATT&CK techniques, Casky's security skills powered by Claude AI would detect the underlying attack pattern through extended reasoning across path traversal and file manipulation detection capabilities. A practitioner using Casky would observe findings related to unvalidated file operations, post meta tampering indicators, and suspicious file system access attempts. The platform's 754 mapped security skills would flag the dangerous trust boundary between post meta data and file system operations, identifying this as a privilege escalation and impact mechanism where low-privileged attackers could escalate to arbitrary file system destruction. Detection would focus on monitoring for post meta modifications containing path traversal sequences (../ patterns) and unexpected file deletion operations originating from plugin directories.
Composite risk scoring from EPSS, CISA KEV, Shodan, and GreyNoise — 21 security APIs correlated into a single Casky Risk Score. Coming in Casky Pro. Join early access →
Casky has 0 skills that investigate the attack patterns behind CVE-2026-5821. Run one and get CVSS-scored findings in 3 minutes.
Run the skill that detects this →© 2026 Casky.AI, Inc. · AI Security Investigation