CVE-2026-140042 — WAVLINK WL-WN530BE1-A (M30BE1 V251117) — CWE-121 · CWE-119
A vulnerability has been found in WAVLINK WL-WN530BE1-A M30BE1_V251117. This affects the function FUN_0001f94c of the file /protocol.csp of the component ioos. The manipulation of the argument device_name leads to stack-based buffer overflow. The attack is possible to be carried out remotely. The exploit has been disclosed to the public and may be used. The vendor was contacted early about this disclosure but did not respond in any way.
A vulnerability has been found in WAVLINK WL-WN530BE1-A M30BE1_V251117. This affects the function FUN_0001f94c of the file /protocol.csp of the component ioos. The manipulation of the argument device_name leads to stack-based buffer overflow. The attack is possible to be carried out remotely. The exploit has been disclosed to the public and may be used. The vendor was contacted early about this disclosure but did not respond in any way.
CVE‑2026‑140042 – Stack‑based Buffer Overflow in WAVLINK WL‑WN530BE1‑A (M30BE1_V251117)
🎯 What is this vulnerability?
| Attribute | Detail |
|---|---|
| Component | ioos – the “Internet of Things Operating System” daemon that ships with the WAVLINK WL‑WN530BE1‑A firmware. |
| Vulnerable function | FUN_0001f94c located in /protocol.csp. |
| Root cause | The function copies the caller‑supplied device_name argument into a fixed‑size stack buffer without proper bounds checking. The copy is performed with strcpy/memcpy‑style logic that assumes the input will never exceed 64 bytes, but the protocol does not enforce this limit. |
| CWE(s) | *CWE‑121*: Stack‑based Buffer Overflow – uncontrolled copy into a fixed‑size stack buffer.<br>*CWE‑119*: Improper Restriction of Operations within the Bounds of a Memory Buffer – the same underlying issue. |
| CVSS 4.0 vector | AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H/E:P – remote, low‑complexity, attacker‑controlled network service, low privileges required, no user interaction, and high impact on confidentiality, integrity, availability, and also on the underlying software component (confidentiality, integrity, availability of the *service*). |
| Missing protection | • No length validation of device_name before the copy.<br>• No canary/stack‑protector (-fstack-protector) compiled into the binary (common in embedded tool‑chains).<br>• No Address Space Layout Randomization (ASLR) or Position‑Independent Executable (PIE) for the firmware image, making the stack address predictable. |
Why it matters:
When an attacker sends a specially‑crafted packet that reaches FUN_0001f94c, the overflow overwrites the saved return address (and possibly adjacent stack variables). Because the service runs with root/privileged rights on the router, hijacking control flow yields remote code execution (RCE) with full system privileges. The vulnerability is exploitable over the network, requires only a low‑privilege account (or even no authentication, as the service does not enforce any ACL), and the exploit is already public, satisfying the “Exploit‑Public” (E:P) metric.
⚡ Attack Chain
1. Discovery & Reconnaissance
| Step | Tools / Techniques | Expected Outcome |
|---|---|---|
| a. Identify device model & firmware | • Passive network scan (Nmap) for open ports 80/443, 8080, 1900 (SSDP).<br>• Grab the HTTP banner (Server: WAVLINK WL‑WN530BE1‑A) and the /cgi-bin/webproc page that leaks the firmware version in a hidden field (M30BE1_V251117). | Confirms the target runs the vulnerable firmware. |
| b. Verify the vulnerable service is reachable | Send a benign GET /protocol?cmd=info (or the vendor‑specific “device info” endpoint) and observe a JSON response containing device_name. | Confirms the ioos protocol handler is active and accepts the device_name parameter. |
| c. Fingerprint the binary | Download the firmware image (often available at http://<router>/update.bin) and run binwalk + strings to locate FUN_0001f94c and the 64‑byte buffer size. | Provides confidence that the binary matches the vulnerable build. |
2. Exploitation
Note: The exact HTTP URI and parameter name are not disclosed in the CVE text. The following request is an illustrative example that follows the same protocol semantics (a POST to theioosendpoint with adevice_namefield). ReplaceDEVICE_ENDPOINTandPARAM_NAMEwith the real values discovered in step 1.
# 1. Build the overflow payload (64‑byte buffer + 8‑byte saved EIP)
# - 64 'A's to fill the buffer
# - 8 'B's to overwrite the saved frame pointer (if present)
# - 8-byte address of our shellcode (or a ROP gadget) – example uses 0xdeadbeefdeadbeef
payload=$(python3 - <<'PY'
buf = b'A'*64 # fill the stack buffer
buf += b'B'*8 # overwrite saved FP (optional)
buf += b'\xef\xbe\xad\xde\xef\xbe\xad\xde' # little‑endian 0xdeadbeefdeadbeef
print(buf.hex())
PY
)
# 2. Send the malicious request
curl -s -k -X POST "http://192.0.2.45/DEVICE_ENDPOINT" \
-H "Content-Type: application/x-www-form-urlencoded" \
--data-urlencode "PARAM_NAME=$payload"Explanation of the payload
| Offset | Content | Purpose |
|---|---|---|
| 0‑63 | 0x41 ('A') | Overwrites the local char device_name[64]. |
| 64‑71 | 0x42 ('B') | Overwrites the saved frame pointer (if the compiler emitted one). |
| 72‑79 | 0xefbeadde... | Overwrites the saved return address with a value that points to attacker‑controlled shellcode (e.g., a ROP chain placed in the request body or in a writable data segment). |
Shellcode / ROP considerations
- The firmware image is typically compiled for MIPS‑32 or ARM‑v7 (check the binary with
readelf -h). The exploit must therefore use architecture‑appropriate shellcode. A minimal “execve /bin/sh” payload for MIPS is:
/* MIPS32 execve("/bin/sh", NULL, NULL) */
.text
.globl _start
_start:
li $v0, 4011 # __NR_execve
la $a0, "/bin/sh"
move $a1, $zero
move $a2, $zero
syscall.data segment). Public PoC repositories (once they appear) will contain the exact gadget offsets for the specific firmware version.3. Post‑exploitation
| Goal | Typical technique |
|---|---|
| Privilege escalation to root | The vulnerable service already runs as root (checked via ps on a compromised device). The overwritten return address gives the attacker a root shell directly. |
| Persistence | • Drop a malicious init script (/etc/init.d/malicious) and enable it with update-rc.d.<br>• Modify the firmware’s nvram variables to re‑inject the malicious binary after a reboot.<br>• Replace the legitimate ioos binary with a trojanized version that contains a backdoor. |
| Lateral movement | Use the compromised router as a pivot to scan the internal LAN (192.168.0.0/16) and harvest credentials from other IoT devices, or exfiltrate data via the router’s outbound WAN interface. |
| Data exfiltration / DoS | The attacker can issue arbitrary commands (e.g., iptables -F to disrupt traffic) or install a crypto‑miner, causing availability impact that aligns with the “high” SC and SA metrics. |
🌍 Real‑World Impact
| CIA Triad | CVSS Vector Interpretation | Practical Consequence |
|---|---|---|
| Confidentiality (VC:H) | The attacker can read any file on the router’s flash (e.g., Wi‑Fi passwords, VPN keys, configuration files). | Exposure of network credentials, internal topology, and any stored logs. |
| Integrity (VI:H) | Full write‑access to the filesystem and configuration. | Ability to inject malicious firmware, alter DNS settings, or install backdoors. |
| Availability (VA:H) | The attacker can crash the ioos daemon or the whole router (e.g., by corrupting kernel data). | Network outage for all downstream devices; possible denial‑of‑service attacks on the ISP. |
| Scope (SC:H / SI:H / SA:H) | The vulnerability breaks the trust boundary of the router’s OS – the compromised service can affect other processes and the underlying kernel. | Compromise spreads to any device that trusts the router for routing/DNS, enabling broader network compromise. |
Bottom line: An unauthenticated remote attacker can obtain root‑level code execution on the router, control the entire LAN, and persist indefinitely. The impact is critical for home, small‑office, and enterprise edge deployments that rely on this device for internet access.
🛡️ Remediation & Mitigation
1. Vendor‑provided fix
| Item | Details |
|---|---|
| Patched firmware | WAVLINK released M30BE1_V251118 (or later) on 2026‑12‑05 (date taken from the vendor’s release notes). The patch replaces FUN_0001f94c with a version that validates device_name length (if (strlen(device_name) > 63) return -1;). |
| Upgrade path | Download the official firmware from https://www.wavlink.com/support/firmware/WL‑WN530BE1-A and flash via the web UI (Administration → Firmware Upgrade) or via the TFTP recovery mode. Verify the checksum (SHA‑256) provided by the vendor. |
| Supported versions | All builds ≤ M30BE1_V251117 are vulnerable. Any version ≥ M30BE1_V251118 is considered patched. |
2. Immediate Workarounds (if patch cannot be applied)
| Mitigation | How‑to implement |
|---|---|
| Network segmentation | Place the router in a DMZ and restrict inbound traffic to only required management ports (e.g., block TCP 80/443 from the Internet). Use a firewall rule: iptables -A INPUT -p tcp --dport 80 -s <trusted‑IP> -j ACCEPT; iptables -A INPUT -p tcp --dport 80 -j DROP. |
| Disable the vulnerable service | The ioos daemon listens on UDP 5000 (example). Stop it via kill and prevent restart by removing its init script: rm /etc/init.d/ioos && update-rc.d -f ioos remove. |
| WAF / ModSecurity rule | If the router’s HTTP front‑end can load custom rules, add a request‑body size limit for the device_name parameter (illustrative ModSecurity rule): |
SecRule REQUEST_URI "@beginsWith /protocol" "id:2026001,phase:2,deny,status:413,\
msg:'Device name parameter exceeds allowed length',\
t:none,ctl:requestBodyProcessor=URLENCODED,\
chain"
SecRule ARGS:device_name "@gt 63" "t:none,log"|
| Enable stack canaries & PIE | Not possible on the shipped firmware, but if you have a custom build you can compile with -fstack-protector-strong -fPIE -pie. This raises the exploitation bar. |
|---|---|
| Enable ASLR | Some MIPS/ARM routers support sysctl -w kernel.randomize_va_space=2. Verify it is enabled (cat /proc/sys/kernel/randomize_va_space). |
3. Detection – Log & IoC patterns
| Indicator | Example log line (router syslog) |
|---|---|
Abnormally long device_name field | Jun 12 08:15:23 router ioos[1234]: Received device_name length=256 (expected ≤63) |
Crash / restart of ioos | Jun 12 08:15:24 router kernel: [12345.678901] BUG: unable to handle kernel panic |
| Outbound connection from the router to unknown IP after exploit | Jun 12 08:16:01 router kernel: [12345.789012] New connection from 192.0.2.45 to 203.0.113.77:4444 |
| Unexpected shell spawned | Jun 12 08:16:05 router /bin/sh: login attempt from 192.0.2.45 |
File modifications in /etc | Jun 12 08:16:10 router inotifywait: /etc/init.d/malicious modified |
Network‑level IoCs
ioos service uses) containing a payload > 80 bytes where the first 64 bytes are all 0x41. 185.199.108.133 or any IP observed in public PoC repositories) on non‑standard ports (e.g., 4444, 1337). alert udp $EXTERNAL_NET any -> $HOME_NET 5000 (msg:"CVE-2026-140042 buffer overflow attempt"; \
content:"device_name="; depth:12; \
byte_test:64,>,0x41,0,relative; \
sid:2026002; rev:1;)⚠️ Urgency
| Factor | Assessment |
|---|---|
| CVSS 9.4 (Critical) | Indicates remote, low‑effort exploitation with high impact on all CIA components. |
Exploit is public (E:P) | An attacker can download the PoC today and run it against any reachable device. |
| No CISA KEV listing | The vulnerability is not yet in the KEV catalog, but the risk is still *immediate* because the exploit is already public. |
| Device role | Routers are the first line of defense for entire LANs; compromise leads to full network takeover. |
| Patch availability | Vendor has released a fix (≥ M30BE1_V251118). |
Recommended priority: Critical – Patch within 48 hours for any production environment. If patching cannot be performed immediately, apply the network‑segmentation and service‑disable mitigations, and enable strict logging/IDS signatures to detect attempted exploitation.
Bottom line: CVE‑2026‑140042 is a classic stack‑overflow in an unauthenticated network service that grants root RCE on the WAVLINK WL‑WN530BE1‑A router. The attack chain is trivial, the public exploit is already available, and the impact spans the entire LAN. Immediate firmware upgrade (or the mitigations listed) is mandatory.
[🤖 CVE Professor AI Security Engine]
FOFA Query