CVE-2026-5821: Software Security Vulnerability Vulnerability
HIGHCVE-2026-5821 is a HIGH (CVSS 8.1) security vulnerability vulnerability (CWE-73: External Control of File Name or Path) affecting Software libraries in the Maven ecosystem. The weakness occurs when the product allows user input to control or influence paths or file names that are used in filesystem operations.. Remediation is available in the latest vendor maintenance releases.
CVE-2026-5821 at a Glance
Security Impact
CVSS: 8.1
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H).
How to Fix CVE-2026-5821
To remediate this vulnerability, upgrade all affected Software dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
mvn dependency:tree
How to Check if You Are Affected
To determine whether your Java application is affected by CVE-2026-5821, inspect your build dependencies using the Maven Dependency Plugin:
mvn dependency:tree
Analyze the terminal output to locate any version of Software in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.
Note: The mvn dependency:tree command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-73: External Control of File Name or Path, where the product allows user input to control or influence paths or file names that are used in filesystem operations. In Software, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
References
Frequently Asked Questions
What is CVE-2026-5821?
Which Software versions are affected?
What version fixes CVE-2026-5821?
What is the CVSS score of CVE-2026-5821?
What CWE is associated with CVE-2026-5821?
How can I check Maven dependencies for CVE-2026-5821?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-rhv9-h5xx-r8m5",
"modified" : "2026-07-02T06:34:05Z",
"published" : "2026-07-02T06:34:05Z",
"aliases" : [ "CVE-2026-5821" ],
"details" : "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.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H"
} ],
"affected" : [ ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-5821"
}, {
"type" : "WEB",
"url" : "https://plugins.trac.wordpress.org/browser/image-optimization/tags/1.7.3/classes/image/image-backup.php#L117"
}, {
"type" : "WEB",
"url" : "https://plugins.trac.wordpress.org/browser/image-optimization/tags/1.7.3/classes/image/image-meta.php#L97"
}, {
"type" : "WEB",
"url" : "https://plugins.trac.wordpress.org/browser/image-optimization/tags/1.7.3/modules/backups/components/handle-backups-removing.php#L19"
}, {
"type" : "WEB",
"url" : "https://plugins.trac.wordpress.org/browser/image-optimization/trunk/classes/image/image-backup.php#L117"
}, {
"type" : "WEB",
"url" : "https://plugins.trac.wordpress.org/browser/image-optimization/trunk/classes/image/image-meta.php#L97"
}, {
"type" : "WEB",
"url" : "https://plugins.trac.wordpress.org/browser/image-optimization/trunk/modules/backups/components/handle-backups-removing.php#L19"
}, {
"type" : "WEB",
"url" : "https://plugins.trac.wordpress.org/changeset?sfp_email=&sfph_mail=&reponame=&old=3557772%40image-optimization&new=3557772%40image-optimization&sfp_email=&sfph_mail="
}, {
"type" : "WEB",
"url" : "https://www.wordfence.com/threat-intel/vulnerabilities/id/a1a00374-e9d6-46f9-a28c-cb7768505787?source=cve"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-73" ],
"severity" : "HIGH",
"github_reviewed" : false,
"github_reviewed_at" : null,
"nvd_published_at" : "2026-07-02T06:16:14Z"
}
}