CVE-2025-60040
📋 TL;DR
This stored cross-site scripting (XSS) vulnerability in the wp-mpdf WordPress plugin allows attackers to inject malicious scripts into web pages generated by the plugin. When users view affected pages, the scripts execute in their browsers, potentially stealing session cookies or performing actions on their behalf. All WordPress sites using vulnerable versions of wp-mpdf are affected.
💻 Affected Systems
- wp-mpdf WordPress plugin
⚠️ Manual Verification Required
This CVE does not have specific version information in our database, so automatic vulnerability detection cannot determine if your system is affected.
Why? The CVE database entry doesn't specify which versions are vulnerable (no version ranges provided by the vendor/NVD).
🔒 Custom verification scripts are available for registered users. Sign up free to download automated test scripts.
- Review the CVE details at NVD
- Check vendor security advisories for your specific version
- Test if the vulnerability is exploitable in your environment
- Consider updating to the latest version as a precaution
⚠️ Risk & Real-World Impact
Worst Case
Attackers could steal administrator session cookies, take over WordPress sites, deface websites, or redirect visitors to malicious sites, potentially leading to complete site compromise and data theft.
Likely Case
Attackers inject malicious JavaScript that steals user session cookies or credentials when users view affected PDF pages, leading to account compromise and unauthorized access.
If Mitigated
With proper input validation and output encoding, malicious scripts would be neutralized before reaching users, preventing execution while maintaining PDF functionality.
🎯 Exploit Status
Exploitation requires the ability to inject malicious input into the PDF generation process, which typically requires some level of access to the WordPress site.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Version after 3.9.1
Vendor Advisory: https://patchstack.com/database/wordpress/plugin/wp-mpdf/vulnerability/wordpress-wp-mpdf-plugin-3-9-1-cross-site-scripting-xss-vulnerability?_s_id=cve
Restart Required: No
Instructions:
1. Log into WordPress admin panel. 2. Navigate to Plugins → Installed Plugins. 3. Find wp-mpdf and check for updates. 4. If update available, click 'Update Now'. 5. If no update available, deactivate and remove the plugin until a patched version is released.
🔧 Temporary Workarounds
Disable wp-mpdf plugin
WordPressTemporarily disable the vulnerable plugin until a patch can be applied
wp plugin deactivate wp-mpdf
Implement WAF rules
allConfigure web application firewall to block XSS payloads targeting PDF generation endpoints
🧯 If You Can't Patch
- Restrict access to PDF generation functionality to trusted users only
- Implement Content Security Policy (CSP) headers to restrict script execution
🔍 How to Verify
Check if Vulnerable:
Check WordPress admin panel → Plugins → Installed Plugins for wp-mpdf version. If version is 3.9.1 or earlier, the site is vulnerable.
Check Version:
wp plugin get wp-mpdf --field=version
Verify Fix Applied:
After updating, verify wp-mpdf version is higher than 3.9.1 in WordPress admin panel.
📡 Detection & Monitoring
Log Indicators:
- Unusual POST requests to PDF generation endpoints
- JavaScript payloads in PDF-related parameters
- Multiple failed PDF generation attempts
Network Indicators:
- Malicious script tags in PDF generation requests
- Suspicious user-agent strings targeting wp-mpdf endpoints
SIEM Query:
source="wordpress.log" AND ("wp-mpdf" OR "/mpdf/") AND ("<script>" OR "javascript:" OR "onerror=" OR "onload=")