CVE-2021-45015
📋 TL;DR
CVE-2021-45015 is an arbitrary file deletion vulnerability in TaoCMS that allows attackers to delete any file on the server. This affects TaoCMS 3.0.2 installations where attackers can exploit insufficient input validation in the file.php component. The vulnerability enables complete system compromise through file deletion attacks.
💻 Affected Systems
- TaoCMS
📦 What is this software?
Taocms by Taogogo
⚠️ Risk & Real-World Impact
Worst Case
Complete system compromise through deletion of critical system files, configuration files, or web application files leading to denial of service, data loss, and potential privilege escalation.
Likely Case
Web application disruption through deletion of website files, configuration files, or user uploads, causing service interruption and data loss.
If Mitigated
Limited impact if proper file permissions, input validation, and web application firewalls are in place to block malicious requests.
🎯 Exploit Status
The vulnerability is well-documented in public repositories with proof-of-concept examples. Exploitation requires minimal technical skill.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: 3.0.3 or later
Vendor Advisory: https://github.com/taogogo/taocms/issues/12
Restart Required: No
Instructions:
1. Backup all data and configuration files. 2. Download the latest version of TaoCMS from the official repository. 3. Replace the vulnerable file.php component. 4. Verify the fix by testing file deletion functionality.
🔧 Temporary Workarounds
File Permission Restriction
linuxSet strict file permissions to prevent deletion of critical files
chmod 644 /path/to/taocms/*
chmod 755 /path/to/taocms/directories
Web Application Firewall Rule
allBlock malicious requests targeting the vulnerable endpoint
Add WAF rule to block requests containing file deletion patterns
🧯 If You Can't Patch
- Implement strict input validation and sanitization for all file operations
- Deploy web application firewall with rules to detect and block file deletion attempts
🔍 How to Verify
Check if Vulnerable:
Check if running TaoCMS version 3.0.2 and examine the file.php component for the vulnerable code between lines 60-72
Check Version:
Check the version.php file or admin panel for version information
Verify Fix Applied:
Verify the TaoCMS version is 3.0.3 or later and test file deletion functionality with malicious inputs
📡 Detection & Monitoring
Log Indicators:
- Unusual file deletion requests in web server logs
- Multiple 404 errors for previously existing files
- Requests to file.php with suspicious parameters
Network Indicators:
- HTTP POST requests to file.php with file deletion parameters
- Unusual patterns of file access attempts
SIEM Query:
source="web_logs" AND (uri="/taocms/include/Model/file.php" AND (param="delete" OR param="remove"))