CVE-2024-58287

8.8 HIGH

📋 TL;DR

CVE-2024-58287 is an authenticated command injection vulnerability in reNgine 2.2.0 that allows attackers to execute arbitrary commands on the server. Attackers can inject malicious base64-encoded payloads into the nmap_cmd parameter during scan engine configuration to achieve remote code execution. This affects all organizations running vulnerable versions of reNgine with authenticated user access.

💻 Affected Systems

Products:
  • reNgine
Versions: 2.2.0
Operating Systems: Linux
Default Config Vulnerable: ⚠️ Yes
Notes: Requires authenticated user access to the scan engine configuration interface. The vulnerability exists in the default configuration.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete system compromise allowing attackers to execute arbitrary commands with the privileges of the reNgine process, potentially leading to data theft, lateral movement, or persistent backdoors.

🟠

Likely Case

Attackers with authenticated access can execute commands to exfiltrate sensitive scan data, compromise the underlying server, or pivot to other systems in the network.

🟢

If Mitigated

With proper input validation and command sanitization, the vulnerability would be prevented, limiting attackers to legitimate scan functionality only.

🌐 Internet-Facing: HIGH
🏢 Internal Only: HIGH

🎯 Exploit Status

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

Exploit code is publicly available on Exploit-DB (ID 52081). Attack requires authenticated access but the exploit is straightforward once authentication is obtained.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 2.2.1 or later

Vendor Advisory: https://github.com/yogeshojha/rengine

Restart Required: Yes

Instructions:

1. Backup current configuration and data. 2. Update reNgine to version 2.2.1 or later. 3. Restart the reNgine service. 4. Verify the update was successful.

🔧 Temporary Workarounds

Input Validation Filter

linux

Implement strict input validation for the nmap_cmd parameter to reject any commands containing shell metacharacters or suspicious patterns.

# Requires code modification to validate nmap_cmd input
# Example: if re.search(r'[;&|`$()]', nmap_cmd): reject

Restrict User Access

all

Limit access to scan engine configuration to only trusted administrators using role-based access controls.

# Configure reNgine to restrict scan engine configuration to admin users only

🧯 If You Can't Patch

  • Implement network segmentation to isolate reNgine instances from critical systems
  • Enable detailed logging and monitoring for command execution attempts in scan configurations

🔍 How to Verify

Check if Vulnerable:

Check if running reNgine version 2.2.0 by examining the version in the web interface or configuration files.

Check Version:

grep -i version /path/to/rengine/config/files or check web interface

Verify Fix Applied:

Verify the version has been updated to 2.2.1 or later and test that command injection attempts in the nmap_cmd parameter are properly rejected.

📡 Detection & Monitoring

Log Indicators:

  • Unusual command execution patterns in reNgine logs
  • Base64-encoded payloads in scan configuration requests
  • Multiple failed authentication attempts followed by scan configuration changes

Network Indicators:

  • Unexpected outbound connections from reNgine server
  • Unusual scan traffic patterns

SIEM Query:

source="rengine" AND ("nmap_cmd" CONTAINS "base64" OR "command injection" OR suspicious shell characters in parameters)

🔗 References

📤 Share & Export