CVE-2021-43735

9.8 CRITICAL

📋 TL;DR

CVE-2021-43735 is a SQL injection vulnerability in CmsWing CMS that allows attackers to execute arbitrary SQL commands through the 'behavior rule' parameter. This affects all systems running CmsWing 1.3.7, potentially leading to data theft, modification, or complete system compromise.

💻 Affected Systems

Products:
  • CmsWing
Versions: 1.3.7
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: All installations of CmsWing 1.3.7 are vulnerable by default. The vulnerability exists in the core CMS functionality.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete database compromise including data exfiltration, data manipulation, privilege escalation, and potential remote code execution via database functions.

🟠

Likely Case

Unauthorized data access and extraction, including sensitive user information, administrative credentials, and content data.

🟢

If Mitigated

Limited impact with proper input validation and parameterized queries in place, though still potentially exposing some data.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

SQL injection vulnerabilities are commonly weaponized. The GitHub issue shows proof of concept exploitation details.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 1.3.8 or later

Vendor Advisory: https://github.com/arterli/CmsWing/issues/55

Restart Required: No

Instructions:

1. Backup your database and application files. 2. Update CmsWing to version 1.3.8 or later. 3. Verify the update by checking the version in the admin panel. 4. Test critical functionality.

🔧 Temporary Workarounds

Input Validation Filter

all

Add input validation to filter SQL injection patterns in the behavior rule parameter

# Add input validation in the affected PHP file
# Example: preg_replace('/[^a-zA-Z0-9_]/', '', $behavior_rule)

WAF Rule Implementation

all

Deploy web application firewall rules to block SQL injection patterns

# Example ModSecurity rule:
SecRule ARGS:behavior_rule "@detectSQLi" "id:1001,phase:2,deny,status:403"

🧯 If You Can't Patch

  • Implement strict input validation and parameterized queries for all database operations
  • Deploy a web application firewall with SQL injection detection rules

🔍 How to Verify

Check if Vulnerable:

Check if CmsWing version is 1.3.7 by viewing the admin panel or checking the version file. Test the behavior rule parameter with SQL injection payloads.

Check Version:

Check /app/common.php or admin panel for version information

Verify Fix Applied:

Verify the version is 1.3.8 or later. Test the behavior rule parameter with SQL injection payloads to confirm they are blocked.

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL queries in database logs
  • Multiple failed login attempts following SQL injection patterns
  • Requests with SQL keywords in behavior rule parameter

Network Indicators:

  • HTTP requests containing SQL injection patterns in parameters
  • Unusual database connection patterns from web server

SIEM Query:

source="web_logs" AND (behavior_rule CONTAINS "UNION" OR behavior_rule CONTAINS "SELECT" OR behavior_rule CONTAINS "INSERT" OR behavior_rule CONTAINS "DELETE")

🔗 References

📤 Share & Export