CVE-2020-21132

9.8 CRITICAL

📋 TL;DR

This is a critical SQL injection vulnerability in Metinfo 7.0.0beta that allows attackers to execute arbitrary SQL commands through the index.php file. It affects all systems running the vulnerable version of this content management system. Successful exploitation could lead to complete compromise of the database and potentially the underlying server.

💻 Affected Systems

Products:
  • Metinfo CMS
Versions: 7.0.0beta
Operating Systems: All operating systems running PHP
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects the beta version of Metinfo 7.0.0. Production versions may have different code paths.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete database compromise leading to data theft, data manipulation, authentication bypass, and potential remote code execution through database functions.

🟠

Likely Case

Database information disclosure, data manipulation, and potential privilege escalation within the application.

🟢

If Mitigated

Limited impact with proper input validation and parameterized queries in place.

🌐 Internet-Facing: HIGH - The vulnerability is in index.php which is typically publicly accessible, making internet-facing systems immediately vulnerable.
🏢 Internal Only: MEDIUM - Internal systems are still vulnerable but have reduced attack surface compared to internet-facing deployments.

🎯 Exploit Status

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

SQL injection vulnerabilities in index.php files are commonly exploited. Public references show proof-of-concept details.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Metinfo 7.0.0 stable or later versions

Vendor Advisory: https://www.metinfo.cn/

Restart Required: No

Instructions:

1. Upgrade to Metinfo 7.0.0 stable or later version. 2. Replace the vulnerable index.php file with the patched version. 3. Clear any cached files or templates.

🔧 Temporary Workarounds

Input Validation Filter

all

Implement strict input validation and filtering for all user-supplied parameters in index.php

# Add parameter validation before SQL queries
# Example: if(!preg_match('/^[a-zA-Z0-9_]+$/', $input)) { die('Invalid input'); }

WAF Rule Implementation

all

Deploy web application firewall rules to block SQL injection patterns

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

🧯 If You Can't Patch

  • Implement strict input validation and parameterized queries in the vulnerable code section
  • Deploy a web application firewall (WAF) with SQL injection protection rules

🔍 How to Verify

Check if Vulnerable:

Check if running Metinfo 7.0.0beta by examining version files or admin panel. Test index.php with SQL injection payloads in controlled environment.

Check Version:

Check /metinfo/include/version.php or admin panel for version information

Verify Fix Applied:

Verify version is updated to 7.0.0 stable or later. Test index.php with SQL injection payloads to confirm they are blocked.

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL error messages in logs
  • Multiple failed login attempts with SQL syntax
  • Long parameter values in index.php requests

Network Indicators:

  • SQL keywords in HTTP GET/POST parameters to index.php
  • Unusual database connection patterns from web server

SIEM Query:

source="web_logs" AND (uri="*/index.php*" AND (param CONTAINS "UNION" OR param CONTAINS "SELECT" OR param CONTAINS "INSERT"))

🔗 References

📤 Share & Export