CVE-2021-34619
📋 TL;DR
This CSRF vulnerability in WooCommerce Stock Manager WordPress plugin allows attackers to trick authenticated administrators into uploading arbitrary files, potentially leading to remote code execution. It affects WordPress sites using the plugin up to version 2.5.7. Attackers can exploit this without direct access to the vulnerable system.
💻 Affected Systems
- WooCommerce Stock Manager WordPress Plugin
📦 What is this software?
⚠️ Risk & Real-World Impact
Worst Case
Complete site compromise via webshell upload leading to data theft, defacement, or ransomware deployment
Likely Case
Malicious file upload enabling backdoor access, data exfiltration, or cryptocurrency mining
If Mitigated
Failed exploitation attempts logged with no impact due to proper CSRF protections
🎯 Exploit Status
Exploitation requires tricking authenticated admin into clicking malicious link/visiting crafted page
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: 2.5.8 and later
Vendor Advisory: https://plugins.trac.wordpress.org/changeset/2499178/woocommerce-stock-manager/trunk/admin/views/import-export.php
Restart Required: No
Instructions:
1. Log into WordPress admin panel
2. Navigate to Plugins → Installed Plugins
3. Find WooCommerce Stock Manager
4. Click 'Update Now' if available
5. If manual update needed, download version 2.5.8+ from WordPress.org
6. Deactivate old plugin, upload new version, activate
🔧 Temporary Workarounds
Disable Plugin
allTemporarily disable vulnerable plugin until patched
wp plugin deactivate woocommerce-stock-manager
Add CSRF Protection
allAdd nonce verification to vulnerable file via custom code
Edit /wp-content/plugins/woocommerce-stock-manager/admin/views/import-export.php to add wp_verify_nonce() checks
🧯 If You Can't Patch
- Implement strict file upload restrictions via .htaccess or web server configuration
- Use web application firewall with CSRF protection and file upload filtering
🔍 How to Verify
Check if Vulnerable:
Check plugin version in WordPress admin under Plugins → Installed Plugins
Check Version:
wp plugin get woocommerce-stock-manager --field=version
Verify Fix Applied:
Verify version is 2.5.8 or higher and check import-export.php contains nonce verification
📡 Detection & Monitoring
Log Indicators:
- POST requests to /wp-admin/admin.php?page=import-export without valid nonce
- Unexpected file uploads to wp-content/uploads via stock manager
Network Indicators:
- HTTP requests with file uploads to import-export endpoint from unexpected sources
SIEM Query:
source="wordpress.log" AND ("import-export.php" OR "stock-manager") AND ("POST" OR "upload")
🔗 References
- https://plugins.trac.wordpress.org/browser/woocommerce-stock-manager/trunk/admin/views/import-export.php?rev=2499178
- https://www.wordfence.com/blog/2021/06/high-severity-vulnerability-patched-in-woocommerce-stock-manager-plugin/
- https://plugins.trac.wordpress.org/browser/woocommerce-stock-manager/trunk/admin/views/import-export.php?rev=2499178
- https://www.wordfence.com/blog/2021/06/high-severity-vulnerability-patched-in-woocommerce-stock-manager-plugin/