Autoptimize WordPress Plugin Stored Cross-Site Scripting Vulnerability

Vulnerability

A stored cross-site scripting vulnerability has been identified in the Autoptimize plugin for WordPress, affecting all versions through 3.1.13. The issue arises from inadequate input sanitization and output escaping of user-supplied image attributes in the 'create_img_preload_tag' function. This vulnerability allows authenticated attackers with contributor-level access or higher to inject arbitrary scripts into pages, which are executed when a user accesses the compromised page.

Impact

Exploitation of this vulnerability allows for stored cross-site scripting, where injected scripts are executed in the context of the user viewing the page.

Remediation

Users are advised to update the Autoptimize plugin to version 3.1.14 or a newer patched version.

Added: Dec 3, 2025, 2:18 PM
Updated: Dec 3, 2025, 2:18 PM

Vulnerability Rating

Custom Algorithm
spread
7.6
impact
1.7
exploitability
5.8
remediation
7.7
relevance
1.2
threat
3.2
urgency
2.9
incentive
1.7

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.