4.2medium
FreeRDP: contains_dotdot() off-by-one allows drive channel path traversal via terminal ..
- Severity
- 4.2medium CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.24% (higher than 9% of CVEs)
- Published
- Last changed
- Assigned by
- GitHub_M
Description
FreeRDP is a free implementation of the Remote Desktop Protocol. Versions prior to 3.25.0 have an off-by-one in the path traversal filter in `channels/drive/client/drive_file.c`. The `contains_dotdot()` function catches `../` and `..\` mid-path but misses `..` when it's the last component with no trailing separator. A rogue RDP server can read, list, or write files one directory above the client's shared folder through RDPDR requests. This requires the victim to connect with drive redirection enabled. Version 3.25.0 patches the issue.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| FreeRDP FreeRDP | < 3.25.0, before 3.25.0 | CVE List, NVD |
All scores
| GitHub_M | 4.2medium CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N |
| NVD | 6.1medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
Classification
SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial.
What each source says
CVE List
FreeRDP is a free implementation of the Remote Desktop Protocol. Versions prior to 3.25.0 have an off-by-one in the path traversal filter in `channels/drive/client/drive_file.c`. The `contains_dotdot()` function catches `../` and `..\` mid-path but misses `..` when it's the last component with no trailing separator. A rogue RDP server can read, list, or write files one directory above the client's shared folder through RDPDR requests. This requires the victim to connect with drive redirection enabled. Version 3.25.0 patches the issue.
NVD (es)
FreeRDP es una implementación gratuita del Protocolo de Escritorio Remoto. Versiones anteriores a la 3.25.0 tienen un error de ’off-by-one’ en el filtro de salto de ruta en ’channels/drive/client/drive_file.c’. La función ’contains_dotdot()’ detecta ’.. / ’ y ’.. / ’ a mitad de ruta, pero omite ’..’ cuando es el último componente sin un separador final. Un servidor RDP malicioso puede leer, listar o escribir archivos un directorio por encima de la carpeta compartida del cliente a través de solicitudes RDPDR. Esto requiere que la víctima se conecte con la redirección de unidades habilitada. La versión 3.25.0 corrige el problema.
References
| https://github.com/FreeRDP/FreeRDP/security/advisories/GHSA-3xpj-m4hx-8vmx | exploit, mitigation, vendor-advisory | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-40254 changed 2026-04-24 | CVE Terms of Use |
| NVD | CVE-2026-40254 changed 2026-11-11 | Public domain |