Severity by source
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
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N
Lifecycle Timeline
3DescriptionCVE.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.
The isMail transport in PHPMailer before 5.2.20 might allow remote attackers to pass extra parameters to the mail comman
The Backup Migration plugin for WordPress is vulnerable to Remote Code Execution in all versions up to, and including, 1
The Hash Form - Drag & Drop Form Builder plugin for WordPress is vulnerable to arbitrary file uploads due to missing fil
The GiveWP - Donation Plugin and Fundraising Platform plugin for WordPress is vulnerable to PHP Object Injection in all
The Simple File List plugin for WordPress through version 4.2.2 contains an unauthenticated remote code execution vulner
The AI Engine WordPress plugin through version 3.1.3 exposes Bearer Token values through the /mcp/v1/ REST API endpoint
The Ninja Forms plugin before 2.9.42.1 for WordPress allows remote attackers to conduct PHP object injection attacks via
The Business Directory Plugin - Easy Listing Directories for WordPress plugin for WordPress is vulnerable to time-based
SQL injection in the NotificationX WordPress plugin (versions up to and including 2.8.2) allows unauthenticated remote a
The POST SMTP Mailer - Email log, Delivery Failure Notifications and Best Mail SMTP for WordPress plugin for WordPress i
The MasterStudy LMS WordPress Plugin - for Online Courses and Education plugin for WordPress is vulnerable to union base
The Country State City Dropdown CF7 plugin for WordPress is vulnerable to SQL Injection via the ‘cnt’ and 'sid' paramete
Same weakness CWE-79 – Cross-site Scripting (XSS)
View allShare
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-13842