CVE-2018-16354

9.8 CRITICAL

📋 TL;DR

This vulnerability allows attackers to execute arbitrary SQL commands through the 'limit' parameter in FHCRM's index.php/User/read endpoint. It affects all FHCRM deployments through version 2018-02-11. Attackers can potentially access, modify, or delete database content.

💻 Affected Systems

Products:
  • FHCRM
Versions: All versions through 2018-02-11
Operating Systems: Any
Default Config Vulnerable: ⚠️ Yes
Notes: Affects the default installation of FHCRM. No special configuration required for exploitation.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete database compromise leading to data theft, data destruction, or remote code execution via database functions.

🟠

Likely Case

Unauthorized data access, privilege escalation, or data manipulation in the FHCRM database.

🟢

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: ⚠️ Yes
Complexity: LOW

SQL injection via GET/POST parameter requires minimal technical skill. Public GitHub issue demonstrates the vulnerability.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Versions after 2018-02-11

Vendor Advisory: https://github.com/focalhot/FHCRM/issues/4

Restart Required: No

Instructions:

1. Update FHCRM to version after 2018-02-11. 2. Apply proper input validation and parameterized queries to the index.php/User/read endpoint. 3. Test the fix by attempting SQL injection.

🔧 Temporary Workarounds

Web Application Firewall (WAF)

all

Deploy a WAF with SQL injection protection rules to block malicious requests.

Input Validation Filter

all

Implement server-side validation to reject non-numeric values in the 'limit' parameter.

🧯 If You Can't Patch

  • Isolate the FHCRM system from untrusted networks using firewall rules.
  • Implement strict access controls and monitor for unusual database queries.

🔍 How to Verify

Check if Vulnerable:

Test the index.php/User/read endpoint with SQL injection payloads in the 'limit' parameter (e.g., '1 OR 1=1').

Check Version:

Check FHCRM version in admin panel or configuration files.

Verify Fix Applied:

Attempt SQL injection after patching; successful queries should be blocked or sanitized.

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL queries in application logs
  • Multiple failed login attempts via User/read endpoint

Network Indicators:

  • HTTP requests to index.php/User/read with SQL syntax in parameters

SIEM Query:

source="web_logs" AND uri="*index.php/User/read*" AND (param="*limit=*OR*" OR param="*limit=*UNION*" OR param="*limit=*SELECT*")

🔗 References

📤 Share & Export