Add Expires Headers & Optimized Minify <= 3.4.0 - Authenticated (Administrator+) Stored Cross-Site Scripting via Lazy Loading Settings

Medium 4.4 CWE-79Fixed in 4.0.0
ID
WPSEC-2026-4509
Plugin
Add Expires Headers & Optimized Minify (add-expires-headers)
Affected
all versions before 4.0.0
Remediation
Update to 4.0.0 or later.
CVSS 3.1
CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:C/C:L/I:L/A:N
Weakness
CWE-79
Usage
Plugin Low · Affected versions Low among sites WPSec scans, 2026-12-03
Attack surface
Add Expires Headers & Optimized Minify on WPSec AttackSurface
Fix released
Published

Description

The add-expires-headers plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the lazy loading settings (animation on load, shortcode tags and exclude selectors) in all versions up to, and including, 3.4.0 due to insufficient input sanitization and output escaping. The animation setting was printed into the class attribute of lazily-loaded elements on the front end, and the other values were echoed unescaped on the settings page. This makes it possible for authenticated attackers with administrator-level access to inject arbitrary web scripts in pages that will execute whenever a user accesses an affected page. This only affects multi-site installations and installations where unfiltered_html has been disabled.

References

Published by WPSec. Provided as is, without warranty. Corrections: contact us.

This advisory as JSON, OSV or Markdown · All advisories: JSON, OSV, RSS

License: CC BY 4.0