CVE-2024-4160
📋 TL;DR
This stored XSS vulnerability in WordPress Download Manager plugin allows authenticated attackers with contributor-level access or higher to inject malicious scripts into website pages. When users visit compromised pages, the scripts execute in their browsers, potentially stealing credentials or performing unauthorized actions. All WordPress sites using Download Manager versions up to 3.2.90 are affected.
💻 Affected Systems
- WordPress Download Manager plugin
📦 What is this software?
⚠️ Risk & Real-World Impact
Worst Case
Attackers could steal administrator credentials, deface websites, redirect visitors to malicious sites, or install backdoors for persistent access.
Likely Case
Attackers with contributor access inject malicious scripts to steal user session cookies or credentials, potentially gaining administrative access to the WordPress site.
If Mitigated
With proper user access controls and content security policies, impact is limited to potential defacement of specific pages without credential theft.
🎯 Exploit Status
Exploitation requires contributor-level WordPress access; technical details and proof-of-concept are publicly available in vulnerability reports.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: 3.2.91 and later
Vendor Advisory: https://wordpress.org/plugins/download-manager/#developers
Restart Required: No
Instructions:
1. Log into WordPress admin panel. 2. Navigate to Plugins → Installed Plugins. 3. Find Download Manager plugin. 4. Click 'Update Now' if update available. 5. Alternatively, download version 3.2.91+ from WordPress repository and replace plugin files.
🔧 Temporary Workarounds
Remove vulnerable shortcode usage
allRemove or disable usage of the 'wpdm-all-packages' shortcode from all posts and pages
Restrict user roles
allLimit contributor and author roles to trusted users only; review all user accounts with editing privileges
🧯 If You Can't Patch
- Implement Content Security Policy (CSP) headers to restrict script execution
- Install web application firewall (WAF) with XSS protection rules
🔍 How to Verify
Check if Vulnerable:
Check WordPress admin panel → Plugins → Installed Plugins → Download Manager version. If version is 3.2.90 or lower, you are vulnerable.
Check Version:
wp plugin list --name=download-manager --field=version (if WP-CLI installed)
Verify Fix Applied:
After updating, verify Download Manager version shows 3.2.91 or higher in WordPress plugins list.
📡 Detection & Monitoring
Log Indicators:
- Unusual post/page edits by contributor-level users
- Suspicious script tags in post/page content containing 'wpdm-all-packages'
Network Indicators:
- Unexpected JavaScript execution from WordPress pages
- Suspicious outbound connections from user browsers after visiting specific pages
SIEM Query:
source="wordpress.log" AND ("wpdm-all-packages" OR "download-manager") AND ("post_modified" OR "updated_post")
🔗 References
- https://plugins.trac.wordpress.org/browser/download-manager/trunk/src/Package/views/all-packages-shortcode.php?rev=2996137#L202
- https://plugins.trac.wordpress.org/changeset/3080781/
- https://wordpress.org/plugins/download-manager/
- https://wordpress.org/plugins/download-manager/#developers
- https://www.wordfence.com/threat-intel/vulnerabilities/id/9f51258a-e228-412f-9d97-28ab679136d7?source=cve
- https://www.wpdownloadmanager.com/doc/short-codes/wpdm_all_packages-list-all-downloads-in-tabular-format-in-a-page/
- https://plugins.trac.wordpress.org/browser/download-manager/trunk/src/Package/views/all-packages-shortcode.php?rev=2996137#L202
- https://plugins.trac.wordpress.org/changeset/3080781/
- https://wordpress.org/plugins/download-manager/
- https://wordpress.org/plugins/download-manager/#developers
- https://www.wordfence.com/threat-intel/vulnerabilities/id/9f51258a-e228-412f-9d97-28ab679136d7?source=cve
- https://www.wpdownloadmanager.com/doc/short-codes/wpdm_all_packages-list-all-downloads-in-tabular-format-in-a-page/