CVE-2018-17410

9.8 CRITICAL

📋 TL;DR

CVE-2018-17410 is a SQL injection vulnerability in Horus CMS that allows attackers to execute arbitrary SQL commands through specially crafted requests to the /busca or /home endpoints. This affects all Horus CMS installations that haven't been patched, potentially compromising the entire database and application. Attackers can exploit this without authentication to steal, modify, or delete sensitive data.

💻 Affected Systems

Products:
  • Horus CMS
Versions: All versions prior to patch
Operating Systems: All operating systems running Horus CMS
Default Config Vulnerable: ⚠️ Yes
Notes: The vulnerability exists in the search functionality accessible via /busca and /home endpoints. Any Horus CMS installation with these endpoints exposed is vulnerable.

📦 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 through database functions.

🟠

Likely Case

Unauthenticated attackers exfiltrating sensitive data including user credentials, personal information, and administrative access to the CMS.

🟢

If Mitigated

Limited impact with proper input validation, parameterized queries, and web application firewall rules blocking SQL injection patterns.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

SQL injection is well-understood with many automated tools available. The specific endpoints (/busca and /home) are clearly identified in the CVE description.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Unknown specific version - check Horus CMS repository

Vendor Advisory: https://lab.insightsecurity.com.br/horus-cms/

Restart Required: No

Instructions:

1. Update Horus CMS to the latest version. 2. If source code is available, implement parameterized queries or prepared statements for all database operations. 3. Validate and sanitize all user inputs, especially in search functionality.

🔧 Temporary Workarounds

Web Application Firewall Rules

all

Implement WAF rules to block SQL injection patterns targeting /busca and /home endpoints

# Example ModSecurity rule: SecRule REQUEST_URI "@rx ^/(busca|home)" "id:1001,phase:1,deny,status:403,msg:'SQLi attempt blocked'"
# Add SQL injection detection patterns to existing WAF rules

Input Validation Filter

all

Add input validation middleware to reject SQL keywords in search parameters

# PHP example: if (preg_match('/\b(SELECT|INSERT|UPDATE|DELETE|UNION|DROP|ALTER)\b/i', $_GET['search'])) { die('Invalid input'); }

🧯 If You Can't Patch

  • Implement strict input validation and sanitization for all user inputs, especially in search functionality
  • Deploy a web application firewall with SQL injection protection rules
  • Restrict access to /busca and /home endpoints using network ACLs or authentication
  • Monitor database logs for unusual query patterns and failed login attempts
  • Regularly backup database and implement database activity monitoring

🔍 How to Verify

Check if Vulnerable:

Test /busca endpoint with SQL injection payloads like: ' OR '1'='1 or ' UNION SELECT NULL--

Check Version:

Check Horus CMS version in admin panel or configuration files

Verify Fix Applied:

Attempt SQL injection payloads against patched endpoints and verify they are rejected or sanitized

📡 Detection & Monitoring

Log Indicators:

  • Unusual database query patterns from web server logs
  • Multiple failed SQL queries from single IP
  • Requests to /busca or /home with SQL keywords in parameters
  • Database error messages containing SQL syntax in web logs

Network Indicators:

  • HTTP requests to /busca or /home with SQL injection payloads
  • Unusual database traffic patterns from web servers
  • Multiple rapid requests to search endpoints

SIEM Query:

source="web_logs" AND (uri_path="/busca" OR uri_path="/home") AND (query_string="*SELECT*" OR query_string="*UNION*" OR query_string="*OR '1'='1*")

🔗 References

📤 Share & Export