Optimole – Optimize Images | Convert WebP & AVIF | CDN & Lazy Load | Image Optimization <= 4.2.14 - Unauthenticated CSS Injection via Background Lazyload Selectors
- ID
- WPSEC-2026-0295
- Plugin
- Optimole – Optimize Images | Convert WebP & AVIF | CDN & Lazy Load | Image Optimization (optimole-wp)
- Affected
- from 4.0.0 before 4.2.15
- Remediation
- Update to 4.2.15 or later.
- CVSS 3.1
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:L/A:N
- Weakness
- CWE-74
- Usage
- Plugin Medium · Affected versions Low among sites WPSec scans, 2026-10-22
- Attack surface
- Optimole – Optimize Images | Convert WebP & AVIF | CDN & Lazy Load | Image Optimization on WPSec AttackSurface
- Fix released
- Published
Description
The Optimole plugin for WordPress is vulnerable to CSS Injection via client-reported above-the-fold and LCP background selectors in versions 4.0.0 up to, and including, 4.2.14. The cause is insufficient sanitization: selector values submitted to the unauthenticated page-profile REST endpoint are only passed through strip_tags or sanitize_text_field before being embedded into a page-wide inline stylesheet when lazy loading is enabled (the default for new installations). This makes it possible for unauthenticated attackers to submit crafted page-profile data that injects arbitrary CSS rules into pages served to other visitors, for example to deface or hide page content.
References
- https://wpsec.com/vuln/WPSEC-2026-0295/
- https://plugins.svn.wordpress.org/optimole-wp/tags/4.2.15/
- https://wordpress.org/plugins/optimole-wp/
Published by WPSec. Provided as is, without warranty. Corrections: contact us.
This advisory as JSON or Markdown · All advisories: JSON, RSS