Skip to main content

Autoptimize CVE-2026-2430

| EUVDEUVD-2026-13842 MEDIUM
Cross-site Scripting (XSS) (CWE-79)
2026-03-20 Wordfence
6.4
CVSS 3.1 · NVD
Share

Severity by source

NVD PRIMARY
6.4 MEDIUM
AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N

Primary rating from NVD · only source for this CVE.

CVSS VectorNVD

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Changed
Confidentiality
Low
Integrity
Low
Availability
None

Lifecycle Timeline

3
EUVD ID Assigned
Mar 20, 2026 - 23:46 euvd
EUVD-2026-13842
Analysis Generated
Mar 20, 2026 - 23:46 vuln.today
CVE Published
Mar 20, 2026 - 23:25 nvd
MEDIUM 6.4

DescriptionCVE.org

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.

AnalysisAI

The Autoptimize WordPress plugin contains a Stored Cross-Site Scripting (XSS) vulnerability in the lazy-loading image processing function that allows authenticated attackers with Contributor-level access to inject arbitrary web scripts into pages. The flaw exists in all versions up to and including 3.1.14 and stems from an overly permissive regular expression that fails to properly validate image tag attributes, enabling attackers to craft malicious image tags that break HTML structure and promote attribute values into executable code. This vulnerability carries a moderate CVSS score of 6.4 and requires user interaction for stored XSS payloads to execute when pages are accessed.

Technical ContextAI

The vulnerability resides in the add_lazyload function within the Autoptimize plugin (CPE: cpe:2.3:a:optimizingmatters:autoptimize:*:*:*:*:*:*:*:*), specifically in the autoptimizeImages.php class file. The root cause is classified as CWE-79 (Improper Neutralization of Input During Web Page Generation, or Cross-site Scripting). The vulnerable code uses a naive regular expression pattern matching \ssrc= (a space followed by 'src=') to process image tags for lazy-loading functionality. This regex-based string replacement approach fails to distinguish between legitimate src attributes within img tags and malicious src sequences injected elsewhere in the HTML, such as within other attribute values or as part of URL parameters. When an attacker crafts an image tag with a src URL containing a space followed by 'src=', the regex matches unintended occurrences and breaks the HTML structure, effectively promoting text that should remain in attribute values into executable HTML attributes where inline event handlers or protocol handlers can be injected.

RemediationAI

Immediately upgrade Autoptimize to a version released after 3.1.14, which includes the fix committed to the GitHub repository (https://github.com/futtta/autoptimize/commit/a0f87112fe80b5a97b036229c41cb18454392858). In WordPress admin, navigate to Plugins, find Autoptimize, and click Update. As an interim measure for organizations unable to patch immediately, restrict Contributor-level access to only trusted users, audit existing contributors for compromise, and review page content and post revisions for suspicious image tags containing space-separated src attributes. Consider implementing a Web Application Firewall (WAF) rule to detect and block HTTP requests containing image tags with the malicious pattern (space followed by src= in URL parameters or post content). Monitor WordPress audit logs for posts created or modified by lower-privileged users during the vulnerability window to identify potential exploitation attempts.

CVE-2021-24376 CRITICAL POC
9.8 Jun 21

The Autoptimize WordPress plugin before 2.7.8 attempts to delete malicious files (such as .php) form the uploaded archiv

CVE-2026-3220 HIGH POC
8.8 May 18

Unauthenticated stored cross-site scripting affects the Autoptimize (before 3.1.15), Clearfy Cache (before 2.4.2), and S

CVE-2021-24377 HIGH POC
8.1 Jun 21

The Autoptimize WordPress plugin before 2.7.8 attempts to remove potential malicious files from the extracted archive up

CVE-2020-24948 HIGH POC
7.2 Sep 03

The ao_ccss_import AJAX call in Autoptimize Wordpress Plugin 2.7.6 does not ensure that the file provided is a legitimat

CVE-2023-2113 MEDIUM POC
4.8 May 30

The Autoptimize WordPress plugin before 3.1.7 does not sanitise and escape the settings imported from a previous export,

CVE-2022-2635 MEDIUM POC
4.8 Sep 16

The Autoptimize WordPress plugin before 3.1.1 does not sanitise and escape some of its settings, which could allow high

CVE-2021-24378 MEDIUM POC
4.8 Jun 21

The Autoptimize WordPress plugin before 2.7.8 does not check for malicious files such as .html in the archive uploaded v

CVE-2021-24332 MEDIUM POC
4.8 May 24

The Autoptimize WordPress plugin before 2.8.4 was missing proper escaping and sanitisation in some of its settings, allo

CVE-2026-2352 MEDIUM
6.4 Mar 20

A Stored Cross-Site Scripting (XSS) vulnerability exists in the Autoptimize WordPress plugin through version 3.1.14, cau

Share

CVE-2026-2430 vulnerability details – vuln.today

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy