Automated Threat Modeling

Overview of CVE-2026-110702: Unauthenticated Stored XSS in EWWW Image Optimizer via Lazy Load HTML Rewriting

A brief summary of CVE-2026-110702, an unauthenticated stored XSS in EWWW Image Optimizer 8.9.0 and earlier, where Lazy Load output rewriting turns comment markup that WordPress accepted as safe into script. Includes patch information for the 8.9.1 fix.

CVE Analysis

9 min read

Gaurav Sarraf
Gaurav Sarraf

2026-11-26

Overview of CVE-2026-110702: Unauthenticated Stored XSS in EWWW Image Optimizer via Lazy Load HTML Rewriting

Introduction

A comment form on a WordPress site is usually treated as a solved problem. Core filters what anonymous visitors submit, and whatever survives is assumed safe to display. CVE-2026-110702 breaks that assumption in EWWW Image Optimizer, where a performance feature rewrites page HTML after sanitization and turns an accepted, unauthenticated comment into script that runs in the browser of anyone who views the page.

EWWW Image Optimizer, published by Exactly WWW LLC, is a WordPress plugin that compresses and scales images, lazy loads them, and converts them to WebP and AVIF. WordPress.org reports more than 1 million active installations. That is an install count, not a count of vulnerable or compromised sites. Because the plugin's Lazy Load feature rewrites the HTML of each page in an output buffer, a flaw in that rewriting affects every piece of content it touches, including visitor comments.

Technical information

Key facts

AttributeValue
IdentifierCVE-2026-110702
ComponentEWWW Image Optimizer plugin for WordPress
Affected versionsAll versions up to and including 8.9.0
First patched version8.9.1 (released October 29, 2026)
Inputcomment parameter
WeaknessStored XSS, CWE-79
Severity7.2 High (Wordfence as CNA; no separate NIST score in the reviewed NVD record)
VectorCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N
DisclosureWordfence, November 25, 2026; NVD published November 26, 2026
ResearcherJakub Herman

Root cause: string rewriting after sanitization

The core of this bug is an ordering problem. WordPress core comment kses runs when a comment is saved, and according to the advisory it permits the attacker's tag and attribute structure unchanged. Nothing about the stored comment is dangerous at that point. The danger appears later, when the plugin's Lazy Load background attribute rewriter processes the rendered page in an output buffer.

In the 8.9.0 source, filter_page_output( $buffer, $context = '' ) processes markup and applies replacements to the output buffer, and parse_background_images( $tag_type, &$buffer ) rewrites background-related elements. Before 8.9.1, the background image rewriter treated each element as one raw string. It searched for the background custom property marker anywhere in the element text and then rebuilt the class attribute with string-based get and set helpers. These are the lines removed in the fix:

