CVE-2022-1538

7.2 HIGH

📋 TL;DR

The Theme Demo Import WordPress plugin before version 1.1.1 contains an unrestricted file upload vulnerability. High-privilege users (administrators) can upload arbitrary files, including PHP files, even when WordPress security constants FILE_MODS and FILE_EDIT are disabled. This affects WordPress sites using the vulnerable plugin version.

💻 Affected Systems

Products:
  • Theme Demo Import WordPress Plugin
Versions: All versions before 1.1.1
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Requires WordPress installation with the plugin activated and an admin user account.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

An attacker with admin credentials could upload a malicious PHP file and achieve remote code execution, potentially leading to complete site compromise, data theft, or server takeover.

🟠

Likely Case

Compromised admin accounts could upload webshells or backdoors, enabling persistent access, data exfiltration, or further attacks on the server environment.

🟢

If Mitigated

With proper access controls and admin account security, the risk is limited to authorized administrators who might accidentally or intentionally upload malicious files.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ✅ No
Complexity: LOW

Exploitation requires admin-level credentials. The vulnerability is simple to exploit once credentials are obtained.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 1.1.1

Vendor Advisory: https://wpscan.com/vulnerability/b19adf7c-3983-487b-9b46-0f2922b08c1c/

Restart Required: No

Instructions:

1. Log into WordPress admin panel. 2. Navigate to Plugins > Installed Plugins. 3. Find 'Theme Demo Import' plugin. 4. Click 'Update Now' if update is available. 5. Alternatively, download version 1.1.1+ from WordPress repository and manually update.

🔧 Temporary Workarounds

Disable Plugin

all

Temporarily disable the vulnerable plugin until patched.

wp plugin deactivate theme-demo-import

Remove Plugin

all

Completely remove the vulnerable plugin if not needed.

wp plugin delete theme-demo-import

🧯 If You Can't Patch

  • Restrict admin account access to trusted users only and implement strong password policies.
  • Implement file integrity monitoring on WordPress upload directories to detect unauthorized file uploads.

🔍 How to Verify

Check if Vulnerable:

Check WordPress admin panel > Plugins > Installed Plugins for 'Theme Demo Import' version. If version is below 1.1.1, it is vulnerable.

Check Version:

wp plugin get theme-demo-import --field=version

Verify Fix Applied:

After updating, verify plugin version shows 1.1.1 or higher in WordPress admin plugins list.

📡 Detection & Monitoring

Log Indicators:

  • Unusual file uploads to wp-content/uploads/theme-demo-import/ directory
  • Admin user uploading .php files via plugin interface

Network Indicators:

  • POST requests to /wp-admin/admin-ajax.php with action=theme_demo_import_ajax_file_upload

SIEM Query:

source="wordpress.log" AND ("theme_demo_import" OR "theme-demo-import") AND ("upload" OR "file_upload")

🔗 References

📤 Share & Export