Optimole <= 4.2.2 - Unauthenticated Stored Cross-Site Scripting via Srcset Descriptor Parameter

7.2
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
CVE CVE-2026-5217
CVSS 7.2 (High)
Publicly Published April 10, 2026
Last Updated April 11, 2026
Researcher Quốc Huy (jtwings) - Puramu

Description

The Optimole – Optimize Images | Convert WebP & AVIF | CDN & Lazy Load | Image Optimization plugin for WordPress is vulnerable to Stored Cross-Site Scripting in all versions up to, and including, 4.2.2. This is due to insufficient input sanitization and output escaping on the user-supplied 's' parameter (srcset descriptor) in the unauthenticated /wp-json/optimole/v1/optimizations REST endpoint. The endpoint validates requests using an HMAC signature and timestamp, but these values are exposed directly in the frontend HTML making them accessible to any visitor. The plugin uses sanitize_text_field() on the descriptor value of rest.php, which strips HTML tags but does not escape double quotes. The poisoned descriptor is then stored via transients (backed by the WordPress options table) and later retrieved and injected verbatim into the srcset attribute of tag_replacer.php without proper escaping. This makes it possible for unauthenticated attackers to inject arbitrary web scripts into pages that will execute whenever a user accesses the injected page.

Learn more about Cross-Site Scripting vulnerabilities and how to prevent them.

References

Share

Vulnerability Details for Optimole – Optimize Images | Convert WebP & AVIF | CDN & Lazy Load | Image Optimization

Software Type Plugin
Software Slug optimole-wp (view on wordpress.org)
Patched? Yes
Remediation Update to version 4.2.3, or a newer patched version
Affected Version
  • <= 4.2.2
Patched Version
  • 4.2.3

Recent vulnerabilities in Optimole – Optimize Images | Convert WebP & AVIF | CDN & Lazy Load | Image Optimization

# Title CVE ID CVSS Researchers Date
1 Optimole – Optimize Images | Convert WebP & AVIF | CDN & Lazy Load | Image Optimization <= 4.2.7 - Unauthenticated Stored Cross-Site Scripting CVE-2026-57673 7.2 daroo June 30, 2026
2 Optimole – Optimize Images | Convert WebP & AVIF | CDN & Lazy Load | Image Optimization <= 4.2.6 - Cross-Site Request Forgery via 'optml_replace_file' AJAX Action CVE-2026-11784 4.3 Alexandru Bucur June 17, 2026
3 Optimole <= 4.2.3 - Reflected Cross-Site Scripting via Page Profiler URL CVE-2026-5226 6.1 Ali Cem Havare, Sencer Kılıç, Cesi De Taranto April 10, 2026
4 Image optimization service by Optimole <= 4.1.0 - Insecure Direct Object Reference to Authenticated (Author+) Media Offload CVE-2025-11519 4.3 Dmitrii Ignatyev October 17, 2025
5 Image Optimization by Optimole – Lazy Load, CDN, Convert WebP & AVIF <= 3.12.10 - Authenticated (Author+) Stored Cross-Site Scripting via SVG Upload CVE-2024-4636 6.4 wesley (wcraft) May 14, 2024
6 ThemeIsle SDK <= Various Versions - Missing Authorization CVE-2024-1047 5.3 Francesco Carlucci February 1, 2024
7 Image optimization & Lazy Load <= 3.3.1 - Admin+ Stored Cross-Site Scripting CVE-2022-0969 4.8 Kévin Mosbahi (Mika) March 21, 2022

Did you know Wordfence Intelligence provides free personal and commercial API access to our comprehensive WordPress vulnerability database, along with a free webhook integration to stay on top of the latest vulnerabilities added and updated in the database? Get started today!

Learn more

Want to get notified of the latest vulnerabilities that may affect your WordPress site?
Install Wordfence on your site today to get notified immediately if your site is affected by a vulnerability that has been added to our database.

Get Wordfence

The Wordfence Intelligence WordPress vulnerability database is completely free to access and query via API. Please review the documentation on how to access and consume the vulnerability data via API.

Documentation