CVE-2021-41661

9.8 CRITICAL

📋 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

Products:
  • Church Management System
Versions: 1.0
Operating Systems: Any OS running PHP web server
Default Config Vulnerable: ⚠️ Yes
Notes: Requires web server with PHP support and write permissions to uploads directory

📦 What is this software?

⚠️ 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

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

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

all

Block 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

all

Validate 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")

🔗 References

📤 Share & Export