What the vulnerability does
01Description
The Autoptimize plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the 'ao_post_preload' meta value in all versions up to, and including, 3.1.14. This is due to insufficient input sanitization in the `ao_metabox_save()` function and missing output escaping when the value is rendered into a `<link>` tag in `autoptimizeImages.php`. 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, granted the "Image optimization" or "Lazy-load images" setting is enabled in the plugin configuration.
Explanation of Vulnerability in Simple Terms
02Summary
Autoptimize versions up to 3.1.14 contain a cross-site scripting vulnerability that allows authenticated users to inject malicious scripts. The vulnerability affects the site's scope, potentially impacting other users and administrators. Update to version 3.1.15.1 or later to remediate.
What an attacker can do
03Attacker Capabilities
Inject malicious JavaScript that executes in other users' browsers and affects site functionality.
Potential impact on your site
04Site Impact
Authenticated attackers can deface content, steal session tokens, or redirect users to malicious sites.
Conditions required to exploit
05Prerequisites
Attacker must have a low-privilege account (e.g., subscriber or contributor role) on the site.
Key dates
06Disclosure timeline
March 20, 2026
CVE published
April 8, 2026
Record updated