# CVE-2026-124969: Optimole <= 4.2.19 - Unauthenticated PHP Object Injection to Arbitrary File Deletion via 'comment_content'/'comment_agent' Parameter during Attachment Rename

Status: published. Published: 2026-11-14. Updated: 2026-11-14.

The Optimole – Optimize Images | Convert WebP & AVIF | CDN & Lazy Load | Image Optimization plugin for WordPress is vulnerable to arbitrary file deletion due to insufficient file path validation in the replace_urls_in_value function in all versions up to, and including, 4.2.19. This makes it possible for unauthenticated attackers to delete arbitrary files on the server, which can easily lead to remote code execution when the right file is deleted (such as wp-config.php). Successful exploitation requires PEAR's Archive_Tar library to be present and loadable on the host (common in official WordPress Docker images and many PHP distributions), and an administrator must subsequently use the plugin's Rename control on any attachment after the attacker has staged a malicious payload in a comment. Successful exploitation additionally requires an action by an administrator — the attacker cannot trigger the vulnerability on their own.

## Remediation

No remediation reported in collected sources

## Affected products and versions

- optimole / Optimole – Optimize Images | Convert WebP & AVIF | CDN & Lazy Load | Image Optimization: ≥ 0; ≤ 4.2.19 (affected, semver). Source: CNA: Wordfence

## Severity and prioritization

- CVSS 3.1: 7.1 (high); CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:H; source: CNA: Wordfence

- CISA KEV: No listing in collected sources

- EPSS: Not available

- SSVC: Not available

- Weaknesses: CWE-502

## Exploit evidence

No exploit evidence in collected sources. This is not proof of no exploitation.

## References

- https://www.wordfence.com/threat-intel/vulnerabilities/id/277b9a34-8e0b-496e-b07b-602b25f125d8?source=cve (CNA: Wordfence)

- https://plugins.trac.wordpress.org/browser/optimole-wp/tags/4.2.19/inc/media_rename/attachment_db_renamer.php#L415 (CNA: Wordfence)

- https://plugins.trac.wordpress.org/browser/optimole-wp/tags/4.2.19/inc/media_rename/attachment_db_renamer.php#L548 (CNA: Wordfence)

- https://plugins.trac.wordpress.org/browser/optimole-wp/tags/4.2.19/inc/media_rename/attachment_db_renamer.php#L319 (CNA: Wordfence)

- https://plugins.trac.wordpress.org/browser/optimole-wp/tags/4.2.19/inc/media_rename/attachment_rename.php#L107 (CNA: Wordfence)

- https://plugins.trac.wordpress.org/browser/optimole-wp/tags/4.2.19/inc/media_rename/attachment_edit.php#L311 (CNA: Wordfence)

- https://plugins.trac.wordpress.org/browser/optimole-wp/tags/4.2.20 (CNA: Wordfence)

## Provenance

- CNA: Wordfence: https://www.cve.org/CVERecord?id=CVE-2026-124969; retrieved 2026-11-14; source updated 2026-11-14

Revision: 793bd71c7dbbd108fb1af67168a056d37c4f37482e19ee99e75f0264aacb31ee

Canonical: https://y2.dev/cve/CVE-2026-124969

## Agent and API access

Public CVE pages, Markdown, and JSON are free to read without an account or API key.

- Public catalog: https://y2.dev/cve/index.json. Follow nextCursor with the same search, filters, sort, and limit (1–100). A null cursor marks the end.

- WebMCP: search_cve_disclosures, get_cve_disclosure, get_cve_page_markdown, get_y2_cve_access. Available in compatible browsers.

- Cyber API: https://api.y2.dev/api/v2/cyber/cves and https://api.y2.dev/api/v2/cyber/cves/{cveId}.

- Y2 Pro or Elite: create a workspace API key with the intel:cyber scope and send Authorization: Bearer <Y2_API_KEY>. Setup: https://y2.dev/docs/api/create-key.

- x402: Pay per request without an account or API key. Omit Authorization, read the HTTP 402 PAYMENT-REQUIRED challenge, validate its current requirements, and retry with PAYMENT-SIGNATURE through an authorized payment client. These browser tools never make payments. Guide: https://y2.dev/docs/api/x402.

- OpenAPI: https://y2.dev/api/openapi.yaml. Agent access metadata: https://y2.dev/cve/agent.json.

Collected public records only. Check source status for coverage and freshness.