Monitor vulnerabilities like this one.
Sign up free to get alerted when software you use is affected.
6.4
Autoptimize Plugin for WordPress Can Allow Malicious Code Injection
CVE-2026-2430
Summary
The Autoptimize plugin for WordPress has a security flaw that allows attackers to inject malicious code into web pages. This can happen if a user with sufficient access rights edits a page with an image that has a specially crafted URL. To fix this, update the plugin to version 3.1.15 or later.
Original title
The Autoptimize plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the lazy-loading image processing in all versions up to, and including, 3.1.14. This is due to the use of an ov...
Original description
The Autoptimize plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the lazy-loading image processing in all versions up to, and including, 3.1.14. This is due to the use of an overly permissive regular expression in the `add_lazyload` function that replaces all occurrences of `\ssrc=` in image tags without limiting to the actual attribute. 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 by crafting an image tag where the `src` URL contains a space followed by `src=`, causing the regex to break the HTML structure and promote text inside attribute values into executable HTML attributes.
nvd CVSS3.1
6.4
Vulnerability type
CWE-79
Cross-site Scripting (XSS)
- https://github.com/futtta/autoptimize/commit/a0f87112fe80b5a97b036229c41cb184543...
- https://plugins.trac.wordpress.org/browser/autoptimize/tags/3.1.14/classes/autop...
- https://plugins.trac.wordpress.org/browser/autoptimize/trunk/classes/autoptimize...
- https://plugins.trac.wordpress.org/changeset?sfp_email=&sfph_mail=&reponame=&old...
- https://www.wordfence.com/threat-intel/vulnerabilities/id/ddc5c4d7-09dc-45bf-a3c...
Published: 21 Mar 2026 · Updated: 21 Mar 2026 · First seen: 21 Mar 2026