if ( \str_contains( $element, '--background' ) ) { $this->set_attribute( $element, 'class', $this->get_attribute( $element, 'class' ) . ' lazyload', true );

Because the check and the rewrite operated on unstructured text, a comment could hide text that looks like an attribute (the background marker, or something resembling a class attribute) inside the value of a different attribute. Kses sees a harmless attribute value. The rewriter, however, could match the wrong text, "fix up" the tag, and in doing so break out of the original quoting. That is how markup that was safe when saved became script when rendered.

The initialization code in common.php loads the Lazy Load parser only when the ewww_image_optimizer_lazy_load option is enabled, so the vulnerable path depends on that feature being active. The advisory does not enumerate every configuration or comment moderation condition required for successful exploitation.

Attack flow

Based on the advisory, the sequence is:

  1. Injection: An unauthenticated attacker submits crafted markup through the comment parameter.
  2. Persistence: WordPress core comment kses accepts the tag and attribute structure unchanged, so the comment is stored as submitted.
  3. Transformation: When a page containing the comment is rendered, the Lazy Load output buffer filter rewrites the element and, through the string matching described above, breaks the original attribute quoting.
  4. Execution: The resulting markup executes arbitrary script in the browser of any user who accesses the injected page.

The reviewed disclosures do not include a complete triggering comment or the exact tag and attribute combination, and we do not reproduce one here.

Impact and limits

The confirmed impact is arbitrary script execution in rendered pages. It is not server-side code execution or a demonstrated database compromise. The vector records changed scope with low confidentiality and integrity impact and no availability impact.

The vector contains UI:N, while the description says execution occurs when a user accesses an injected page. Both are as published, and the advisory does not explain the scoring choice.

On exploitation status, the reviewed NVD and Wordfence disclosures do not confirm exploitation in the wild, name a threat actor, or publish working exploit code. The CVE is absent from the retrieved CISA KEV catalog snapshot dated November 25, 2026, but that snapshot predates NVD publication, so it is only a bounded observation.

Patch information

The fix shipped in EWWW Image Optimizer 8.9.1, released October 29, 2026. Wordfence lists every version up to and including 8.9.0 as affected and 8.9.1 as patched. The WordPress.org changelog for 8.9.1 has one security entry, "Lazy Load HTML attribute parsing is now stricter and more secure", and it does not name the CVE.

The WordPress Trac changeset referenced by NVD and Wordfence (r3774127) returned a bot check page and could not be fetched. The code below comes from the developer's public GitHub mirror, nosilver4u/ewww-image-optimizer. There, PR #392, "Html attribute parsing improvements", was merged on October 29, 2026, about five hours before the releasing version 8.9.1 commit. Its description reads: "Make attribute parsing more strict and prevent overlapping attributes being found, replaced, etc." The link between this PR and the CVE is an inference from the timing and the matching changelog entry. No fetched source states it directly.

1. A real tag parser instead of string matching

Commit c72a2ec ("revamp HTML attribute parsing") adds a new EWWW\HTML_Tag class, and the Lazy Load code now goes through it. The commit message says it "Prevents overlapping and false positives" and "checks to be sure the first attribute is anchored to the start of the tag."

2. The background check only inspects the real style value

The vulnerable branch now parses the element, extracts the actual style attribute, gives up if none is found, and searches only that value. These are the lines added:

$html_tag = new HTML_Tag( $element ); $style_attr = $html_tag->get_attribute( 'style' ); if ( empty( $style_attr ) ) { $this->debug_message( 'unable to get style attribute' ); continue; } if ( \str_contains( $style_attr, '--background' ) ) { $html_tag->set_attribute( 'class', 'lazyload', true );

The rest of the background image path changed the same way. The final style rewrite now uses $html_tag->set_attribute( 'style', $new_style ) instead of a raw str_replace on the element.

3. The parser fails closed on ambiguity

Inside HTML_Tag::get_attributes(), as it stands in the 8.9.1 release commit, several checks make the parse fail closed. A failed parse returns an empty attribute set, so the element is left untouched:

  • Tags longer than 5,000 characters are not parsed.
  • A duplicate attribute name causes a parse failure.
  • sort_attributes_by_position() checks whether any two matches overlap, which is exactly the case where one attribute was "found" inside another's value, and aborts if so.
  • The first attribute found must sit immediately after the tag name, enforced by the pattern below, so a match buried deeper in the markup is not treated as a real attribute.
'#<\w+\s+?' . $first_attr . '#'

4. Values are quoted safely when written back

HTML_Tag::set_attribute() encodes double quotes before wrapping the value in double quotes. Append mode joins to the parsed value, so lazyload is added to the real class attribute and not to attacker-placed text:

$value = \str_replace( '"', '&#34;', $value ); ... if ( $append && ! empty( $this->attributes[ $name ]['value'] ) ) { $value = $this->attributes[ $name ]['value'] . ' ' . $value; }

5. Extra output hardening

A follow-up commit in the same PR, 5b483bf ("make sure all attrs are escaped"), passes the placeholder src through esc_url() and casts numeric attributes to integers. Before:

$image_tag->set_attribute( 'src', $placeholder_src ); ... $image_tag->set_attribute( 'data-max-width', $width_attr );

After:

$image_tag->set_attribute( 'src', \esc_url( $placeholder_src ) ); ... $image_tag->set_attribute( 'data-max-width', (int) $width_attr );

Takeaway

The fix changes the model rather than adding a filter. The old code treated HTML as a flat string and searched it for keywords. The new code parses each tag into named attributes, refuses tags it cannot parse cleanly, and writes back only escaped values. This lines up with MITRE's CWE-79 guidance that output encoding must match the destination context (HTML attributes, JavaScript, CSS, URLs) and that input validation alone will not always prevent XSS.

The same approach continued after this release. The 8.9.2 changelog says improved HTML attribute parsing was applied to all front-end filters (PR #394, "Extend html tag parsing"), extending HTML_Tag to Easy IO/ExactDN, JS WebP and Picture WebP. Wordfence also lists a separate stored XSS, CVE-2026-124254, affecting versions up to 8.9.1, so 8.9.1 is not the last relevant security release.

ReleaseDateRelevant security note
8.9.0October 13, 2026Includes further stored XSS hardening, but still affected by this CVE
8.9.1October 29, 2026Stricter Lazy Load HTML attribute parsing; first patched version
8.9.2November 10, 2026Improved HTML attribute parsing applied to all front-end filters

The 8.9.1 and 8.9.2 releases predate Wordfence's November 25 public disclosure. That establishes when the patch was available, not when any given site actually installed it.

Applying the update

WordPress recommends a current backup before updating plugins. The documented path is Dashboard > Updates, then select the plugin in the Plugins section, then Update Plugins. Per-plugin automatic updates can be enabled from the Plugins screen, but they depend on WordPress Cron and can be disabled by hosting providers or other plugins, so confirm the installed version rather than assuming the update ran.

The vendor documents an EWWW_IMAGE_OPTIMIZER_LAZY_LOAD boolean override that can disable lazy loading. That documentation does not describe it as a validated mitigation for this CVE, and it warns that disabling lazy loading also disables automatic scaling, which may deliver oversized images. The advisory supplies no firewall rule or other confirmed substitute for updating.

Affected systems and versions

  • Product: EWWW Image Optimizer plugin for WordPress (Exactly WWW LLC)
  • Affected: all versions up to and including 8.9.0
  • Fixed: 8.9.1 and later, with 8.9.2 extending the parsing changes to all front-end filters
  • Vulnerable configuration: the Lazy Load parser, which the plugin loads when the ewww_image_optimizer_lazy_load option is enabled. The advisory does not list every configuration or comment moderation condition needed for exploitation.
  • Version 8.9.0 caveat: it advertised stored XSS hardening but remains within the affected range
  • Related issue: Wordfence lists CVE-2026-124254, a separate stored XSS affecting versions up to 8.9.1, so moving to the current release is preferable to stopping at 8.9.1

Vendor security history

Wordfence's plugin history lists several earlier issues across different vulnerability classes:

CVEAffected versionsScoreType
CVE-2016-20010Through 2.8.49.6Remote code execution
CVE-2023-40600Through 7.2.05.3Unauthenticated sensitive information exposure when debug logging is enabled; fixed in 7.2.1
CVE-2024-31924Through 7.2.34.3Cross-site request forgery
CVE-2026-84773Through 8.7.67.2Unauthenticated stored XSS
CVE-2026-124254Through 8.9.1Not stated in the briefingStored XSS

Version 8.9.0 shipped stored XSS hardening but did not close this comment rendering path. Version 8.9.1 tightened Lazy Load parsing, and 8.9.2 extended the parser to other front-end filters. That reads as continuing remediation of a recurring parsing problem rather than evidence of either a uniformly secure or insecure vendor. The plugin listing offers a Patchstack Vulnerability Disclosure Program route, GitHub issues, and email support as reporting channels.

References

Detect & fix
what others miss

Works with
  • GitHub
  • GitLab
  • Bitbucket
  • Azure DevOps Services
  • Gerrit
  • CVS
  • Jira
  • Linear
  • Slack
  • Security Compass
Explore integrations
Security magnifying glass visualization