CVE-2026-125094: Optimole <= 4.2.19 - Unauthenticated Stored Cross-Site Scripting via Comment body
The Optimole – Optimize Images | Convert WebP & AVIF | CDN & Lazy Load | Image Optimization plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the 'comment' parameter in all versions up to, and including, 4.2.19 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. Exploitation requires the AMP plugin to be active in Transitional or Standard template mode, and comments must be open on the target post, which is the WordPress default.
Affected Software
Event History
Frequently Asked Questions
Which sites are exposed to exploitation?
Sites using affected Optimole versions are exposed only when the AMP plugin is active in Transitional or Standard template mode and comments are open on the target post. Open comments are the WordPress default.
Does an attacker need an account or user interaction to inject the payload?
No. An unauthenticated attacker can submit the malicious content through the comment parameter, and no user interaction is required for the injection itself.
When does the injected script execute?
The script executes when a user accesses a page containing the injected comment. This can affect users who view the targeted post or page after the payload has been stored.
What can be done if updating is not immediately possible?
Disable the AMP plugin or avoid its Transitional and Standard template modes, and close comments on affected posts. These conditions are required for exploitation.