CVE-2026-40254
JSON

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 packageVersionsReported by
FreeRDP FreeRDP< 3.25.0, before 3.25.0CVE List, NVD

All scores

GitHub_M4.2medium CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N
NVD6.1medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

Classification

CWE-193

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

Sources

SourceRecordLicence
CVE ListCVE-2026-40254 changed 2026-04-24CVE Terms of Use
NVDCVE-2026-40254 changed 2026-11-11Public domain