CVE-2020-21667

7.2 HIGH

📋 TL;DR

This vulnerability allows SQL injection attacks in fastadmin-tp6 v1.0 through unfiltered 'table' parameter input in Ajax.php. Attackers can execute arbitrary SQL commands to manipulate or extract database content. Any system running the vulnerable version is affected.

💻 Affected Systems

Products:
  • fastadmin-tp6
Versions: v1.0
Operating Systems: All operating systems running PHP
Default Config Vulnerable: ⚠️ Yes
Notes: Affects the specific Ajax.php controller file in the admin module. Requires admin access or exposed admin endpoints.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

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

🟠

Likely Case

Data extraction from database tables, including sensitive information like user credentials, personal data, or configuration secrets.

🟢

If Mitigated

Limited impact with proper input validation and parameterized queries preventing SQL injection.

🌐 Internet-Facing: HIGH - Web applications are typically internet-facing, making them directly accessible to attackers.
🏢 Internal Only: MEDIUM - Internal systems could still be compromised through internal attackers or lateral movement.

🎯 Exploit Status

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

SQL injection vulnerabilities are well-understood with many automated tools available. Requires admin access or exposed admin endpoints.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Unknown specific version - check GitHub repository

Vendor Advisory: https://github.com/che-my/fastadmin-tp6/issues/2

Restart Required: No

Instructions:

1. Update to latest version of fastadmin-tp6. 2. Apply input validation/sanitization to 'table' parameter. 3. Use parameterized queries or prepared statements.

🔧 Temporary Workarounds

Input Validation Filter

all

Add input validation to filter the 'table' parameter before processing

Modify app/admin/controller/Ajax.php to validate/sanitize the 'table' parameter

WAF Rule

all

Implement web application firewall rules to block SQL injection patterns

Configure WAF to detect and block SQL injection attempts on admin endpoints

🧯 If You Can't Patch

  • Implement strict input validation for all user-supplied parameters
  • Restrict access to admin endpoints using network segmentation and authentication

🔍 How to Verify

Check if Vulnerable:

Check if running fastadmin-tp6 v1.0 and examine app/admin/controller/Ajax.php for lack of input validation on 'table' parameter

Check Version:

Check composer.json or project configuration files for version information

Verify Fix Applied:

Verify that input validation or parameterized queries are implemented for the 'table' parameter in Ajax.php

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL queries in database logs
  • Multiple failed login attempts to admin endpoints
  • Suspicious parameter values in web server logs

Network Indicators:

  • SQL injection patterns in HTTP requests
  • Unusual database connection patterns from web servers

SIEM Query:

web_requests WHERE url CONTAINS 'admin/ajax' AND (params CONTAINS 'UNION' OR params CONTAINS 'SELECT' OR params CONTAINS 'INSERT')

🔗 References

📤 Share & Export