CVE-2023-3342
📋 TL;DR
The User Registration WordPress plugin allows authenticated attackers with subscriber-level access or higher to upload arbitrary files due to a hardcoded encryption key and missing file type validation. This vulnerability affects versions up to 3.0.2 and can lead to remote code execution on vulnerable WordPress sites.
💻 Affected Systems
- WordPress User Registration plugin
📦 What is this software?
⚠️ Risk & Real-World Impact
Worst Case
Full server compromise through remote code execution, allowing attackers to install backdoors, steal data, deface websites, or pivot to other systems.
Likely Case
Website defacement, malware distribution, credential theft, or data exfiltration through uploaded malicious files.
If Mitigated
Limited impact with proper file upload restrictions and monitoring, potentially only affecting the specific plugin directory.
🎯 Exploit Status
Exploit code is publicly available. Requires authenticated access but subscriber-level permissions are sufficient.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: 3.0.2.1
Vendor Advisory: https://plugins.trac.wordpress.org/changeset/2933689/user-registration/trunk/includes/functions-ur-core.php
Restart Required: No
Instructions:
1. Log into WordPress admin panel. 2. Navigate to Plugins → Installed Plugins. 3. Find 'User Registration' plugin. 4. Click 'Update Now' if update is available. 5. If no update appears, manually download version 3.0.2.1 from WordPress.org and replace plugin files.
🔧 Temporary Workarounds
Disable plugin
allTemporarily disable the User Registration plugin until patched
wp plugin deactivate user-registration
Restrict file uploads
linuxAdd server-side restrictions on file uploads in the plugin upload directory
chmod 755 /path/to/wp-content/uploads/user_registration/
find /path/to/wp-content/uploads/user_registration/ -type f -name '*.php' -delete
🧯 If You Can't Patch
- Remove subscriber upload capabilities or restrict to trusted users only
- Implement web application firewall rules to block suspicious file uploads to the plugin endpoint
🔍 How to Verify
Check if Vulnerable:
Check WordPress admin → Plugins → Installed Plugins for User Registration plugin version. If version is 3.0.2 or lower, you are vulnerable.
Check Version:
wp plugin get user-registration --field=version
Verify Fix Applied:
Verify plugin version shows 3.0.2.1 or higher in WordPress admin panel.
📡 Detection & Monitoring
Log Indicators:
- Multiple failed/successful file uploads to /wp-admin/admin-ajax.php with action=ur_upload_profile_pic
- Unusual file types (.php, .exe, .sh) in uploads/user_registration/ directory
Network Indicators:
- POST requests to /wp-admin/admin-ajax.php with file uploads and action parameter containing 'ur_upload_profile_pic'
SIEM Query:
source="web_logs" AND uri_path="/wp-admin/admin-ajax.php" AND method="POST" AND action="ur_upload_profile_pic" AND file_extension IN ("php", "exe", "sh", "py")
🔗 References
- http://packetstormsecurity.com/files/173434/WordPress-User-Registration-3.0.2-Arbitrary-File-Upload.html
- https://lana.codes/lanavdb/c0a58dff-7a5b-4cc0-82d6-2255e61d801c/
- https://plugins.trac.wordpress.org/browser/user-registration/tags/3.0.1/includes/functions-ur-core.php#L3156
- https://plugins.trac.wordpress.org/changeset/2933689/user-registration/trunk/includes/functions-ur-core.php
- https://www.wordfence.com/threat-intel/vulnerabilities/id/a979e885-f7dd-4616-a881-64f3d97c309d?source=cve
- http://packetstormsecurity.com/files/173434/WordPress-User-Registration-3.0.2-Arbitrary-File-Upload.html
- https://lana.codes/lanavdb/c0a58dff-7a5b-4cc0-82d6-2255e61d801c/
- https://plugins.trac.wordpress.org/browser/user-registration/tags/3.0.1/includes/functions-ur-core.php#L3156
- https://plugins.trac.wordpress.org/changeset/2933689/user-registration/trunk/includes/functions-ur-core.php
- https://www.wordfence.com/threat-intel/vulnerabilities/id/a979e885-f7dd-4616-a881-64f3d97c309d?source=cve