CVE-2024-45999

9.8 CRITICAL

📋 TL;DR

A SQL injection vulnerability in Cloudlog 2.6.15 allows attackers to execute arbitrary SQL commands via the station_id parameter in the get_station_info() function. This affects all Cloudlog installations running version 2.6.15 or earlier. Attackers can potentially access, modify, or delete database contents.

💻 Affected Systems

Products:
  • Cloudlog
Versions: 2.6.15 and earlier
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: All Cloudlog installations using the vulnerable version are affected regardless of configuration.

📦 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 within the Cloudlog database.

🟢

If Mitigated

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

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

SQL injection via GET/POST parameters requires minimal technical skill to exploit.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 2.6.16 or later

Vendor Advisory: https://github.com/magicbug/Cloudlog

Restart Required: No

Instructions:

1. Backup your Cloudlog installation and database. 2. Download the latest version from GitHub. 3. Replace the vulnerable file /application/models/Oqrs_model.php with the patched version. 4. Verify the fix by testing the station_id parameter.

🔧 Temporary Workarounds

Input Validation Filter

all

Add server-side validation to sanitize station_id parameter before processing.

Modify /application/models/Oqrs_model.php to validate station_id as integer using is_numeric() or similar function

Web Application Firewall

all

Deploy WAF rules to block SQL injection patterns in station_id parameter.

Add WAF rule: block requests containing SQL keywords like UNION, SELECT, INSERT in station_id parameter

🧯 If You Can't Patch

  • Restrict database user permissions to read-only access for the Cloudlog application.
  • Implement network segmentation to isolate Cloudlog server from critical systems.

🔍 How to Verify

Check if Vulnerable:

Test station_id parameter with SQL injection payload like ' OR '1'='1 and check for unexpected database responses.

Check Version:

Check Cloudlog version in /application/config/config.php or admin interface.

Verify Fix Applied:

Attempt SQL injection on station_id parameter after patching - should return error or no data instead of executing SQL.

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL errors in application logs
  • Multiple failed login attempts following SQL injection patterns
  • Database queries with unusual syntax in station_id parameter

Network Indicators:

  • HTTP requests containing SQL keywords in station_id parameter
  • Abnormal database connection patterns from web server

SIEM Query:

source="web_logs" AND (station_id CONTAINS "UNION" OR station_id CONTAINS "SELECT" OR station_id CONTAINS "INSERT")

🔗 References

📤 Share & Export