CVE-2024-40545

8.8 HIGH

📋 TL;DR

This vulnerability allows attackers to upload malicious files to the PublicCMS administration interface, leading to remote code execution. It affects PublicCMS v4.0.202302.e installations with the vulnerable /admin/cmsWebFile/doUpload endpoint accessible. Attackers can gain full control of affected systems.

💻 Affected Systems

Products:
  • PublicCMS
Versions: v4.0.202302.e
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Requires access to the /admin/cmsWebFile/doUpload endpoint, typically part of the CMS administration interface.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete system compromise with attacker gaining root/admin privileges, data exfiltration, ransomware deployment, and persistent backdoor installation.

🟠

Likely Case

Web server compromise leading to website defacement, data theft, and use as pivot point for internal network attacks.

🟢

If Mitigated

Attack blocked at web application firewall level with file upload restrictions preventing malicious payloads from reaching the vulnerable endpoint.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Exploitation requires authentication to the admin interface. The vulnerability is well-documented in public issue trackers with technical details.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: v4.0.202402.e or later

Vendor Advisory: https://gitee.com/sanluan/PublicCMS/issues/IAAIZD

Restart Required: Yes

Instructions:

1. Backup current installation and database. 2. Download latest version from official repository. 3. Replace vulnerable files with patched version. 4. Restart web server and application services. 5. Verify functionality.

🔧 Temporary Workarounds

Restrict Admin Access

all

Limit access to /admin/ paths to trusted IP addresses only

# Apache: <Location /admin/>
#   Order deny,allow
#   Deny from all
#   Allow from 192.168.1.0/24
# </Location>
# Nginx: location /admin/ {
#   allow 192.168.1.0/24;
#   deny all;
# }

File Upload Restrictions

all

Implement web server-level restrictions on file uploads to the vulnerable endpoint

# Block specific file types
location ~* \.(php|jsp|asp|aspx|sh|pl|py)$ {
    deny all;
}

🧯 If You Can't Patch

  • Implement strict network segmentation to isolate the PublicCMS instance from critical systems
  • Deploy a web application firewall (WAF) with file upload protection rules and virtual patching

🔍 How to Verify

Check if Vulnerable:

Check if PublicCMS version is v4.0.202302.e and the /admin/cmsWebFile/doUpload endpoint exists and accepts file uploads without proper validation.

Check Version:

Check PublicCMS version in admin dashboard or examine version files in installation directory

Verify Fix Applied:

Verify PublicCMS version is v4.0.202402.e or later and test that the /admin/cmsWebFile/doUpload endpoint properly validates file types and extensions.

📡 Detection & Monitoring

Log Indicators:

  • Unusual file uploads to /admin/cmsWebFile/doUpload
  • Execution of unexpected system commands from web process
  • Uploads of files with double extensions (.php.jpg, .jsp.png)

Network Indicators:

  • POST requests to /admin/cmsWebFile/doUpload with executable file content
  • Outbound connections from web server to suspicious IPs post-upload

SIEM Query:

source="web_server" AND (uri="/admin/cmsWebFile/doUpload" OR file_extension IN ("php", "jsp", "asp", "aspx", "sh", "pl", "py"))

🔗 References

📤 Share & Export