CVE-2025-13401: CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in optimizingmatters Autoptimize
The Autoptimize plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the LCP Image to preload metabox in all versions up to, and including, 3.1.13 due to insufficient input sanitization and output escaping on user-supplied image attributes in the "create_img_preload_tag" function. 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.
AI Analysis
Technical Summary
CVE-2025-13401 is a stored Cross-Site Scripting (XSS) vulnerability identified in the Autoptimize plugin for WordPress, a widely used tool for optimizing website performance by aggregating, minifying, and caching scripts and styles. The vulnerability exists in the 'create_img_preload_tag' function, which handles the generation of preload tags for Largest Contentful Paint (LCP) images. Due to insufficient input sanitization and output escaping of user-supplied image attributes, authenticated users with contributor-level privileges or higher can inject arbitrary JavaScript code. This malicious code is stored persistently and executed in the context of any user who accesses the affected page, potentially compromising user sessions, redirecting users to malicious sites, or performing unauthorized actions on behalf of users. The vulnerability requires authentication but no additional user interaction, increasing its risk within environments where multiple users have contributor or higher access. The CVSS 3.1 score of 6.4 reflects a medium severity, with network attack vector, low attack complexity, and partial impact on confidentiality and integrity but no impact on availability. No public exploit code or active exploitation has been reported yet, but the vulnerability's nature and the popularity of the plugin make it a significant concern for WordPress site administrators.
Potential Impact
For European organizations, this vulnerability poses a risk primarily to websites using the Autoptimize plugin on WordPress, which is prevalent across many sectors including e-commerce, media, and government portals. Exploitation could lead to theft of user credentials, session hijacking, defacement, or distribution of malware via injected scripts. This can damage organizational reputation, lead to data breaches involving personal data protected under GDPR, and cause operational disruptions. Since the attack requires contributor-level access, insider threats or compromised accounts pose a significant risk. The persistent nature of stored XSS means that once exploited, the malicious payload can affect all visitors to the compromised pages, amplifying the impact. Organizations with high web traffic and sensitive user data are particularly vulnerable, and regulatory consequences in Europe could be severe if personal data is compromised.
Mitigation Recommendations
Immediate mitigation involves updating the Autoptimize plugin to a version where this vulnerability is patched once available. Until then, organizations should restrict contributor-level access to trusted users only and audit existing user privileges to minimize risk. Implementing Web Application Firewalls (WAF) with rules to detect and block malicious script injections targeting the affected plugin can reduce exposure. Regularly scanning WordPress sites for injected scripts and unusual content changes can help detect exploitation attempts early. Employ Content Security Policy (CSP) headers to limit the execution of unauthorized scripts on affected sites. Additionally, monitoring logs for suspicious activity from authenticated users and enforcing strong authentication mechanisms (e.g., MFA) can reduce the likelihood of account compromise. Backup and recovery plans should be reviewed to ensure rapid restoration if an attack occurs.
Affected Countries
Germany, United Kingdom, France, Netherlands, Italy, Spain, Poland, Sweden
CVE-2025-13401: CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in optimizingmatters Autoptimize
Description
The Autoptimize plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the LCP Image to preload metabox in all versions up to, and including, 3.1.13 due to insufficient input sanitization and output escaping on user-supplied image attributes in the "create_img_preload_tag" function. 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.
AI-Powered Analysis
Technical Analysis
CVE-2025-13401 is a stored Cross-Site Scripting (XSS) vulnerability identified in the Autoptimize plugin for WordPress, a widely used tool for optimizing website performance by aggregating, minifying, and caching scripts and styles. The vulnerability exists in the 'create_img_preload_tag' function, which handles the generation of preload tags for Largest Contentful Paint (LCP) images. Due to insufficient input sanitization and output escaping of user-supplied image attributes, authenticated users with contributor-level privileges or higher can inject arbitrary JavaScript code. This malicious code is stored persistently and executed in the context of any user who accesses the affected page, potentially compromising user sessions, redirecting users to malicious sites, or performing unauthorized actions on behalf of users. The vulnerability requires authentication but no additional user interaction, increasing its risk within environments where multiple users have contributor or higher access. The CVSS 3.1 score of 6.4 reflects a medium severity, with network attack vector, low attack complexity, and partial impact on confidentiality and integrity but no impact on availability. No public exploit code or active exploitation has been reported yet, but the vulnerability's nature and the popularity of the plugin make it a significant concern for WordPress site administrators.
Potential Impact
For European organizations, this vulnerability poses a risk primarily to websites using the Autoptimize plugin on WordPress, which is prevalent across many sectors including e-commerce, media, and government portals. Exploitation could lead to theft of user credentials, session hijacking, defacement, or distribution of malware via injected scripts. This can damage organizational reputation, lead to data breaches involving personal data protected under GDPR, and cause operational disruptions. Since the attack requires contributor-level access, insider threats or compromised accounts pose a significant risk. The persistent nature of stored XSS means that once exploited, the malicious payload can affect all visitors to the compromised pages, amplifying the impact. Organizations with high web traffic and sensitive user data are particularly vulnerable, and regulatory consequences in Europe could be severe if personal data is compromised.
Mitigation Recommendations
Immediate mitigation involves updating the Autoptimize plugin to a version where this vulnerability is patched once available. Until then, organizations should restrict contributor-level access to trusted users only and audit existing user privileges to minimize risk. Implementing Web Application Firewalls (WAF) with rules to detect and block malicious script injections targeting the affected plugin can reduce exposure. Regularly scanning WordPress sites for injected scripts and unusual content changes can help detect exploitation attempts early. Employ Content Security Policy (CSP) headers to limit the execution of unauthorized scripts on affected sites. Additionally, monitoring logs for suspicious activity from authenticated users and enforcing strong authentication mechanisms (e.g., MFA) can reduce the likelihood of account compromise. Backup and recovery plans should be reviewed to ensure rapid restoration if an attack occurs.
Affected Countries
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- Wordfence
- Date Reserved
- 2025-11-19T10:38:07.284Z
- Cvss Version
- 3.1
- State
- PUBLISHED
Threat ID: 6930444551392e1c8b19b543
Added to database: 12/3/2025, 2:08:05 PM
Last enriched: 12/3/2025, 2:24:04 PM
Last updated: 12/5/2025, 1:11:34 AM
Views: 24
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Related Threats
CVE-2025-62223: CWE-451: User Interface (UI) Misrepresentation of Critical Information in Microsoft Microsoft Edge (Chromium-based)
MediumCVE-2025-14052: Improper Access Controls in youlaitech youlai-mall
MediumCVE-2025-13373: CWE-89 Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') in Advantech iView
HighCVE-2025-66564: CWE-405: Asymmetric Resource Consumption (Amplification) in sigstore timestamp-authority
HighCVE-2025-66559: CWE-129: Improper Validation of Array Index in taikoxyz taiko-mono
HighActions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.