CVE-2026-5217: CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in optimole Optimole – Optimize Images in Real Time
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.
AI Analysis
Technical Summary
The Optimole WordPress plugin suffers from a stored XSS vulnerability due to improper neutralization of input in the 's' parameter of its REST API endpoint. Although the endpoint uses HMAC signatures and timestamps for validation, these values are exposed in frontend HTML, allowing unauthenticated attackers to craft malicious requests. The plugin uses sanitize_text_field() which removes HTML tags but does not escape double quotes, enabling injection of scripts into the srcset attribute of images. The malicious input is stored in transients and later rendered without proper escaping, leading to persistent XSS that executes in users' browsers.
Potential Impact
An attacker can inject arbitrary JavaScript code into pages served by the vulnerable plugin, which will execute in the context of any user visiting those pages. This can lead to theft of user credentials, session hijacking, or other malicious actions limited to the scope of the affected site. The vulnerability requires no authentication and has a CVSS score of 7.2 (high severity). There are no known exploits in the wild at the time of this report.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is released, users should consider disabling the plugin or restricting access to the vulnerable REST endpoint if possible. Monitor vendor channels for updates and apply patches promptly once available.
CVE-2026-5217: CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in optimole Optimole – Optimize Images in Real Time
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.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The Optimole WordPress plugin suffers from a stored XSS vulnerability due to improper neutralization of input in the 's' parameter of its REST API endpoint. Although the endpoint uses HMAC signatures and timestamps for validation, these values are exposed in frontend HTML, allowing unauthenticated attackers to craft malicious requests. The plugin uses sanitize_text_field() which removes HTML tags but does not escape double quotes, enabling injection of scripts into the srcset attribute of images. The malicious input is stored in transients and later rendered without proper escaping, leading to persistent XSS that executes in users' browsers.
Potential Impact
An attacker can inject arbitrary JavaScript code into pages served by the vulnerable plugin, which will execute in the context of any user visiting those pages. This can lead to theft of user credentials, session hijacking, or other malicious actions limited to the scope of the affected site. The vulnerability requires no authentication and has a CVSS score of 7.2 (high severity). There are no known exploits in the wild at the time of this report.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is released, users should consider disabling the plugin or restricting access to the vulnerable REST endpoint if possible. Monitor vendor channels for updates and apply patches promptly once available.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- Wordfence
- Date Reserved
- 2026-03-31T11:22:09.160Z
- Cvss Version
- 3.1
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 69d9a5741cc7ad14da144142
Added to database: 4/11/2026, 1:35:48 AM
Last enriched: 4/18/2026, 2:38:22 PM
Last updated: 5/26/2026, 7:57:17 AM
Views: 180
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.