CWE-73Weakness · CWE-73

CVE-2026-5821

HIGH · 8.1 CVSS v3.1 Published 2026-07-02
Mitigation only
No fix yet — a mitigation exists. There is no fixed release. A documented workaround reduces exposure in the meantime.
See remediation →
87/100
Remediation priority · High
Remotely reachable Zero-click 8 weeks old

Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.

NVD · unedited
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.

Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.

dbcve analysis · high confidence

The Image Optimizer plugin for WordPress fails to validate file paths before deletion in the Image_Backup::remove() function. Attackers with Author-level access can inject arbitrary absolute file paths into the image_optimizer_metadata post meta field for their own attachments. When the attachment is deleted, the plugin calls File_System::delete() on these attacker-controlled paths without verifying they reside within the WordPress uploads directory, enabling arbitrary file deletion.

MitigationUpdate to version 1.7.5 or later which implements path validation ensuring deletion targets remain within the uploads directory. Until patched, restrict Author-level access or monitor for suspicious image_optimizer_metadata modifications.

Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.

CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.

From the vector
Attack vector
Network
Complexity
Low
Privileges
Low
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
High
Availability
High

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

Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.

dbcve checks

Work through these to decide whether this CVE applies to you.

  1. Verify Image Optimizer plugin is installed
    Go to WordPress admin dashboard > Plugins and confirm the Image Optimizer plugin is active. Note the installed version displayed in the plugin list.
    Affected if Plugin version is below 1.7.5 and the plugin is active
  2. Confirm Author-level users exist
    Navigate to WordPress admin > Users and review user roles. Author-level users have the capability to upload and delete their own media attachments, which is required for exploitation.
    Affected if Any user with Author role exists in the WordPress installation
  3. Inspect image_optimizer_metadata for suspicious paths
    Query the wp_postmeta table for image_optimizer_metadata entries containing absolute paths outside the wp-content/uploads directory: SELECT post_id, meta_value FROM wp_postmeta WHERE meta_key = 'image_optimizer_metadata' AND meta_value NOT LIKE '%/wp-content/uploads/%'
    Affected if Any image_optimizer_metadata values contain absolute file paths pointing outside the uploads directory
  4. Check for unauthorized file deletions
    Review server access logs and WordPress audit logs for File_System::delete() calls or file removal events targeting files outside the uploads directory occurring around the time of attachment deletion.
    Affected if Evidence exists of file deletions from directories outside wp-content/uploads

The environment is affected if the Image Optimizer plugin version is below 1.7.5, Author-level users exist, and either suspicious image_optimizer_metadata entries or unauthorized file deletions are detected.

Generated from the published advisory. Verify against your own configuration.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.

From vendor data
Mitigation available No clean upgrade yet — mitigate in the meantime
Mitigation

Update to version 1.7.5 or later which implements path validation ensuring deletion targets remain within the uploads directory. Until patched, restrict Author-level access or monitor for suspicious image_optimizer_metadata modifications.

Have this fixed Scoped from the published advisory
  • Consultation3.0 h
  • Implementation6.0 h
  • Testing4.0 h
  • Review / QA3.0 h
16.0 hours of engineering $2,820
Get help mitigating

An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $4,512.

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2026-5821 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.

References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.

Primary sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2026-5821 in production — separate from our analysis above.

No notes yet

Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.

What this is

A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.

What belongs here
  • Verified mitigations, workarounds, and config changes
  • Version or environment caveats, and links to real fixes
  • No weaponised exploit code, or anything meant to cause harm
  • No spam, self-promotion, credentials, or personal data