CVE-2026-135650: Optimole <= 4.2.20 - Unauthenticated Stored Cross-Site Scripting via Comment Author Name
The Optimole – Optimize Images | Convert WebP & AVIF | CDN & Lazy Load | Image Optimization plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the 'author' parameter in all versions up to, and including, 4.2.20 due to insufficient input sanitization and output escaping. This makes it possible for unauthenticated attackers to inject arbitrary web scripts in pages that will execute whenever a user accesses an injected page. This vulnerability is only reachable when the plugin's 'Enable generic placeholder color' option is disabled, as only that configuration invokes the buildurl() code path that constructs $lowurl from attacker-controlled input.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Configuration
Enable the “Enable generic placeholder color” option to avoid the vulnerable build_url() code path.
Optimole WordPress plugin Enable generic placeholder color = enabled
Event History
Frequently Asked Questions
Which installations are exposed to this issue?
Optimole versions through 4.2.20 are affected only when the “Enable generic placeholder color” option is disabled. That setting causes the vulnerable build_url() code path to process attacker-controlled comment author input.
Does exploitation require an authenticated WordPress account or user interaction?
No attacker authentication is required. An attacker can submit a crafted comment author value, but the injected script executes only when someone accesses the affected page containing that content.
What can be done if an update cannot be applied immediately?
Enable the plugin’s “Enable generic placeholder color” option. The issue is described as reachable only when that option is disabled.