CVE-2015-0258
📋 TL;DR
This vulnerability allows remote authenticated users to upload malicious PHP files with alternative extensions (.php3, .php4, .php5, .phtml) through Collabtive's avatar upload functionality, leading to arbitrary code execution. It affects Collabtive versions before 2.1. Attackers need authenticated access to exploit this vulnerability.
💻 Affected Systems
- Collabtive
📦 What is this software?
Ubuntu Linux by Canonical
⚠️ Risk & Real-World Impact
Worst Case
Complete system compromise with attacker gaining remote code execution, potentially leading to data theft, lateral movement, or ransomware deployment.
Likely Case
Attacker uploads web shell, gains persistent access to the server, and exfiltrates sensitive data or uses the server for further attacks.
If Mitigated
Upload attempts are blocked or files are properly sanitized, preventing code execution while maintaining avatar functionality.
🎯 Exploit Status
Multiple public exploit scripts available; requires authenticated user credentials.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: 2.1
Vendor Advisory: https://github.com/philippK-de/Collabtive/commit/9ce6301583669d0a8ecb4d23fb56e34b68511335
Restart Required: No
Instructions:
1. Upgrade Collabtive to version 2.1 or later. 2. Apply the patch from the GitHub commit. 3. Verify the fix by testing avatar upload functionality.
🔧 Temporary Workarounds
Web Server File Extension Blocking
allConfigure web server to block execution of .php3, .php4, .php5, and .phtml files
For Apache: Add 'AddHandler cgi-script .php3 .php4 .php5 .phtml' to .htaccess
For Nginx: Add 'location ~ \.(php3|php4|php5|phtml)$ { deny all; }' to nginx.conf
Disable Avatar Uploads
allTemporarily disable avatar upload functionality in Collabtive
Modify manageuser.php to remove or comment out avatar upload code
🧯 If You Can't Patch
- Implement strict file upload validation that checks both file extension and content type
- Move uploaded files outside web root or store them in a database instead of filesystem
🔍 How to Verify
Check if Vulnerable:
Check Collabtive version in admin panel or by examining source files; versions before 2.1 are vulnerable
Check Version:
Check Collabtive version in admin interface or examine version.php file
Verify Fix Applied:
Attempt to upload a test file with .php3, .php4, .php5, or .phtml extension; upload should be rejected
📡 Detection & Monitoring
Log Indicators:
- File uploads with .php3, .php4, .php5, or .phtml extensions in web server logs
- Unusual POST requests to manageuser.php with file upload parameters
Network Indicators:
- HTTP POST requests to manageuser.php with file upload content
- Subsequent requests to uploaded files with suspicious extensions
SIEM Query:
source="web_server" AND (uri="*manageuser.php*" AND method="POST") AND (user_agent="*curl*" OR user_agent="*wget*" OR file_extension IN ("php3", "php4", "php5", "phtml"))
🔗 References
- http://packetstormsecurity.com/files/133736/Collabtive-2.0-Shell-Upload.html
- https://github.com/philippK-de/Collabtive/commit/9ce6301583669d0a8ecb4d23fb56e34b68511335
- https://lists.debian.org/debian-lts-announce/2020/02/msg00031.html
- https://usn.ubuntu.com/4590-1/
- http://packetstormsecurity.com/files/133736/Collabtive-2.0-Shell-Upload.html
- https://github.com/philippK-de/Collabtive/commit/9ce6301583669d0a8ecb4d23fb56e34b68511335
- https://lists.debian.org/debian-lts-announce/2020/02/msg00031.html
- https://usn.ubuntu.com/4590-1/