CVE-2025-64057
Executive Summary
CVE-2025-64057 is a directory traversal vulnerability affecting the Fanvil x210 V2 phone running firmware version 2.12.20. An unauthenticated attacker on the local network can exploit this flaw to store files in arbitrary locations on the device, potentially leading to system configuration modification or other unspecified impacts. The vulnerability has a CVSS score of 0.0 (placeholder) but is assessed as high severity due to the potential for persistent compromise. No public proof-of-concept or patch is currently 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
- Attack Vector (AV): Adjacent Network (AV:A) – Requires local network access.
- Attack Complexity (AC): Low (AC:L) – No special conditions required.
- Privileges Required (PR): None (PR:N) – Unauthenticated exploitation.
- User Interaction (UI): None (UI:N) – No user action needed.
- Scope (S): Unchanged (S:U) – Affects only the vulnerable component.
- Confidentiality (C): None (C:N) – No data exfiltration.
- Integrity (I): High (I:H) – Can modify system files.
- Availability (A): High (A:H) – Can overwrite critical files causing denial of service.
Threat Level: High (7.5) – Unauthenticated remote file write with high integrity and availability impact.
Deep Dive & Mechanics
The vulnerability resides in the web interface of the Fanvil x210 V2 phone. The device fails to properly sanitize user-supplied input in file upload or configuration endpoints. By crafting a request with path traversal sequences (e.g., ../../../etc/passwd), an attacker can write files to arbitrary locations on the filesystem. This can be used to overwrite configuration files, inject malicious scripts, or modify system binaries.
The attack is limited to the local network, but once exploited, the attacker can achieve persistent control over the device. The exact endpoint is not publicly documented, but typical targets include firmware update, configuration restore, or log upload functions.
Vulnerable vs. Patched Code
Vulnerable Code (Conceptual):
# Example of vulnerable file upload handler
def handle_upload(request):
filename = request.form['filename']
# No path validation
with open('/var/www/uploads/' + filename, 'wb') as f:
f.write(request.files['file'].read())
Patched Code (Conceptual):
import os
def handle_upload(request):
filename = os.path.basename(request.form['filename'])
# Restrict to allowed directory
safe_path = os.path.join('/var/www/uploads/', filename)
if not safe_path.startswith('/var/www/uploads/'):
return "Invalid path", 400
with open(safe_path, 'wb') as f:
f.write(request.files['file'].read())
Exploitation & Lab Setup
Red Team
Lab Setup:
- Obtain a Fanvil x210 V2 phone with firmware 2.12.20.
- Connect the phone to a local network (e.g., 192.168.1.0/24).
- Identify the web interface IP (e.g., 192.168.1.100).
Exploitation Steps:
- Use a tool like
curlto send a crafted request:curl -X POST http://192.168.1.100/upload \ -F "filename=../../../etc/config/system.cfg" \ -F "file=@malicious_config.txt" - Verify file write by accessing the modified configuration.
Note: No public exploit code is available; this is a conceptual demonstration.
Blue Team
Detection Steps:
- Monitor for HTTP POST requests containing path traversal patterns (e.g.,
../). - Check for unexpected file modifications in critical directories (
/etc/,/var/www/). - Use network monitoring to detect anomalous uploads to the phone's web interface.
Honeypot Strategy:
- Deploy a decoy Fanvil x210 with modified firmware to log all upload attempts.
- Alert on any POST request to
/uploador similar endpoints.
Indicators of Compromise (IOCs)
- Network:
- HTTP POST requests to
/uploador/cgi-bin/uploadwith../in the filename parameter. - Outbound connections from the phone to unknown IPs after exploitation.
- HTTP POST requests to
- File System:
- Unexpected files in
/etc/,/var/www/, or/tmp/. - Modified configuration files (e.g.,
system.cfg,phone.cfg).
- Unexpected files in
- Process:
- Unusual processes spawned from the web server (e.g.,
sh,bash).
- Unusual processes spawned from the web server (e.g.,
Detection Engineering
YARA Rule
rule CVE_2025_64057_Directory_Traversal {
meta:
description = "Detects directory traversal attempts targeting Fanvil x210"
author = "Valters IT"
date = "2025-04-10"
cve = "CVE-2025-64057"
strings:
$traversal1 = "../" ascii wide
$traversal2 = "..\\" ascii wide
$traversal3 = "%2e%2e%2f" ascii wide
$traversal4 = "%2e%2e/" ascii wide
condition:
any of ($traversal*) and filesize < 10KB
}
Sigma Rule
title: Fanvil x210 Directory Traversal Attempt
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects HTTP requests with path traversal patterns targeting Fanvil x210
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'POST'
cs-uri-query|contains:
- '../'
- '..\\'
- '%2e%2e%2f'
- '%2e%2e/'
condition: selection
falsepositives:
- Legitimate file paths with dots
level: high
Suricata Rule
alert http any any -> $HOME_NET any (msg:"CVE-2025-64057 Fanvil x210 Directory Traversal"; flow:to_server; content:"POST"; http_method; content:"../"; http_client_body; nocase; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Isolate Fanvil x210 phones on a separate VLAN with strict access controls.
- Disable the web interface if not required.
- Monitor logs for path traversal attempts.
Vendor Patch:
- Contact Fanvil for a firmware update. No patch is currently available.
Workarounds:
- Implement a reverse proxy to filter path traversal patterns.
- Use network ACLs to restrict access to the phone's web interface to trusted IPs only.
Long-term:
- Replace affected devices with models that have proper input validation.
- Conduct regular security audits of IoT devices.
Valters IT
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.