CVE-2023-40784

9.8 CRITICAL

📋 TL;DR

DedeCMS 5.7.102 contains an unrestricted file upload vulnerability in the module_make.php component that allows attackers to upload arbitrary files, including malicious scripts. This affects all DedeCMS installations running version 5.7.102. Attackers can exploit this to achieve remote code execution and compromise the web server.

💻 Affected Systems

Products:
  • DedeCMS
Versions: 5.7.102
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Affects default installations with the uploads/dede/module_make.php endpoint accessible.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete server compromise leading to data theft, ransomware deployment, lateral movement to internal networks, and persistent backdoor installation.

🟠

Likely Case

Webshell upload leading to website defacement, data exfiltration, and use as a pivot point for further attacks.

🟢

If Mitigated

File upload attempts blocked at WAF or detected by file integrity monitoring before execution.

🌐 Internet-Facing: HIGH - Directly exploitable via HTTP requests without authentication, affecting publicly accessible websites.
🏢 Internal Only: MEDIUM - Internal applications could be targeted via phishing or compromised internal accounts.

🎯 Exploit Status

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

Simple HTTP POST request with malicious file upload to vulnerable endpoint.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 5.7.103 or later

Vendor Advisory: https://www.dedecms.com/

Restart Required: No

Instructions:

1. Backup current installation. 2. Download latest version from official DedeCMS website. 3. Replace vulnerable files with patched versions. 4. Verify uploads/dede/module_make.php has proper file validation.

🔧 Temporary Workarounds

Block vulnerable endpoint

all

Restrict access to the vulnerable PHP file via web server configuration.

# Apache: RewriteRule ^uploads/dede/module_make\.php$ - [F,L]
# Nginx: location ~ ^/uploads/dede/module_make\.php$ { return 403; }

File upload restrictions

all

Implement strict file upload validation in web application firewall or server configuration.

# Example mod_security rule: SecRule FILES_TMPNAMES "@rx \.(php|phtml|phar)" "id:1001,phase:2,deny"

🧯 If You Can't Patch

  • Implement strict WAF rules to block file uploads to the vulnerable endpoint and monitor for exploitation attempts.
  • Disable or remove the uploads/dede/module_make.php file if not required for functionality.

🔍 How to Verify

Check if Vulnerable:

Check if file exists at website_root/uploads/dede/module_make.php and test file upload functionality.

Check Version:

Check DedeCMS version in /data/common.inc.php or admin panel.

Verify Fix Applied:

Attempt to upload a test file with PHP extension to the endpoint - should be rejected with proper validation.

📡 Detection & Monitoring

Log Indicators:

  • HTTP POST requests to /uploads/dede/module_make.php with file uploads
  • File creation events in upload directories with PHP extensions
  • Webshell execution patterns in access logs

Network Indicators:

  • Unusual outbound connections from web server following file uploads
  • HTTP requests with suspicious file upload parameters

SIEM Query:

source="web_logs" AND (uri="/uploads/dede/module_make.php" OR file_extension="php" AND upload_action="true")

🔗 References

📤 Share & Export