CVE-2021-41661
📋 TL;DR
Church Management System version 1.0 has a critical SQL injection vulnerability that allows attackers to upload PHP files disguised as avatar images. This leads to remote code execution by executing uploaded webshells. Any organization using this specific software version is affected.
💻 Affected Systems
- Church Management System
📦 What is this software?
Church Management System by Church Management System Project
⚠️ Risk & Real-World Impact
Worst Case
Complete server compromise leading to data theft, ransomware deployment, or use as attack infrastructure
Likely Case
Webshell installation allowing persistent backdoor access and data exfiltration
If Mitigated
Limited impact with proper file upload restrictions and web server hardening
🎯 Exploit Status
Public exploit script available, combines SQLi with file upload to achieve RCE
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Unknown
Vendor Advisory: Unknown
Restart Required: No
Instructions:
No official patch available. Consider replacing with alternative software or implementing workarounds.
🔧 Temporary Workarounds
Restrict file uploads
allBlock PHP file uploads and restrict upload directory execution
# Add to .htaccess in uploads directory:
<Files *.php>
Order Deny,Allow
Deny from all
</Files>
# Add to nginx config:
location ~* \.php$ {
deny all;
}
Implement file type validation
allValidate file extensions and MIME types on upload
🧯 If You Can't Patch
- Remove write permissions from uploads directory
- Implement WAF rules to block SQL injection patterns
🔍 How to Verify
Check if Vulnerable:
Check if Church Management System version 1.0 is installed and accessible
Check Version:
Check application files for version information or consult documentation
Verify Fix Applied:
Attempt to upload PHP file as avatar and verify it cannot be executed
📡 Detection & Monitoring
Log Indicators:
- SQL error messages in logs
- PHP file uploads to uploads directory
- Unusual file execution patterns
Network Indicators:
- POST requests with SQL injection patterns to user creation endpoints
- Requests to uploaded PHP files in uploads directory
SIEM Query:
source="web_logs" AND (uri="/uploads/*.php" OR message="SQL syntax")