CVE-2020-21483

7.2 HIGH

📋 TL;DR

CVE-2020-21483 is an arbitrary file upload vulnerability in Jizhicms v1.5 that allows attackers to upload malicious files disguised as .jpg images, which are later renamed to PHP files to execute arbitrary code. This affects all Jizhicms v1.5 installations with file upload functionality enabled. Attackers can achieve remote code execution and potentially compromise the entire web server.

💻 Affected Systems

Products:
  • Jizhicms
Versions: v1.5
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Requires file upload functionality to be enabled, which is common in CMS systems for user content.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete server compromise with attacker gaining full control, data exfiltration, installation of persistent backdoors, and lateral movement to other systems.

🟠

Likely Case

Webshell deployment leading to website defacement, data theft, and use of compromised server for further attacks.

🟢

If Mitigated

File uploads blocked or properly validated, limiting impact to denial of service if upload attempts occur.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Exploitation requires attacker to have file upload privileges, but the technique of renaming .jpg to .php after upload is well-documented.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: v1.6 or later

Vendor Advisory: https://github.com/Cherry-toto/jizhicms/issues

Restart Required: No

Instructions:

1. Backup current installation. 2. Download latest version from official repository. 3. Replace vulnerable files with patched versions. 4. Verify file upload validation is working.

🔧 Temporary Workarounds

Disable File Uploads

all

Temporarily disable all file upload functionality in Jizhicms configuration.

Edit configuration files to remove or comment out file upload settings

Web Server File Extension Restrictions

linux

Configure web server to block execution of uploaded files in upload directories.

For Apache: Add 'RemoveHandler .php .phtml .php3' to upload directory .htaccess
For Nginx: Add 'location ~ \.php$ { deny all; }' to upload directory config

🧯 If You Can't Patch

  • Implement strict file type validation on server-side (not just client-side) checking MIME types and file signatures.
  • Store uploaded files outside web root or configure web server to prevent execution in upload directories.

🔍 How to Verify

Check if Vulnerable:

Check if running Jizhicms v1.5 and test file upload functionality with malicious .jpg files that contain PHP code.

Check Version:

Check Jizhicms version in admin panel or examine version files in installation directory.

Verify Fix Applied:

Test file upload with malicious .jpg files - they should be rejected or properly sanitized in v1.6+.

📡 Detection & Monitoring

Log Indicators:

  • Multiple failed file upload attempts
  • Uploads of files with double extensions (.jpg.php)
  • Files being renamed in upload directories

Network Indicators:

  • Unusual POST requests to upload endpoints
  • Traffic patterns suggesting webshell communication

SIEM Query:

source="web_logs" AND (uri="/upload" OR uri="/admin/upload") AND (file_extension="jpg" OR file_extension="php")

🔗 References

📤 Share & Export