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.
CVE-2026-5821
Score 8.1 from GitHub Security Advisory (severity: HIGH) published 2026-07-02. a secondary CVSS source baseline 8.1; sources differ by 0.0.
- High severity, but no confirmed exploitation yet
No vendor fix yet — apply a workaround or compensating control (WAF / firewall / segmentation) and watch for a patch.
- CVSS v3
- 8.1
- EG Score
- 8.1(high)
- EPSS
- 27.4%
- KEV
- Not listed
Published
July 2, 2026
Last Modified
July 2, 2026
References (8)
- security@wordfencehttps://plugins.trac.wordpress.org/browser/image-optimization/tags/1.7.3/classes/image/image-backup.php#L117
- security@wordfencehttps://plugins.trac.wordpress.org/browser/image-optimization/tags/1.7.3/classes/image/image-meta.php#L97
- security@wordfencehttps://plugins.trac.wordpress.org/browser/image-optimization/tags/1.7.3/modules/backups/components/handle-backups-removing.php#L19
- security@wordfencehttps://plugins.trac.wordpress.org/browser/image-optimization/trunk/classes/image/image-backup.php#L117
- security@wordfencehttps://plugins.trac.wordpress.org/browser/image-optimization/trunk/classes/image/image-meta.php#L97
- security@wordfencehttps://plugins.trac.wordpress.org/browser/image-optimization/trunk/modules/backups/components/handle-backups-removing.php#L19
- security@wordfencehttps://plugins.trac.wordpress.org/changeset?sfp_email=&sfph_mail=&reponame=&old=3557772%40image-optimization&new=3557772%40image-optimization&sfp_email=&sfph_mail=
- security@wordfencehttps://www.wordfence.com/threat-intel/vulnerabilities/id/a1a00374-e9d6-46f9-a28c-cb7768505787?source=cve
Vendor Advisories for CVE-2026-5821(1)
These vendors published their own advisory mentioning this CVE — often with vendor-specific remediation steps + affected product lists not in NVD.
Weakness Classification(1)
MITRE Common Weakness Enumeration — the root-cause categories this CVE belongs to.
Data Freshness Timeline
(refreshed 30× in last 7d / 30× in last 30d)
Each row is a source pipeline that fetched or updated this CVE on that date, with what changed. For example, "NVD update" means NVD published or revised its analysis for this CVE; "MITRE cvelistV5" means we ingested or refreshed it from the CNA feed. Most recent first.
- 2026-07-06 22:59 UTCEG score recompute
- 2026-07-06 22:59 UTCGHSA enrichment
- 2026-07-06 16:27 UTCEPSS rescore
- 2026-07-06 16:27 UTCEPSS rescore
- 2026-07-06 11:49 UTCEG score recompute
- 2026-07-06 11:49 UTCGHSA enrichment
- 2026-07-06 02:23 UTCEPSS rescore
- 2026-07-06 02:23 UTCEPSS rescore
- 2026-07-06 00:38 UTCEG score recompute
- 2026-07-06 00:38 UTCGHSA enrichment
- 2026-07-05 13:28 UTCEG score recompute
- 2026-07-05 13:28 UTCGHSA enrichment
- 2026-07-05 02:31 UTCEPSS rescore
- 2026-07-05 02:30 UTCEPSS rescore
- 2026-07-05 02:18 UTCEG score recompute
- 2026-07-05 02:18 UTCGHSA enrichment
- 2026-07-04 15:09 UTCEG score recompute
- 2026-07-04 15:09 UTCGHSA enrichment
- 2026-07-04 06:31 UTCEPSS rescore
- 2026-07-04 06:31 UTCEPSS rescore
- 2026-07-04 03:58 UTCEG score recompute
- 2026-07-04 03:58 UTCGHSA enrichment
- 2026-07-03 16:48 UTCEG score recompute
- 2026-07-03 16:48 UTCGHSA enrichment
- 2026-07-03 05:37 UTCEG score recompute
Show 5 moreShow fewer
- 2026-07-03 05:37 UTCGHSA enrichment
- 2026-07-02 18:27 UTCEG score recompute
- 2026-07-02 18:27 UTCGHSA enrichment
- 2026-07-02 07:18 UTCEG score recompute
- 2026-07-02 07:18 UTCGHSA enrichment
Frequently asked(5)
What is CVE-2026-5821?
When was CVE-2026-5821 disclosed?
Is CVE-2026-5821 actively exploited?
What is the CVSS score of CVE-2026-5821?
How do I remediate CVE-2026-5821?
Dependency Blast Radius
Explore the affected products and dependency analysis for CVE-2026-5821
Is Your Infrastructure Affected by CVE-2026-5821?
EchelonGraph automatically scans your cloud infrastructure and maps CVE exposure using blast radius analysis.