CVE-2020-24877

9.8 CRITICAL

📋 TL;DR

This SQL injection vulnerability in zzzphp v1.8.0 allows attackers to execute arbitrary SQL commands through the /form/index.php?module=getjson endpoint. This can lead to unauthorized data access, modification, or deletion. Anyone running zzzphp v1.8.0 with the vulnerable endpoint accessible is affected.

💻 Affected Systems

Products:
  • zzzphp
Versions: v1.8.0
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects installations with the /form/index.php endpoint accessible. The vulnerability is in the getjson module parameter.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete database compromise including data theft, data destruction, and potential remote code execution through database functions.

🟠

Likely Case

Unauthorized data access and potential privilege escalation leading to administrative access.

🟢

If Mitigated

Limited impact with proper input validation and database permissions restricting damage to non-critical data.

🌐 Internet-Facing: HIGH - The vulnerable endpoint is typically internet-accessible in web applications, making exploitation trivial.
🏢 Internal Only: MEDIUM - Internal attackers could still exploit this, but requires network access to the application.

🎯 Exploit Status

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

SQL injection vulnerabilities are commonly weaponized. The public GitHub issue demonstrates exploitation techniques.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: v1.8.1 or later

Vendor Advisory: https://github.com/h4ckdepy/zzzphp/issues/1

Restart Required: No

Instructions:

1. Download the latest version from the official repository. 2. Replace the vulnerable /form/index.php file. 3. Verify the fix by testing the vulnerable endpoint.

🔧 Temporary Workarounds

Input Validation Filter

all

Add parameter validation to filter SQL injection attempts in the getjson module.

Edit /form/index.php and add input sanitization for the module parameter

Endpoint Restriction

all

Block access to the vulnerable endpoint using web server configuration.

# Apache: <Location "/form/index.php"> Deny from all </Location>
# Nginx: location ~ /form/index.php { deny all; }

🧯 If You Can't Patch

  • Implement a Web Application Firewall (WAF) with SQL injection rules
  • Restrict database user permissions to read-only where possible

🔍 How to Verify

Check if Vulnerable:

Test the endpoint with SQL injection payloads: /form/index.php?module=getjson' OR '1'='1

Check Version:

Check the zzzphp version in the application files or admin panel

Verify Fix Applied:

Test the same payloads after patching - they should return error messages or no data instead of executing SQL.

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL errors in application logs
  • Multiple requests to /form/index.php with SQL keywords

Network Indicators:

  • HTTP requests containing SQL injection patterns to the vulnerable endpoint

SIEM Query:

source="web_logs" AND uri="/form/index.php" AND (query="*SELECT*" OR query="*UNION*" OR query="*OR '1'='1*")

🔗 References

📤 Share & Export