CVE-2020-21325

8.8 HIGH

📋 TL;DR

This vulnerability allows remote attackers to execute arbitrary code on WUZHI CMS systems via an unsafe file upload mechanism in the set_chache method. Attackers can upload malicious files that get executed on the server. All users running vulnerable versions of WUZHI CMS are affected.

💻 Affected Systems

Products:
  • WUZHI CMS
Versions: v4.1.0
Operating Systems: All platforms running PHP
Default Config Vulnerable: ⚠️ Yes
Notes: The vulnerability exists in the default installation of version 4.1.0.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete system compromise allowing attackers to execute arbitrary commands, steal data, install backdoors, or pivot to other systems.

🟠

Likely Case

Webshell deployment leading to data theft, defacement, or use as part of a botnet.

🟢

If Mitigated

Attack blocked at WAF level or file upload prevented, resulting in no impact.

🌐 Internet-Facing: HIGH - Web CMS systems are typically internet-facing and this vulnerability allows unauthenticated remote code execution.
🏢 Internal Only: MEDIUM - Internal systems could still be compromised via internal attackers or lateral movement.

🎯 Exploit Status

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

The GitHub issue shows exploitation details and the vulnerability is straightforward to exploit.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Versions after v4.1.0

Vendor Advisory: https://github.com/wuzhicms/wuzhicms/issues/188

Restart Required: No

Instructions:

1. Upgrade to the latest version of WUZHI CMS. 2. Replace the vulnerable function\common.func.php file with the patched version. 3. Verify the set_chache method has proper file validation.

🔧 Temporary Workarounds

File Upload Restriction

all

Restrict file uploads to the cache directory and implement strict file type validation.

# Modify PHP configuration to restrict upload directories
# Add file extension validation in application code

WAF Rule Implementation

all

Deploy web application firewall rules to block malicious file upload attempts.

# Example ModSecurity rule: SecRule ARGS "@rx \.(php|phtml)" "id:1001,deny"

🧯 If You Can't Patch

  • Implement strict file upload validation in the set_chache method to only allow safe file types.
  • Restrict PHP execution in the cache directory using .htaccess or server configuration.

🔍 How to Verify

Check if Vulnerable:

Check if your WUZHI CMS version is 4.1.0 and examine the function\common.func.php file for the set_chache method without proper file validation.

Check Version:

Check the version.php file or admin panel for version information.

Verify Fix Applied:

Verify the set_chache method now validates file extensions and restricts uploads to safe file types only.

📡 Detection & Monitoring

Log Indicators:

  • Unusual file uploads to cache directory
  • PHP file execution from cache directory
  • Webshell-like file names in upload logs

Network Indicators:

  • POST requests with file uploads to vulnerable endpoints
  • Unexpected outbound connections from web server

SIEM Query:

source="web_logs" AND (uri="/function/common.func.php" OR file_upload="*.php")

🔗 References

📤 Share & Export