CVE-2023-33253

8.8 HIGH

📋 TL;DR

CVE-2023-33253 is a remote code execution vulnerability in LabCollector that allows authenticated low-privileged users to upload malicious PHP files and execute arbitrary system commands. The vulnerability affects LabCollector versions 6.0 through 6.15 due to insufficient file validation in the message function. Organizations running vulnerable versions of LabCollector are at risk of complete system compromise.

💻 Affected Systems

Products:
  • LabCollector
Versions: 6.0 through 6.15
Operating Systems: All operating systems running LabCollector
Default Config Vulnerable: ⚠️ Yes
Notes: Requires authenticated access, but even low-privileged users can exploit this vulnerability. The message function with insufficient file validation is the vulnerable component.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete system takeover with attacker gaining root/system-level access, data exfiltration, ransomware deployment, and persistent backdoor installation.

🟠

Likely Case

Attacker gains shell access to the server, accesses sensitive lab data, modifies or deletes records, and potentially moves laterally within the network.

🟢

If Mitigated

Limited impact due to network segmentation, strict file upload policies, and proper privilege separation preventing lateral movement.

🌐 Internet-Facing: HIGH - LabCollector instances exposed to the internet are directly accessible to attackers who can exploit this vulnerability after obtaining low-privileged credentials.
🏢 Internal Only: MEDIUM - Internal attackers or compromised accounts can exploit this vulnerability, but requires initial access to the internal network or valid credentials.

🎯 Exploit Status

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

Exploit code is publicly available on GitHub. Attack requires authenticated access but low privileges are sufficient. File upload bypass technique using double extensions (e.g., shell.jpg.php.shell) is documented.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: LabCollector 6.16 and later

Vendor Advisory: https://labcollector.com/changelog-labcollector/

Restart Required: Yes

Instructions:

1. Backup your LabCollector database and files. 2. Download LabCollector 6.16 or later from the official website. 3. Follow the upgrade instructions in the documentation. 4. Restart the web server and LabCollector services. 5. Verify the fix by checking the version and testing file upload functionality.

🔧 Temporary Workarounds

Restrict File Upload Extensions

all

Configure web server to block uploads of .php files and similar executable extensions

# For Apache: Add to .htaccess
<FilesMatch "\.(php|php3|php4|php5|phtml|phar)$">
    Order Allow,Deny
    Deny from all
</FilesMatch>
# For Nginx: Add to server block
location ~ \.(php|php3|php4|php5|phtml|phar)$ {
    deny all;
}

Disable Message Function

linux

Temporarily disable or restrict access to the vulnerable message function

# Rename or move the message function file
mv /path/to/labcollector/message_function.php /path/to/labcollector/message_function.php.disabled

🧯 If You Can't Patch

  • Implement strict file upload validation at the web application firewall (WAF) level to block double extensions and PHP file uploads
  • Apply network segmentation to isolate LabCollector servers and implement strict access controls limiting which users can access the application

🔍 How to Verify

Check if Vulnerable:

Check LabCollector version in admin panel or by examining the application files. Versions 6.0-6.15 are vulnerable.

Check Version:

Check LabCollector admin dashboard or examine the version.php file in the installation directory

Verify Fix Applied:

After patching, verify version is 6.16 or later. Test file upload functionality with malicious file names to ensure they are properly rejected.

📡 Detection & Monitoring

Log Indicators:

  • Unusual file uploads with double extensions (.php.jpg, .jpg.php.shell)
  • Multiple failed upload attempts followed by successful PHP file upload
  • Suspicious POST requests to message/upload endpoints
  • Web server logs showing execution of unexpected PHP files

Network Indicators:

  • Unusual outbound connections from LabCollector server
  • Traffic to known malicious IPs or domains
  • Unexpected command and control traffic patterns

SIEM Query:

source="web_server_logs" AND (uri="/message/upload" OR uri="*.php") AND (user_agent CONTAINS "curl" OR user_agent CONTAINS "wget" OR user_agent="-")

🔗 References

📤 Share & Export