CVE-2024-6187

6.3 MEDIUM

📋 TL;DR

This critical vulnerability in Ruijie RG-UAC 1.0 allows remote attackers to execute arbitrary operating system commands through command injection in the /view/vpn/autovpn/sub_commit.php file. Attackers can exploit this to gain unauthorized access and control over affected devices. Organizations using Ruijie RG-UAC 1.0 are at risk.

💻 Affected Systems

Products:
  • Ruijie RG-UAC
Versions: 1.0
Operating Systems: Unknown
Default Config Vulnerable: ⚠️ Yes
Notes: Affects the specific PHP file /view/vpn/autovpn/sub_commit.php; all deployments of version 1.0 are vulnerable.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Full system compromise allowing attackers to install malware, steal sensitive data, pivot to internal networks, and maintain persistent access.

🟠

Likely Case

Unauthorized command execution leading to data exfiltration, system manipulation, or deployment of ransomware.

🟢

If Mitigated

Limited impact with proper network segmentation, but potential for initial foothold in isolated segments.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Exploit code is publicly available on GitHub; remote exploitation requires no authentication.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Unknown

Vendor Advisory: None available

Restart Required: No

Instructions:

No official patch available; vendor did not respond to disclosure. Consider workarounds or replacement.

🔧 Temporary Workarounds

Block Access to Vulnerable Endpoint

linux

Restrict network access to /view/vpn/autovpn/sub_commit.php using firewall rules or web server configuration.

iptables -A INPUT -p tcp --dport 80 -m string --string "/view/vpn/autovpn/sub_commit.php" --algo bm -j DROP
iptables -A INPUT -p tcp --dport 443 -m string --string "/view/vpn/autovpn/sub_commit.php" --algo bm -j DROP

Input Validation Enhancement

all

Modify the PHP file to sanitize the 'key' parameter, rejecting shell metacharacters.

Edit /view/vpn/autovpn/sub_commit.php to add: $key = preg_replace('/[^a-zA-Z0-9]/', '', $_POST['key']); before command execution.

🧯 If You Can't Patch

  • Isolate the Ruijie RG-UAC device in a segmented network zone with strict firewall rules.
  • Implement network-based intrusion detection to monitor for command injection attempts.

🔍 How to Verify

Check if Vulnerable:

Check if the file /view/vpn/autovpn/sub_commit.php exists and is accessible via HTTP/HTTPS; test with a safe payload like 'key=test;echo vulnerable'.

Check Version:

Check device web interface or CLI for version information; typically via 'show version' or similar command.

Verify Fix Applied:

After applying workarounds, attempt exploitation with the same payload; ensure no command execution occurs.

📡 Detection & Monitoring

Log Indicators:

  • Unusual POST requests to /view/vpn/autovpn/sub_commit.php with shell metacharacters in parameters.
  • System logs showing unexpected command executions or process spawns.

Network Indicators:

  • HTTP traffic containing command injection patterns (e.g., semicolons, pipes, backticks) in POST data.

SIEM Query:

source="web_logs" AND uri="/view/vpn/autovpn/sub_commit.php" AND (data CONTAINS ";" OR data CONTAINS "|" OR data CONTAINS "`")

🔗 References

📤 Share & Export