Vulnerability · Published Apr 24, 2026 · Assigned by GitHub_M

CVE-2026-40254FreeRDP: contains_dotdot() off-by-one allows drive channel path traversal via terminal ..

Medium 4.2

In plain English

A medium-severity security flaw in FreeRDP from FreeRDP. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 10% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)4.2Medium
Exploit odds (30 days)0.2%top 90.0% of all CVEs
Exploited in the wildNo reportsCISA SSVC: poc
Attack toolingNoneno public tooling known

Official 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 packages & fixed versions

EcosystemPackageFixed inAdvisory
Debian:12freerdp2no fix listedDEBIAN-CVE-2026-40254
Debian:13freerdp33.15.0+dfsg-2.1+deb13u3DEBIAN-CVE-2026-40254
Debian:14freerdp33.25.0+dfsg-1DEBIAN-CVE-2026-40254
Ubuntu:22.04:LTSfreerdp2no fix listedUBUNTU-CVE-2026-40254
Ubuntu:24.04:LTSfreerdp33.30.0+dfsg-0ubuntu0.24.04.1USN-8561-1
Ubuntu:24.04:LTSfreerdp33.30.0+dfsg-0ubuntu0.24.04.1UBUNTU-CVE-2026-40254
Ubuntu:25.10freerdp3no fix listedUBUNTU-CVE-2026-40254
Ubuntu:26.04:LTSfreerdp33.30.0+dfsg-0ubuntu0.26.04.1UBUNTU-CVE-2026-40254
Ubuntu:26.04:LTSfreerdp33.30.0+dfsg-0ubuntu0.26.04.1USN-8561-1

Affected products (as reported)

VendorProductVersions
FreeRDP FreeRDP < 3.25.0

Weakness: CWE-193 · Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N

References