CVE-2021-42945

9.8 CRITICAL

📋 TL;DR

This SQL injection vulnerability in ZZCMS 2021 allows attackers to execute arbitrary SQL commands through the askbigclassid parameter in /admin/ask.php. Attackers can potentially read, modify, or delete database content, including sensitive user data. All ZZCMS 2021 installations with the vulnerable component are affected.

💻 Affected Systems

Products:
  • ZZCMS
Versions: 2021 version
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Requires access to /admin/ask.php endpoint. The vulnerability is in the administrative interface component.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

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

🟠

Likely Case

Unauthorized data access, privilege escalation, and potential administrative account takeover.

🟢

If Mitigated

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

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Proof of concept exists in GitHub repository. Exploitation requires access to the admin interface but SQL injection is straightforward once authenticated.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Unknown

Vendor Advisory: http://www.zzcms.net/

Restart Required: No

Instructions:

1. Check vendor website for security updates. 2. Apply any available patches. 3. Verify fix by testing the vulnerable parameter.

🔧 Temporary Workarounds

Input Validation Filter

all

Add server-side validation to sanitize askbigclassid parameter

Modify /admin/ask.php to validate askbigclassid as integer using is_numeric() or similar function

Web Application Firewall Rule

all

Block SQL injection patterns targeting askbigclassid parameter

Add WAF rule: deny requests with SQL keywords in askbigclassid parameter

🧯 If You Can't Patch

  • Restrict access to /admin/ask.php using IP whitelisting or authentication requirements
  • Implement database user with minimal privileges for the application

🔍 How to Verify

Check if Vulnerable:

Test /admin/ask.php with askbigclassid parameter containing SQL injection payload like ' OR '1'='1

Check Version:

Check ZZCMS version in admin panel or configuration files

Verify Fix Applied:

Test with same payload after fix - should return error or no data instead of executing SQL

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL errors in application logs
  • Multiple failed login attempts to admin interface
  • Unexpected database queries from application user

Network Indicators:

  • HTTP requests to /admin/ask.php with SQL keywords in parameters
  • Unusual database traffic patterns

SIEM Query:

source="web_logs" AND uri="/admin/ask.php" AND (param="askbigclassid" AND value MATCHES "(?i)(union|select|insert|update|delete|drop|or|and)")

🔗 References

📤 Share & Export