theinfosecnews

CVE-2026-5217

Published April 11, 2026 · Updated April 11, 2026

7.2CVSS
high

What This Means

CVE-2026-5217 affects the Optimole plugin for WordPress and presents a Stored Cross-Site Scripting (XSS) vulnerability that allows unauthenticated attackers to inject malicious scripts into web pages. The issue arises from inadequate input sanitization and output escaping, specifically in the 's' parameter used in the REST endpoint /wp-json/optimole/v1/optimizations. To mitigate this risk, update the Optimole plugin to version 4.2.3 or later, which addresses this vulnerability. Additionally, review your web application firewall settings to help filter potential exploit attempts.

Official 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.

Recommended Actions

  1. Check if your systems use any of the affected products listed above.
  2. Apply vendor patches immediately if available.
  3. Monitor vendor advisories for updates and additional mitigations.
  4. Review logs for indicators of compromise related to CVE-2026-5217.

Related Coverage