CVE-2024-58281

8.8 HIGH

📋 TL;DR

Dotclear 2.29 contains an authenticated remote code execution vulnerability where attackers with valid credentials can upload malicious PHP files through the media upload functionality. This allows execution of arbitrary system commands via a crafted PHP shell, potentially compromising the entire web server. All Dotclear 2.29 installations with authenticated user accounts are affected.

💻 Affected Systems

Products:
  • Dotclear
Versions: 2.29
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Requires authenticated user access; default installations with user accounts are vulnerable.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete server compromise leading to data theft, lateral movement to other systems, installation of persistent backdoors, and potential ransomware deployment.

🟠

Likely Case

Web server compromise allowing data exfiltration, defacement, and use as a foothold for further attacks within the network.

🟢

If Mitigated

Limited impact if proper file upload restrictions and web application firewalls are in place, though authenticated users could still cause damage.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Exploit requires authenticated access; public exploit code is available and easy to use.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 2.30 or later

Vendor Advisory: https://git.dotclear.org/explore/repos

Restart Required: No

Instructions:

1. Backup your Dotclear installation and database. 2. Download the latest version from the official repository. 3. Replace all files with the updated version. 4. Verify the version shows 2.30 or higher in the admin panel.

🔧 Temporary Workarounds

Restrict PHP file uploads

all

Configure web server to block PHP file execution in upload directories

For Apache: Add 'php_flag engine off' to .htaccess in upload directory
For Nginx: Add 'location ~ \.php$ { deny all; }' to upload directory config

Implement file type validation

all

Add server-side validation to reject PHP file uploads

Modify media upload handler to check file extensions and MIME types

🧯 If You Can't Patch

  • Disable media upload functionality entirely for all users
  • Implement strict access controls and monitor all authenticated user activity

🔍 How to Verify

Check if Vulnerable:

Check Dotclear version in admin panel or via 'cat ./inc/public/prepend.php | grep DC_VERSION'

Check Version:

grep -r 'DC_VERSION' ./inc/public/prepend.php

Verify Fix Applied:

Confirm version is 2.30 or higher in admin panel and test that PHP files cannot be uploaded via media upload

📡 Detection & Monitoring

Log Indicators:

  • PHP file uploads via media endpoint
  • Unusual POST requests to upload.php with PHP extensions
  • Multiple failed upload attempts followed by successful PHP upload

Network Indicators:

  • POST requests to /admin/media.php with PHP file content
  • Subsequent requests to uploaded PHP files in media directories

SIEM Query:

source="web_logs" (uri_path="/admin/media.php" AND method="POST" AND file_extension="php")

🔗 References

📤 Share & Export