CVE-2023-42405

9.8 CRITICAL

📋 TL;DR

This SQL injection vulnerability in FIT2CLOUD RackShift v1.7.1 allows attackers to execute arbitrary SQL commands via the 'sort' parameter in multiple service endpoints. Attackers could potentially gain unauthorized access to the database, extract sensitive information, or execute arbitrary code. Organizations running RackShift v1.7.1 are affected.

💻 Affected Systems

Products:
  • FIT2CLOUD RackShift
Versions: v1.7.1
Operating Systems: All platforms running RackShift
Default Config Vulnerable: ⚠️ Yes
Notes: All deployments of RackShift v1.7.1 are vulnerable regardless of configuration. The vulnerability exists in the core application code.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete system compromise allowing attackers to execute arbitrary code, exfiltrate all database contents, pivot to other systems, and maintain persistent access.

🟠

Likely Case

Database information disclosure including credentials, configuration data, and sensitive business information, potentially leading to further system compromise.

🟢

If Mitigated

Limited impact with proper input validation and database permissions, potentially only allowing data viewing without modification privileges.

🌐 Internet-Facing: HIGH - The vulnerable endpoints are accessible via web interface, making internet-facing instances immediately vulnerable to exploitation.
🏢 Internal Only: MEDIUM - Internal instances are still vulnerable but require network access; risk increases if internal users have malicious intent.

🎯 Exploit Status

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

SQL injection via HTTP parameters is a well-understood attack vector with many available tools. The vulnerability requires no authentication, making exploitation straightforward.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: v1.7.2 or later

Vendor Advisory: https://github.com/fit2cloud/rackshift/issues/79

Restart Required: Yes

Instructions:

1. Backup current configuration and data. 2. Download RackShift v1.7.2 or later from official repository. 3. Stop RackShift service. 4. Replace application files with patched version. 5. Restart RackShift service. 6. Verify functionality.

🔧 Temporary Workarounds

Web Application Firewall (WAF) Rules

all

Implement WAF rules to block SQL injection patterns in the 'sort' parameter

# Example ModSecurity rule: SecRule ARGS:sort "@detectSQLi" "id:1001,phase:2,deny,status:403"

Input Validation Filter

all

Add middleware to validate and sanitize 'sort' parameter before processing

# Example Python Flask middleware: def validate_sort_param(sort_value): return re.sub(r'[^a-zA-Z0-9_,\s]', '', sort_value)

🧯 If You Can't Patch

  • Implement network segmentation to isolate RackShift instances from sensitive systems
  • Deploy database monitoring to detect SQL injection attempts and unusual queries

🔍 How to Verify

Check if Vulnerable:

Check if RackShift version is 1.7.1 by accessing the web interface or checking application files. Test by sending a request with SQL injection payload in 'sort' parameter to vulnerable endpoints.

Check Version:

curl -s http://rackshift-host/api/version | grep version

Verify Fix Applied:

After patching, attempt SQL injection test with payloads like 'sort=1;SELECT SLEEP(5)--' and verify no delay or error occurs. Confirm version shows 1.7.2 or later.

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL queries in database logs
  • HTTP requests containing SQL keywords in 'sort' parameter
  • Multiple failed login attempts following suspicious requests

Network Indicators:

  • HTTP POST/GET requests to /api/taskService/list, /api/bareMetalService/list, or /api/switchService/list with SQL injection patterns

SIEM Query:

source="web_logs" AND (uri_path="/api/taskService/list" OR uri_path="/api/bareMetalService/list" OR uri_path="/api/switchService/list") AND query_string="*sort=*" AND (query_string="*SELECT*" OR query_string="*UNION*" OR query_string="*OR*" OR query_string="*--*" OR query_string="*;*")

🔗 References

📤 Share & Export