6.6medium
Potential Heap Out-of-Bounds Read in freerdp_certificate_data_hash_ via Unsafe _snprintf Usage
- Severity
- 6.6medium CVSS:4.0 by GitHub_M
- Exploit likelihood
- 0.26% (higher than 19% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
Description
FreeRDP is a free implementation of the Remote Desktop Protocol. Prior to version 3.20.0, a vulnerability exists in FreeRDP’s certificate handling code on Windows platforms. The function `freerdp_certificate_data_hash_ uses` the Microsoft-specific `_snprintf` function to format certificate cache filenames without guaranteeing NUL termination when truncation occurs. According to Microsoft documentation, `_snprintf` does not append a terminating NUL byte if the formatted output exceeds the destination buffer size. If an attacker controls the hostname value (for example via server redirection or a crafted .rdp file), the resulting filename buffer may not be NUL-terminated. Subsequent string operations performed on this buffer may read beyond the allocated memory region, resulting in a heap-based out-of-bounds read. In default configurations, the connection is typically terminated before sensitive data can be meaningfully exposed, but unintended memory read or a client crash may still occur under certain conditions. Version 3.20.0 has a patch for the issue.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| FreeRDP FreeRDP | < 3.20.0, before 3.20.0 | CVE List, NVD |
All scores
| GitHub_M | 6.6medium CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:U |
| NVD | 9.1critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H |
Classification
SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial.
What each source says
CVE List
FreeRDP is a free implementation of the Remote Desktop Protocol. Prior to version 3.20.0, a vulnerability exists in FreeRDP’s certificate handling code on Windows platforms. The function `freerdp_certificate_data_hash_ uses` the Microsoft-specific `_snprintf` function to format certificate cache filenames without guaranteeing NUL termination when truncation occurs. According to Microsoft documentation, `_snprintf` does not append a terminating NUL byte if the formatted output exceeds the destination buffer size. If an attacker controls the hostname value (for example via server redirection or a crafted .rdp file), the resulting filename buffer may not be NUL-terminated. Subsequent string operations performed on this buffer may read beyond the allocated memory region, resulting in a heap-based out-of-bounds read. In default configurations, the connection is typically terminated before sensitive data can be meaningfully exposed, but unintended memory read or a client crash may still occur under certain conditions. Version 3.20.0 has a patch for the issue.
NVD (es)
FreeRDP es una implementación gratuita del Protocolo de Escritorio Remoto. Antes de la versión 3.20.0, existe una vulnerabilidad en el código de manejo de certificados de FreeRDP en plataformas Windows. La función 'freerdp_certificate_data_hash_' utiliza la función '_snprintf' específica de Microsoft para formatear nombres de archivo de caché de certificados sin garantizar la terminación NUL cuando ocurre la truncación. Según la documentación de Microsoft, '_snprintf' no añade un byte NUL de terminación si la salida formateada excede el tamaño del búfer de destino. Si un atacante controla el valor del nombre de host (por ejemplo, a través de la redirección del servidor o un archivo .rdp manipulado), el búfer del nombre de archivo resultante puede no estar terminado en NUL. Las operaciones de cadena posteriores realizadas en este búfer pueden leer más allá de la región de memoria asignada, lo que resulta en una lectura fuera de límites basada en el montón. En configuraciones predeterminadas, la conexión se termina típicamente antes de que los datos sensibles puedan ser expuestos de manera significativa, pero una lectura de memoria no intencionada o un fallo del cliente aún pueden ocurrir bajo ciertas condiciones. La versión 3.20.0 tiene un parche para el problema.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2025-68118 changed 2025-12-18 | CVE Terms of Use |
| NVD | CVE-2025-68118 changed 2026-10-13 | Public domain |