# Smush – Image Optimization, Compression, Lazy Load, WebP & CDN <= 4.3.6 - Authenticated (Contributor+) Stored Cross-Site Scripting via Lazy Load Background Image Handling

- **ID:** WPSEC-2026-3307
- **Plugin:** Smush – Image Optimization, Compression, Lazy Load, WebP & CDN (`wp-smushit`), https://wordpress.org/plugins/wp-smushit/
- **Affected versions:** from 3.16.0 before 4.3.7
- **Fixed in:** 4.3.7 (Update to 4.3.7 or later.)
- **Severity:** Medium 6.4 (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N)
- **Weakness:** CWE-79
- **Usage among sites WPSec scans:** plugin High, affected versions High (as of 2026-11-17)
- **Attack surface analysis:** https://attacksurface.wpsec.com/plugin/wp-smushit
- **Fix released:** 2026-11-16
- **Published:** 2026-11-17
- **URL:** https://wpsec.com/vuln/WPSEC-2026-3307/

## Description

The Smush plugin for WordPress is vulnerable to Stored Cross-Site Scripting via crafted HTML attributes in post content in versions 3.16.0 up to, and including, 4.3.6. This is due to the HTML parser reading an element's style attribute with a loose regular expression that can match text inside other attribute values, and the Lazy Load module then rewriting that text in the page markup, which can remove an attribute's closing quote. This makes it possible for authenticated attackers, with contributor-level access and above, to inject arbitrary web scripts in pages that will execute whenever a user accesses an injected page. Exploitation requires the Lazy Load module to be enabled with native lazy loading turned off.

## References

- https://wpsec.com/vuln/WPSEC-2026-3307/
- https://plugins.svn.wordpress.org/wp-smushit/tags/4.3.7/
- https://wordpress.org/plugins/wp-smushit/

Source: WPSec, https://wpsec.com/vuln/WPSEC-2026-3307/

License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Free to use, share and adapt, also commercially, if you credit WPSec and link to this advisory.
