Security Alert Summary
The Optimole – Optimize Images | Convert WebP & AVIF | CDN & Lazy Load | Image Optimization plugin for WordPress has a stored Cross-Site Scripting (XSS) vulnerability via the “comment” parameter in versions up to and including 4.2.19. An unauthenticated attacker can inject arbitrary scripts that execute when an affected page is viewed. Successful exploitation requires the AMP plugin to be active in Transitional or Standard template mode and that comments are open on the target post.
CVE Details
- CVE ID:
CVE-2026-125094 - Affected component: Optimole – Optimize Images | Convert WebP & AVIF | CDN & Lazy Load | Image Optimization plugin for WordPress
- Affected versions: All versions up to and including 4.2.19
- Published: November 20, 2026 at 12:18:21 PM UTC
- Last modified: November 20, 2026 at 2:17:44 PM UTC
- CVSS v3.1: Base Score 7.2, Severity HIGH, Vector:
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N - Authentication / privileges / user interaction: Authentication required: None; Privileges required: None; User interaction: None
- Primary impact: Confidentiality: Low; Integrity: Low; Availability: None
- Weakness: CWE-79 (Improper Neutralization of Input During Web Page Generation / Cross-site Scripting)
Technical Details
The vulnerability is a stored Cross-Site Scripting (XSS) issue caused by insufficient input sanitization and output escaping of the “comment” parameter. An unauthenticated attacker can submit crafted content that is stored and later rendered in a page; the injected JavaScript will execute when a user views the affected page.
Exploitation requires two conditions noted in the report: the AMP plugin must be active in Transitional or Standard template mode, and comments must be open on the targeted post. The CVE and references point to plugin code locations in the 4.2.19 tag (for example, files under inc/ and inc/v2/BgOptimizer/Lazyload.php and inc/rest.php), indicating the issue is present in handling of comment input and related rendering paths.
The impact is limited to what stored XSS typically enables: execution of arbitrary script in the context of an affected page. The CVE description specifies that arbitrary web scripts can execute whenever a user accesses an injected page. The vulnerability does not, by itself, indicate remote code execution on the server or full site takeover; it enables client-side script execution when conditions are met.
How This Could Impact Your Website
Consider a small team site where the site owner manages plugins, internal staff publish posts, and an external contractor contributes content. If comments are open and the site uses AMP in Transitional or Standard mode, an unauthenticated attacker could post a crafted comment that stores malicious script. When an internal staff member or an external contributor views the post, the script could run in their browser context.
Practical consequences include exposure of session-based data accessible to the victim’s browser, potential capture of email addresses or other information displayed on the page, and increased risk of targeted phishing or social engineering against staff and contractors who interact with the site. If attackers can cause trusted users to perform actions in their browsers, it can enable further targeted attacks.
If you\’re unsure whether your site is affected or how to assess your current user roles and plugins, it may be worth having a professional review of your setup.
Recommended Actions
- Update the affected plugin as soon as a patched version is available.
- If updates are not immediately available, consider temporarily disabling comments on posts where possible, and review AMP plugin mode settings.
- Review and reduce unnecessary user roles, especially contributors and other low-privilege accounts that can submit content.
- Enforce strong passwords and enable two-factor authentication for editors and administrators.
- Remove unused or unmaintained plugins from your site.
- Monitor site activity and server logs for unusual behavior, including unexpected comment submissions or user actions.
If you\’d like help reviewing your plugins, user roles, or overall WordPress security posture, our team at Freshy is happy to help.
References
- https://plugins.trac.wordpress.org/browser/optimole-wp/tags/4.2.19/inc/admin.php#L520
- https://plugins.trac.wordpress.org/browser/optimole-wp/tags/4.2.19/inc/manager.php#L593
- https://plugins.trac.wordpress.org/browser/optimole-wp/tags/4.2.19/inc/rest.php#L184
- https://plugins.trac.wordpress.org/browser/optimole-wp/tags/4.2.19/inc/v2/BgOptimizer/Lazyload.php#L132
- https://plugins.trac.wordpress.org/browser/optimole-wp/tags/4.2.19/inc/v2/BgOptimizer/Lazyload.php#L15
- https://plugins.trac.wordpress.org/browser/optimole-wp/tags/4.2.20
- https://www.wordfence.com/threat-intel/vulnerabilities/id/3d017da6-553a-4e6e-8a8c-8ec7eda0ed7a?source=cve